summaryrefslogtreecommitdiffstats
path: root/system/i8kutils/i8kutils.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/i8kutils/i8kutils.SlackBuild')
-rw-r--r--system/i8kutils/i8kutils.SlackBuild81
1 files changed, 41 insertions, 40 deletions
diff --git a/system/i8kutils/i8kutils.SlackBuild b/system/i8kutils/i8kutils.SlackBuild
index d3c83313ba..ef4e46c12c 100644
--- a/system/i8kutils/i8kutils.SlackBuild
+++ b/system/i8kutils/i8kutils.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/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,26 +22,36 @@
# 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=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -59,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 {} \;
+ \( -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 {} \;
-# Take care of creating required directory tree into $PKG, since Makefile doesn't
-mkdir -p $PKG/{etc,usr/{bin,man/man1}}
+make
+mkdir -p $PKG/usr/sbin
+cp i8kctl $PKG/usr/sbin/
-# 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
+gzip i8kctl.1
+gzip i8kmon.1
+mkdir -p $PKG/usr/man/man1
+cp i8kctl.1.gz i8kmon.1.gz $PKG/usr/man/man1/
-make CFLAGS="$SLKCFLAGS -std=gnu89"
-
-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:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE