Skip to content

Commit 1681e6a

Browse files
Nabil-Salahashraffouda
authored andcommitted
fix: building lshw
Signed-off-by: nabil salah <nabil.salah203@gmail.com>
1 parent c589c26 commit 1681e6a

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

bins/packages/lshw/lshw.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ LSHW_CHECKSUM="5805eba5f31886582fff673c5dccdb3b"
33
LSHW_LINK="https://github.com/lyonel/lshw/archive/refs/tags/${LSHW_VERSION}.tar.gz"
44

55
download_lshw() {
6-
download_file $LSHW_LINK $LSHW_CHECKSUM lshw-${LSHW_VERSION}.tar.gz
6+
download_file ${LSHW_LINK} ${LSHW_CHECKSUM} lshw-${LSHW_VERSION}.tar.gz
77
}
88

99
dependencies_lshw() {
@@ -23,8 +23,8 @@ prepare_lshw() {
2323

2424
compile_lshw() {
2525
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"
26+
# Build static binary
27+
make static
2828
popd
2929
}
3030

@@ -35,7 +35,8 @@ install_lshw() {
3535
mkdir -p "${ROOTDIR}/usr/share/man/man1"
3636
mkdir -p "${ROOTDIR}/usr/share/lshw"
3737

38-
cp src/lshw "${ROOTDIR}/usr/sbin/"
38+
# Install the static binary
39+
cp src/lshw-static "${ROOTDIR}/usr/sbin/lshw"
3940
chmod +x "${ROOTDIR}/usr/sbin/lshw"
4041

4142
cp src/lshw.1 "${ROOTDIR}/usr/share/man/man1/"

0 commit comments

Comments
 (0)