#! /bin/bash # PCI Utils # Source: https://mj.ucw.cz/download/linux/pci/pciutils-3.12.0.tar.gz # # $BUILD = Directory to temporarily install # $PKGS = Directory to store built packages # # DEPS # Required: NONE # Recommended: cURL, Wget or Lynx # Optional: NONE # If optimizing with GCC export CFLAGS="-march=native -pipe " export CFLAGS+="-O3 -ffat-lto-objects -flto=4 " export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed " # If compiling with clang-17, set these compiler flag export CFLAGS+="-Wno-implicit-function-declaration " export CFLAGS+="-Wno-int-conversion " read -p "Compile?" && make OPT="$CFLAGS" ZLIB=no \ SHARED=yes \ PREFIX=/usr \ SHAREDIR=/usr/share/hwdata \ MANDIR=/usr/share/man \ all && sudo -S make PREFIX=${BUILD}/usr \ SHARED=yes \ SHAREDIR=${BUILD}/usr/share/hwdata \ MANDIR=${BUILD}/usr/share/man \ install install-lib && sudo -S chmod -v 755 ${BUILD}/usr/lib/libpci.so && sudo -S mkdir -pv /BMAN/install sudo -S mkdir -pv /BMAN/usr/share sudo -S mv $BUILD/usr/share/man /BMAN/usr/share/ unset CFLAGS # If hwdata was already installed, remove possibly outdated pci ID's sudo rm -rf $BUILD/usr/share/hwdata cd $BUILD && sudo -S mkdir -v ${BUILD}/install && cat > /tmp/slack-desc << "EOF" # HOW TO EDIT THIS FILE: # The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' # on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| pciutils: pciutils (PCI utilities) pciutils: pciutils: lspci displays detailed information about all PCI buses and devices pciutils: in the system, replacing the original /proc/pci interface. pciutils: pciutils: setpci allows reading from and writing to PCI device configuration pciutils: registers. For example, you can adjust the latency timers with it. pciutils: pciutils: pcimodules lists the kernel modules for all plugged in PCI devices. pciutils: pciutils: See the manual pages for more details. EOF sudo -S mv -v /tmp/slack-desc install/ && sudo -S makepkg -l y -c n $PKGS/pciutils-3.12.0-${PSUFFIX} && cd /BMAN cat > /tmp/slack-desc << "EOF" pciutils-doc: Manuals for pciutils (PCI utilities) pciutils-doc: pciutils-doc: lspci displays detailed information about all PCI buses and devices pciutils-doc: in the system, replacing the original /proc/pci interface. pciutils-doc: pciutils-doc: setpci allows reading from and writing to PCI device configuration pciutils-doc: registers. For example, you can adjust the latency timers with it. pciutils-doc: pciutils-doc: pcimodules lists the kernel modules for all plugged in PCI devices. pciutils-doc: EOF sudo -S mv -v /tmp/slack-desc install/ && sudo -S makepkg -l y -c n $PKGS/pciutils-doc-3.12.0-${NOPSUFFIX} sudo -S rm -rf /BMAN/* sudo -S rm -rf ${BUILD}/*