Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "PCI utilities" |
| 2 | DESCRIPTION = 'The PCI Utilities package contains a library for portable access \ |
| 3 | to PCI bus configuration space and several utilities based on this library.' |
| 4 | HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml" |
| 5 | SECTION = "console/utils" |
| 6 | |
| 7 | LICENSE = "GPLv2+" |
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
| 9 | DEPENDS = "zlib kmod" |
| 10 | |
| 11 | SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \ |
| 12 | file://configure.patch" |
| 13 | |
Andrew Geissler | 5a43b43 | 2020-06-13 10:46:56 -0500 | [diff] [blame^] | 14 | SRC_URI[sha256sum] = "9d40b97be8b6a2cdf96aead5a61881d1f7e4e0da9544a9bac4fba1ae9dcd40eb" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 15 | |
| 16 | inherit multilib_header pkgconfig |
| 17 | |
| 18 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}" |
| 19 | PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev" |
| 20 | |
| 21 | PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes STRIP= LIBDIR=${libdir}" |
| 22 | |
| 23 | # see configure.patch |
| 24 | do_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 | |
| 33 | export PREFIX = "${prefix}" |
| 34 | export SBINDIR = "${sbindir}" |
| 35 | export SHAREDIR = "${datadir}" |
| 36 | export MANDIR = "${mandir}" |
| 37 | |
| 38 | EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}" |
| 39 | |
| 40 | ASNEEDED = "" |
| 41 | |
| 42 | # The configure script breaks if the HOST variable is set |
| 43 | HOST[unexport] = "1" |
| 44 | |
| 45 | do_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 | |
| 54 | PACKAGES =+ "${PN}-ids libpci" |
| 55 | FILES_${PN}-ids = "${datadir}/pci.ids*" |
| 56 | FILES_libpci = "${libdir}/libpci.so.*" |
| 57 | SUMMARY_${PN}-ids = "PCI utilities - device ID database" |
| 58 | DESCRIPTION_${PN}-ids = "Package providing the PCI device ID database for pciutils." |
| 59 | RDEPENDS_${PN} += "${PN}-ids" |