95.11. pciutils-3.15.0
Set of programs for listing PCI devices
3.15.0-1 · GPL-2.0-or-later · 0.2 SBU · 487.0 KiB, 19 files · 41_system, 477 of 1047 · ports/core/hardware/pciutils
Homepage: https://mj.ucw.cz/sw/pciutils/
pciutils is the PCI toolkit: lspci, which lists the PCI devices of the machine with their names, capabilities and the kernel driver bound to each, setpci, which reads and writes their configuration registers, and libpci, the library under both. The names come from the PCI ID list, pci.ids, which the hwdata port installs. The browsers, powertop, fastfetch and most of the other ports that name it use libpci; tlp runs lspci.
There is no configure: every setting is a make variable, kept in the pci_opts array and passed to both make lines, so the install step cannot configure a different library from the one that was built. Left unset, each feature is auto-detected and quietly dropped when its library is missing; every one is named here.
Depends on: zlib, eudev, kmod, pkgconf, hwdata.
Required by (13): aircrack-ng, chromium, fastfetch, firefox-esr, flashrom, kinfocenter, librewolf, net-snmp, obs-studio, powertop, qt6-qtwebengine, thunderbird, tlp.
Sources: pciutils-3.15.0.tar.xz (517.3 KiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install pciutils'
build.sh:
pci_opts=(
PREFIX=/usr
SHAREDIR=/usr/share/hwdata
MANDIR=/usr/share/man
SHARED=yes
ZLIB=yes
DNS=yes
LIBKMOD=yes
HWDB=yes
)
make OPT="${CFLAGS} -fPIC -DPIC" "${pci_opts[@]}"
make "${pci_opts[@]}" DESTDIR=$PKG install install-lib
chmod -v 755 $PKG/usr/lib/libpci.so
rm -f "$PKG/usr/share/hwdata/pci.ids.gz"
SHAREDIR=/usr/share/hwdata— Look forpci.idsin/usr/share/hwdata, where hwdata installs it.SHARED=yes— Buildlibpcias a shared library; the makefile’s default is a static one.install-libon the install line then installs it with its headers and pkg-config file.ZLIB=yes— Read the ID list through zlib, so a compressedpci.ids.gzis read as well as a plainpci.ids.DNS=yes— Buildlspci -q, which looks up a device missing from the local ID list in the central PCI ID database over DNS, and caches the answer in$XDG_CACHE_HOME/pci-ids, or in~/.cache/pci-idswhen that is unset. It reaches the network only when that option is given.LIBKMOD=yes— Link kmod’slibkmod, solspci -knames the kernel modules able to drive each device. Namedyes, alibkmodthat pkg-config cannot find stops the build.HWDB=yes— When the ID list has no name for a device, look it up in udev’s hardware database, which eudev builds.OPT— The compile flags the makefile uses, given as the tree’sCFLAGSwith-fPIC -DPICadded for the shared library.
Programs: lspci, pcilmr, setpci, update-pciids.
Libraries: libpci.so.
Directories: /usr/include/pci, /usr/share/licenses/pciutils.
With ZLIB=yes the library’s default ID file is pci.ids.gz, and make install installs a copy of the list under that name. build.sh deletes it. When the .gz file does not exist, libpci drops the suffix and opens pci.ids, so every program reads hwdata’s list rather than the copy in pciutils’ own tarball.
The makefile installs libpci.so.<version> with mode 644; build.sh sets it to 755.