blob: 3afa5215972e709cf904b2e9dc4d42413b31c8e8 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "PCI utilities"
2DESCRIPTION = 'The PCI Utilities package contains a library for portable access \
3to PCI bus configuration space and several utilities based on this library.'
4HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml"
5SECTION = "console/utils"
6
7LICENSE = "GPLv2+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
9DEPENDS = "zlib kmod"
10
11SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
12 file://configure.patch"
13
Andrew Geissler5a43b432020-06-13 10:46:56 -050014SRC_URI[sha256sum] = "9d40b97be8b6a2cdf96aead5a61881d1f7e4e0da9544a9bac4fba1ae9dcd40eb"
Andrew Geissler82c905d2020-04-13 13:39:40 -050015
16inherit multilib_header pkgconfig
17
18PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}"
19PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
20
21PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes STRIP= LIBDIR=${libdir}"
22
23# see configure.patch
24do_configure () {
25 (
26 cd lib && \
27 # PACKAGECONFIG_CONFARGS for this recipe could only possibly contain 'HWDB=yes/no',
28 # so we put it before ./configure
29 ${PCI_CONF_FLAG} ${PACKAGECONFIG_CONFARGS} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
30 )
31}
32
33export PREFIX = "${prefix}"
34export SBINDIR = "${sbindir}"
35export SHAREDIR = "${datadir}"
36export MANDIR = "${mandir}"
37
38EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}"
39
40ASNEEDED = ""
41
42# The configure script breaks if the HOST variable is set
43HOST[unexport] = "1"
44
45do_install () {
46 oe_runmake DESTDIR=${D} install install-lib
47
48 install -d ${D}${bindir}
49 ln -s ../sbin/lspci ${D}${bindir}/lspci
50
51 oe_multilib_header pci/config.h
52}
53
54PACKAGES =+ "${PN}-ids libpci"
Patrick Williams213cb262021-08-07 19:21:33 -050055FILES:${PN}-ids = "${datadir}/pci.ids*"
56FILES:libpci = "${libdir}/libpci.so.*"
57SUMMARY:${PN}-ids = "PCI utilities - device ID database"
58DESCRIPTION:${PN}-ids = "Package providing the PCI device ID database for pciutils."
59RDEPENDS:${PN} += "${PN}-ids"