mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-20 14:31:47 +00:00
72 lines
2.4 KiB
Bash
72 lines
2.4 KiB
Bash
#! /bin/bash
|
|
|
|
# usbutils
|
|
# Source: https://github.com/gregkh/usbutils/archive/v015/usbutils-015.tar.gz
|
|
#
|
|
# $BUILD = Directory to temporarily install
|
|
# $PKGS = Directory to store built packages
|
|
#
|
|
# DEPS
|
|
# Required: libusb, wget
|
|
# Recommended: NONE
|
|
# Optional: NONE
|
|
|
|
# If coptimizing with GCC:
|
|
export CFLAGS="-march=native -mtune=native -pipe "
|
|
export CFLAGS+="-O3 -ffat-lto-objects -flto=4 "
|
|
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
|
|
|
|
patch -Np1 -i ../patches/usbutils-alpine/hwdata.patch &&
|
|
|
|
autoreconf -fiv &&
|
|
./configure --prefix=/usr --datadir=/usr/share/hwdata $BUILDTRUPLE &&
|
|
read -p "Compile?" && make -j2 &&
|
|
sudo -S make DESTDIR=$BUILD install &&
|
|
|
|
# Skip if hwdata is not installed
|
|
sudo -S install -dm755 ${BUILD}/usr/share/hwdata/ &&
|
|
sudo -S wget http://www.linux-usb.org/usb.ids -O ${BUILD}/usr/share/hwdata/usb.ids &&
|
|
|
|
sudo -S mkdir -pv /BMAN/install
|
|
sudo -S mkdir -pv /BMAN/usr/share
|
|
sudo -S mv $BUILD/usr/share/man /BMAN/usr/share/
|
|
|
|
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------------------------------------------------------|
|
|
usbutils: usbutils (USB utilities)
|
|
usbutils:
|
|
usbutils: lsusb displays detailed information about all USB buses and devices
|
|
usbutils: in the system.
|
|
usbutils:
|
|
usbutils: usbmodules lists the kernel modules for a plugged in USB device.
|
|
usbutils:
|
|
usbutils: See the manual pages for more details.
|
|
usbutils:
|
|
usbutils:
|
|
usbutils:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
sudo -S makepkg -l y -c n $PKGS/usbutils-015-$PSUFFIX &&
|
|
cd /BMAN
|
|
cat > /tmp/slack-desc << "EOF"
|
|
usbutils-doc: Manuals for usbutils (USB utilities)
|
|
usbutils-doc:
|
|
usbutils-doc: lsusb displays detailed information about all USB buses and devices
|
|
usbutils-doc: in the system.
|
|
usbutils-doc:
|
|
usbutils-doc: usbmodules lists the kernel modules for a plugged in USB device.
|
|
usbutils-doc:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
sudo -S makepkg -l y -c n $PKGS/usbutils-doc-015-$NOPSUFFIX
|
|
sudo -S rm -rf /BMAN/*
|
|
sudo -S rm -rf ${BUILD}/*
|