Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [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 = "GPL-2.0-or-later" |
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
| 9 | # Can drop make-native when all systems have make 4.3 |
| 10 | # https://git.savannah.gnu.org/cgit/make.git/commit/?id=b90fabc8d6f34fb37d428dc0fb1b8b1951a9fbed |
| 11 | # causes space issues in lib/libpci.pc |
| 12 | DEPENDS = "zlib kmod make-native" |
| 13 | |
| 14 | SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \ |
| 15 | file://configure.patch" |
| 16 | |
| 17 | SRC_URI[sha256sum] = "cdea7ae97239dee23249a09c68a19a287a3f109fbeb2c232ebb616cb38599012" |
| 18 | |
| 19 | inherit multilib_header pkgconfig update-alternatives |
| 20 | |
| 21 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}" |
| 22 | PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev" |
| 23 | |
| 24 | PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes STRIP= LIBDIR=${libdir}" |
| 25 | |
| 26 | # see configure.patch |
| 27 | do_configure () { |
| 28 | ( |
| 29 | cd lib && \ |
| 30 | # PACKAGECONFIG_CONFARGS for this recipe could only possibly contain 'HWDB=yes/no', |
| 31 | # so we put it before ./configure |
| 32 | ${PCI_CONF_FLAG} ${PACKAGECONFIG_CONFARGS} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH} |
| 33 | ) |
| 34 | } |
| 35 | |
| 36 | export PREFIX = "${prefix}" |
| 37 | export SBINDIR = "${sbindir}" |
| 38 | export SHAREDIR = "${datadir}" |
| 39 | export MANDIR = "${mandir}" |
| 40 | |
| 41 | EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}" |
| 42 | |
| 43 | ASNEEDED = "" |
| 44 | |
| 45 | # The configure script breaks if the HOST variable is set |
| 46 | HOST[unexport] = "1" |
| 47 | |
| 48 | do_install () { |
| 49 | oe_runmake DESTDIR=${D} install install-lib |
| 50 | |
| 51 | install -d ${D}${bindir} |
| 52 | |
| 53 | oe_multilib_header pci/config.h |
| 54 | } |
| 55 | |
| 56 | PACKAGES =+ "${PN}-ids libpci" |
| 57 | FILES:${PN}-ids = "${datadir}/pci.ids*" |
| 58 | FILES:libpci = "${libdir}/libpci.so.*" |
| 59 | SUMMARY:${PN}-ids = "PCI utilities - device ID database" |
| 60 | DESCRIPTION:${PN}-ids = "Package providing the PCI device ID database for pciutils." |
| 61 | RDEPENDS:${PN} += "${PN}-ids" |
| 62 | |
| 63 | ALTERNATIVE:${PN} = "lspci" |
| 64 | ALTERNATIVE_PRIORITY = "100" |