diff options
Diffstat (limited to 'system/i8kutils/i8kutils.SlackBuild')
-rw-r--r-- | system/i8kutils/i8kutils.SlackBuild | 65 |
1 files changed, 28 insertions, 37 deletions
diff --git a/system/i8kutils/i8kutils.SlackBuild b/system/i8kutils/i8kutils.SlackBuild index c79162f7d8..ef4e46c12c 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 |