File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9595 # package: tpm
9696 # secrets:
9797 # token: ${{ secrets.HUB_JWT }}
98+ lshw :
99+ uses : ./.github/workflows/bin-package.yaml
100+ with :
101+ package : lshw
102+ secrets :
103+ token : ${{ secrets.HUB_JWT }}
98104 qsfs :
99105 uses : ./.github/workflows/bin-package-no-tag.yaml
100106 with :
Original file line number Diff line number Diff line change 1+ LSHW_VERSION=" B.02.20"
2+ LSHW_CHECKSUM=" 5805eba5f31886582fff673c5dccdb3b"
3+ LSHW_LINK=" https://github.com/lyonel/lshw/archive/refs/tags/${LSHW_VERSION} .tar.gz"
4+
5+ download_lshw () {
6+ download_file $LSHW_LINK $LSHW_CHECKSUM lshw-${LSHW_VERSION} .tar.gz
7+ }
8+
9+ dependencies_lshw () {
10+ apt-get install -y build-essential gcc g++ make
11+ }
12+
13+ extract_lshw () {
14+ if [ ! -d " lshw-${LSHW_VERSION} " ]; then
15+ echo " [+] extracting: lshw-${LSHW_VERSION} "
16+ tar -xf ${DISTDIR} /lshw-${LSHW_VERSION} .tar.gz -C .
17+ fi
18+ }
19+
20+ prepare_lshw () {
21+ echo " [+] configuring lshw"
22+ }
23+
24+ compile_lshw () {
25+ pushd src
26+ make -C core ${MAKEOPTS} VERSION=" ${LSHW_VERSION} "
27+ make ${MAKEOPTS} VERSION=" ${LSHW_VERSION} " LDFLAGS=" -static -L./core/" CXXFLAGS=" -g -Wall -I./core/ -fno-pie"
28+ popd
29+ }
30+
31+ install_lshw () {
32+ echo " [+] installing lshw to initramfs"
33+
34+ mkdir -p " ${ROOTDIR} /usr/sbin"
35+ mkdir -p " ${ROOTDIR} /usr/share/man/man1"
36+ mkdir -p " ${ROOTDIR} /usr/share/lshw"
37+
38+ cp src/lshw " ${ROOTDIR} /usr/sbin/"
39+ chmod +x " ${ROOTDIR} /usr/sbin/lshw"
40+
41+ cp src/lshw.1 " ${ROOTDIR} /usr/share/man/man1/"
42+ cp src/pci.ids src/usb.ids src/oui.txt src/manuf.txt src/pnp.ids src/pnpid.txt " ${ROOTDIR} /usr/share/lshw/"
43+ }
44+
45+ build_lshw () {
46+ dependencies_lshw
47+
48+ pushd " ${DISTDIR} "
49+ download_lshw
50+ popd
51+
52+ pushd " ${WORKDIR} "
53+ extract_lshw
54+
55+ pushd " lshw-${LSHW_VERSION} "
56+ prepare_lshw
57+ compile_lshw
58+ install_lshw
59+ popd
60+
61+ popd
62+ }
You can’t perform that action at this time.
0 commit comments