{ "name": "pciutils", "version": "3.15.0", "summary": "pciutils: lspci lists the PCI devices (network cards, disk controllers) with names from pci.ids; setpci", "category": "tool", "license": "GPL-2.0-or-later", "homepage": "https://mj.ucw.cz/sw/pciutils/", "source": { "url": "https://mirrors.kernel.org/pub/software/utils/pciutils/pciutils-3.15.0.tar.xz", "sha256": "c02940f430841ecf158d5d9a50007afc4d5353c8678a2455003ca0b2c4e9f5ff" }, "watch": {"kind": "index", "url": "https://mirrors.kernel.org/pub/software/utils/pciutils/", "regex": "pciutils-([0-9]+(?:\\.[0-9]+)+)\\.tar\\.xz"}, "deps": [], "env_packages": [], "static": true, "nss": true, "check": "bin/lspci --version | first && [ -s share/pci.ids ] && t=$(mktemp -d) && printf '00:00.0 Host bridge\\n00: 86 80 37 12 06 01 00 00 02 00 00 06 00 00 00 00\\n10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\\n20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\\n30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\\n\\n00:1f.2 SATA controller\\n00: 86 80 22 29 07 04 b0 02 02 01 06 01 00 00 00 00\\n10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\\n20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\\n30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\\n' > \"$t/dump\" && bin/lspci -F \"$t/dump\" > \"$t/out\" && has '^00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC \\[Natoma\\] (rev 02)' < \"$t/out\" && has '^00:1f.2 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller \\[AHCI mode\\]' < \"$t/out\" && bin/lspci -F \"$t/dump\" -n -s 1f.2 | has '00:1f.2 0106: 8086:2922' && test -f lib/libpci.a && printf '#include \\n#include \\n#include \\n#include \\nint main(int c, char **v) { struct pci_access *a = pci_alloc(); struct pci_dev *d; char name[256]; int n = 0, found = 0; a->method = PCI_ACCESS_DUMP; pci_set_param(a, \"dump.name\", v[1]); pci_init(a); pci_scan_bus(a); for (d = a->devices; d; d = d->next) { pci_fill_info(d, PCI_FILL_IDENT | PCI_FILL_CLASS); n++; if (d->vendor_id == 0x8086 && d->device_id == 0x2922 && d->device_class == 0x0106) found = 1; } pci_lookup_name(a, name, sizeof name, PCI_LOOKUP_VENDOR, 0x8086); printf(\"libpci: %%d devices of the dump, vendor 8086 is %%s\\\\n\", n, name); pci_cleanup(a); return n != 2 || !found || strcmp(name, \"Intel Corporation\"); }\\n' > \"$t/l.c\" && $CC $CPPFLAGS $CFLAGS $($PKG_CONFIG --cflags libpci) \"$t/l.c\" -o \"$t/l\" $LDFLAGS $($PKG_CONFIG --static --libs libpci) && \"$t/l\" \"$t/dump\" > \"$t/lib\" && echo 'lspci: two devices of a configuration dump named from pci.ids; libpci (static) read the same dump'" }