diff options
author | Lockywolf <for_sbo.i8kutils_2023-05-15@lockywolf.net> | 2023-11-29 06:13:01 +0900 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-11-29 18:38:18 +0700 |
commit | 8423adb70e77322fc74c3213d2c533b2c26aa0ef (patch) | |
tree | 38928b22f04b72315df1ac04b9e0b70c873bfc0f /system/i8kutils | |
parent | ed9f0fdbbbd996906f652bf2d5161e50a8e08c89 (diff) |
system/i8kutils: Updated for version 20210330_c993fb1d.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/i8kutils')
-rw-r--r-- | system/i8kutils/README | 28 | ||||
-rw-r--r-- | system/i8kutils/doinst.sh | 13 | ||||
-rw-r--r-- | system/i8kutils/fix_Makefile.patch | 29 | ||||
-rw-r--r-- | system/i8kutils/fix_i8kmon_toggle_fan.patch | 11 | ||||
-rw-r--r-- | system/i8kutils/i8kutils.SlackBuild | 65 | ||||
-rw-r--r-- | system/i8kutils/i8kutils.info | 14 | ||||
-rw-r--r-- | system/i8kutils/rc.i8kmon | 68 | ||||
-rw-r--r-- | system/i8kutils/slack-desc | 10 |
8 files changed, 65 insertions, 173 deletions
diff --git a/system/i8kutils/README b/system/i8kutils/README index be39efb3ed482..82346433d2937 100644 --- a/system/i8kutils/README +++ b/system/i8kutils/README @@ -1,3 +1,25 @@ -This package contains user-space programs for controlling the fans -on Dell laptops. Make sure the i8k module is loaded before using -i8kutils. +i8kutils package contains user-space programs for controlling the fans +on some Dell laptops. + +Note: i8kutils is entirely built upon the dell-smm-hwmon kernel module. + +These data contains the states and the system temperature along with +others infos. The fields returned in a query to the system are +summarized below. + + * BIOS version + + * Dell service tag (later known as 'serial number') + + * CPU temperature + + * fan status + + * fan rotation speed (only on some models) + + * ac power status + + * volume buttons status (not the multimedia buttons) + +The data are collected from the dell-smm-hwmon kernel module that is +included in recent kernels. diff --git a/system/i8kutils/doinst.sh b/system/i8kutils/doinst.sh deleted file mode 100644 index 44345888da75c..0000000000000 --- a/system/i8kutils/doinst.sh +++ /dev/null @@ -1,13 +0,0 @@ -config() { - NEW="$1" - OLD="$(dirname $NEW)/$(basename $NEW .new)" - # If there's no config file by that name, mv it over: - if [ ! -r $OLD ]; then - mv $NEW $OLD - elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then - # toss the redundant copy - rm $NEW - fi - # Otherwise, we leave the .new copy for the admin to consider... -} -config etc/i8kmon.conf.new diff --git a/system/i8kutils/fix_Makefile.patch b/system/i8kutils/fix_Makefile.patch deleted file mode 100644 index 38fc8d9e296f1..0000000000000 --- a/system/i8kutils/fix_Makefile.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -Naur i8kutils/Makefile i8kutils_new/Makefile ---- i8kutils/Makefile 2014-12-09 16:40:11.000000000 +0100 -+++ i8kutils_new/Makefile 2015-01-31 13:15:21.031912744 +0100 -@@ -14,16 +14,19 @@ - # General Public License for more details. - - ccflags-y = -Wall -+CC = gcc - - all: i8kctl probe_i8k_calls_time - --i8kctl: i8kctl.c i8kctl.o -- gcc -Wall i8kctl.c -o i8kctl -+i8kctl: i8kctl.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -Wall i8kctl.c -o i8kctl - --probe_i8k_calls_time: probe_i8k_calls_time.c -- gcc -Wall -c -g -DLIB i8kctl.c -- gcc -Wall -c -g -DLIB probe_i8k_calls_time.c -- gcc -o probe_i8k_calls_time i8kctl.o probe_i8k_calls_time.o -+i8kctl_DLIB.o: i8kctl.c -+ $(CC) $(CFLAGS) -Wall -c -g -DLIB i8kctl.c -o i8kctl_DLIB.o -+ -+probe_i8k_calls_time: i8kctl_DLIB.o probe_i8k_calls_time.c -+ $(CC) $(CFLAGS) -Wall -c -g -DLIB probe_i8k_calls_time.c -+ $(CC) $(CFLAGS) $(LDFLAGS) -Wall -o probe_i8k_calls_time i8kctl_DLIB.o probe_i8k_calls_time.o - - i8k: - make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules diff --git a/system/i8kutils/fix_i8kmon_toggle_fan.patch b/system/i8kutils/fix_i8kmon_toggle_fan.patch deleted file mode 100644 index 146bf7e4f214d..0000000000000 --- a/system/i8kutils/fix_i8kmon_toggle_fan.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur i8kutils/i8kmon new/i8kmon ---- i8kutils/i8kmon 2015-05-21 11:33:21.596018503 +0200 -+++ new/i8kmon 2015-05-21 11:35:11.958867344 +0200 -@@ -430,6 +430,7 @@ - - proc toggle_fan {fan {speed {}}} { - global status -+ global config - - if {$speed != {}} { - set status($fan) $speed diff --git a/system/i8kutils/i8kutils.SlackBuild b/system/i8kutils/i8kutils.SlackBuild index c79162f7d8d96..ef4e46c12cb99 100644 --- a/system/i8kutils/i8kutils.SlackBuild +++ b/system/i8kutils/i8kutils.SlackBuild @@ -1,8 +1,8 @@ #!/bin/bash -# Slackware build script for i8kutils +# Slackware build script for i3kutils -# Copyright 2015 Fabio Sangiovanni <sjh+sbo@sanjioh.org> +# Copyright 2023, Lockywolf # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,14 +22,17 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=i8kutils -VERSION=${VERSION:-1.42} +VERSION=${VERSION:-20210330_c993fb1d} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} +COMMIT=c993fb1da1bba5c2cd2860c1aa6c3916b4de77e4 + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; @@ -38,9 +41,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -69,53 +69,44 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM -tar xvf $CWD/${PRGNAM}_${VERSION}.tar.xz -cd $PRGNAM + +rm -rf $PRGNAM-$COMMIT +tar xvf $CWD/$PRGNAM-$COMMIT.tar.gz +cd $PRGNAM-$COMMIT + chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; - -# Take care of creating required directory tree into $PKG, since Makefile doesn't -mkdir -p $PKG/{etc,usr/{bin,man/man1}} + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Two fixes from Arch Linux (the first one is needed to make CFLAGS work) -patch -p1 < $CWD/fix_Makefile.patch -patch -p1 < $CWD/fix_i8kmon_toggle_fan.patch +make +mkdir -p $PKG/usr/sbin +cp i8kctl $PKG/usr/sbin/ -make CFLAGS="$SLKCFLAGS -std=gnu89" +gzip i8kctl.1 +gzip i8kmon.1 +mkdir -p $PKG/usr/man/man1 +cp i8kctl.1.gz i8kmon.1.gz $PKG/usr/man/man1/ -cp -a \ - i8kctl i8kfan i8kmon probe_i8k_calls_time \ - $PKG/usr/bin find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -# Use sample config, without overwriting -cp -a i8kmon.conf $PKG/etc/i8kmon.conf.new - -# Copy man pages -cp -a i8kctl.1 i8kmon.1 $PKG/usr/man/man1 - -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done - mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - COPYING README.i8kutils TODO \ + README.i8kutils \ + COPYING \ + dell-smm-hwmon.conf \ + i8kmon.conf \ + smm-test \ + redhat \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -# Decomment the following line if you want extra documentation to be included -#cp -a debian redhat $PKG/usr/doc/$PRGNAM-$VERSION - mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/i8kutils/i8kutils.info b/system/i8kutils/i8kutils.info index de2f14884c15a..17fc02224e8fe 100644 --- a/system/i8kutils/i8kutils.info +++ b/system/i8kutils/i8kutils.info @@ -1,10 +1,10 @@ PRGNAM="i8kutils" -VERSION="1.42" -HOMEPAGE="https://launchpad.net/i8kutils" -DOWNLOAD="https://launchpad.net/i8kutils/trunk/1.42/+download/i8kutils_1.42.tar.xz" -MD5SUM="7470b2908b39a41e3f26b8b3398e189d" +VERSION="20210330_c993fb1d" +HOMEPAGE="https://github.com/vitorafsr/i8kutils/" +DOWNLOAD="https://github.com/vitorafsr/i8kutils/archive/c993fb1da1bba5c2cd2860c1aa6c3916b4de77e4/i8kutils-c993fb1da1bba5c2cd2860c1aa6c3916b4de77e4.tar.gz" +MD5SUM="d1d2d0e646ac54a01b49f97ea73d00f9" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="acpi" -MAINTAINER="Fabio Sangiovanni" -EMAIL="sjh+sbo@sanjioh.org" +REQUIRES="" +MAINTAINER="Lockywolf" +EMAIL="for_sbo.i8kutils_2023-05-15@lockywolf.net" diff --git a/system/i8kutils/rc.i8kmon b/system/i8kutils/rc.i8kmon deleted file mode 100644 index 18640a137156e..0000000000000 --- a/system/i8kutils/rc.i8kmon +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh -# Start/stop/restart i8kmon. - -I8KMON_PARAMS="--auto --daemon" - -# Start i8kmon -i8kmon_start() { - if [ -x /usr/bin/i8kmon -a -f /proc/i8k ]; then - echo "Starting i8kmon daemon: /usr/bin/i8kmon $I8KMON_PARAMS &" - /usr/bin/i8kmon $I8KMON_PARAMS & - fi -} - -# Stop i8kmon -i8kmon_stop() { - echo "Stopping i8kmon daemon" - pkill -f "tclsh /usr/bin/i8kmon $I8KMON_PARAMS" -} - -# Check status -i8kmon_status() { - pgrep -f "tclsh /usr/bin/i8kmon $I8KMON_PARAMS" > /dev/null - local I8KMON_STATUS=$? - if [ $I8KMON_STATUS -ne 0 ]; then - return 1 - fi -} - -# Restart i8kmon -i8kmon_restart() { - $0 stop - sleep 1 - $0 start -} - -case "$1" in -'start') - if ( ! i8kmon_status ); then - i8kmon_start - else - echo "i8kmon is already running" - fi - ;; - -'stop') - if ( i8kmon_status ); then - i8kmon_stop - else - echo "i8kmon is already stopped" - fi - ;; - -'status') - if ( i8kmon_status ); then - echo "i8kmon is currently running" - else - echo "i8kmon is NOT running" - fi - ;; - -'restart') - i8kmon_restart - ;; - -*) - echo "Usage: $0 start|stop|status|restart" - ;; -esac diff --git a/system/i8kutils/slack-desc b/system/i8kutils/slack-desc index db9ee18a3cf74..fa49b0e26e9d2 100644 --- a/system/i8kutils/slack-desc +++ b/system/i8kutils/slack-desc @@ -6,13 +6,13 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -i8kutils: i8kutils (utilities for Dell laptops) -i8kutils: -i8kutils: This package contains user-space programs for controlling the fans on -i8kutils: Dell laptops. -i8kutils: Homepage: https://launchpad.net/i8kutils +i8kutils: i8kutils (utility set to control fans on Dell) i8kutils: +i8kutils: i8kutils is a set of utilities used to control fan speed and some +i8kutils: other parameters on Dell laptops. i8kutils: +i8kutils: You might first need to turn off BIOS control by +i8kutils: dell_bios_fan_control. i8kutils: i8kutils: i8kutils: |