added lm_sensors package

This commit is contained in:
wt
2025-10-07 15:20:28 +07:00
parent f6741325da
commit 1adad88039
7 changed files with 48 additions and 1 deletions
+1
View File
@@ -58,4 +58,5 @@ export IPTABLES_ENABLE=n
export KO8821AU_ENABLE=n
export FINIT_INIT_ENABLE=y
export LIBSQLITE3_ENABLE=n
export LM_SENSORS_ENABLE=n
#--------------------------------------
+1
View File
@@ -60,4 +60,5 @@ export IPTABLES_ENABLE=n
export KO8821AU_ENABLE=n
export FINIT_INIT_ENABLE=y
export LIBSQLITE3_ENABLE=n
export LM_SENSORS_ENABLE=n
#--------------------------------------
+1
View File
@@ -48,4 +48,5 @@ export GITEA_ENABLE=n
export OPENSSL_ENABLE=n
export FINIT_INIT_ENABLE=y
export LIBSQLITE3_ENABLE=n
export LM_SENSORS_ENABLE=n
#--------------------------------------
+4
View File
@@ -18,6 +18,7 @@
. ./scripts/8821au_ko.sh
. ./scripts/finit_init.sh
. ./scripts/libsqlite3.sh
. ./scripts/lm_sensors.sh
case $1 in
build)
@@ -72,6 +73,9 @@ case $1 in
libsqlite3)
libsqlite3
;;
lm_sensors)
lm_sensors
;;
*)
printf "$UYELLOW** $0 script using: $0 {clean|build|download|rootfs}\n$RESET"
exit 1
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
. ./scripts/colors.sh
. ./scripts/funcs.sh
. ./scripts/config.sh
lm_sensors() {
printf "$GREEN** Building and installing lm_sensors\n$RESET"
mkdir -pv $build/lm_sensors
cd $build/lm_sensors
git clone https://github.com/lm-sensors/lm-sensors.git
cd lm-sensors
make CC=$CROSS_COMPILE-gcc PREFIX=/usr DESTDIR=$rootfspath install -j$(nproc)
rm -rf $rootfspath/usr/man $rootfspath/usr/include
find $rootfspath -type f -name "*.a" -delete
${CROSS_COMPILE}-strip $rootfspath/usr/bin/* $rootfspath/usr/lib/* $rootfspath/usr/sbin/*
}
+21
View File
@@ -0,0 +1,21 @@
pkgname=lm_sensors
pkgver=3.6.0
pkgrel=1
gitsource="https://github.com/lm-sensors/lm-sensors.git"
deps="uClibc-ng-1.0.50-1"
export PATH=$PATH:/opt/toolchains/arm-buildroot-linux-uclibcgnueabihf/bin
export CROSS_COMPILE=arm-buildroot-linux-uclibcgnueabihf
export ARCH=arm
build() {
make -C $srcdir CC=${CROSS_COMPILE}-gcc PREFIX=/usr -j$(nproc)
}
package() {
make -C $srcdir CC=${CROSS_COMPILE}-gcc PREFIX=/usr DESTDIR=$pkgdir install
mv -v $pkgdir/usr/sbin/* $pkgdir/usr/bin/
rm -rf $pkgdir/usr/man $pkgdir/usr/include $pkgdir/usr/sbin
find $pkgdir -type f -name "*.a" -delete
${CROSS_COMPILE}-strip $pkgdir/usr/bin/* $pkgdir/usr/lib/* $pkgdir/usr/sbin/* || true
}
+3 -1
View File
@@ -22,6 +22,7 @@
. ./scripts/8821au_ko.sh
. ./scripts/finit_init.sh
. ./scripts/libsqlite3.sh
. ./scripts/lm_sensors.sh
#----------- Building rootfs ----------------------
rootfs() {
@@ -83,7 +84,8 @@ EOF
[ "$HOSTAPD_ENABLE" = "y" ] && hostapd
[ "$IPTABLES_ENABLE" = "y" ] && iptables
[ "$KO8821AU_ENABLE" = "y" ] && ko8821au
[ "$LIBSQLITE3_ENABLE" = "Y"] && libsqlite3
[ "$LIBSQLITE3_ENABLE" = "y"] && libsqlite3
[ "$LM_SENSORS_ENABLE" = "y" ] && lm_sensors
if [ ! -z "$DEFAULT_HOSTNAME" ]; then
echo "$DEFAULT_HOSTNAME" > $rootfspath/etc/hostname