blob: 034bb63dc9ee1d28d1fdd3b9b335dae263f8d8fe [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
14SRC_URI[md5sum] = "4343b37e19f319ce8f3d59c30031790e"
15SRC_URI[sha256sum] = "f67ff732976e2db2a5ccdf3960020796526ba6b05f6b1cdd24b7b206af706055"
16
17inherit multilib_header pkgconfig
18
19PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}"
20PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
21
22PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes STRIP= LIBDIR=${libdir}"
23
24# see configure.patch
25do_configure () {
26 (
27 cd lib && \
28 # PACKAGECONFIG_CONFARGS for this recipe could only possibly contain 'HWDB=yes/no',
29 # so we put it before ./configure
30 ${PCI_CONF_FLAG} ${PACKAGECONFIG_CONFARGS} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
31 )
32}
33
34export PREFIX = "${prefix}"
35export SBINDIR = "${sbindir}"
36export SHAREDIR = "${datadir}"
37export MANDIR = "${mandir}"
38
39EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}"
40
41ASNEEDED = ""
42
43# The configure script breaks if the HOST variable is set
44HOST[unexport] = "1"
45
46do_install () {
47 oe_runmake DESTDIR=${D} install install-lib
48
49 install -d ${D}${bindir}
50 ln -s ../sbin/lspci ${D}${bindir}/lspci
51
52 oe_multilib_header pci/config.h
53}
54
55PACKAGES =+ "${PN}-ids libpci"
56FILES_${PN}-ids = "${datadir}/pci.ids*"
57FILES_libpci = "${libdir}/libpci.so.*"
58SUMMARY_${PN}-ids = "PCI utilities - device ID database"
59DESCRIPTION_${PN}-ids = "Package providing the PCI device ID database for pciutils."
60RDEPENDS_${PN} += "${PN}-ids"