Skip to content

Commit e0f96c1

Browse files
authored
Merge pull request #95 from threefoldtech/development-lshw
2 parents 23ebebd + 10be113 commit e0f96c1

2 files changed

Lines changed: 48 additions & 0 deletions

File tree

initramfs.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,7 @@ main() {
708708
build_rtinfo
709709
build_seektime
710710
build_curl
711+
build_lshw
711712
build_zflist
712713
build_haveged
713714
build_wireguard

packages/lshw.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
extract_lshw() {
10+
if [ ! -d "lshw-${LSHW_VERSION}" ]; then
11+
echo "[+] extracting: lshw-${LSHW_VERSION}"
12+
tar -xf ${DISTFILES}/lshw-${LSHW_VERSION}.tar.gz -C .
13+
fi
14+
}
15+
16+
prepare_lshw() {
17+
echo "[+] configuring lshw"
18+
}
19+
20+
compile_lshw() {
21+
pushd src
22+
make ${MAKEOPTS}
23+
popd
24+
}
25+
26+
install_lshw() {
27+
echo "[+] installing lshw to initramfs"
28+
29+
make DESTDIR="${ROOTDIR}" install
30+
}
31+
32+
build_lshw() {
33+
pushd "${WORKDIR}/lshw-${LSHW_VERSION}"
34+
35+
prepare_lshw
36+
compile_lshw
37+
install_lshw
38+
39+
popd
40+
}
41+
42+
registrar_lshw() {
43+
DOWNLOADERS+=(download_lshw)
44+
EXTRACTORS+=(extract_lshw)
45+
}
46+
47+
registrar_lshw

0 commit comments

Comments
 (0)