summaryrefslogtreecommitdiffstats
path: root/system/TLP/TLP.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/TLP/TLP.SlackBuild')
-rw-r--r--system/TLP/TLP.SlackBuild27
1 files changed, 8 insertions, 19 deletions
diff --git a/system/TLP/TLP.SlackBuild b/system/TLP/TLP.SlackBuild
index bd511beb50..d68d68cdbf 100644
--- a/system/TLP/TLP.SlackBuild
+++ b/system/TLP/TLP.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for TLP
-# Copyright 2013-2019 Aaditya Bagga <aaditya_gnulinux@zoho.com>
+# Copyright 2013-2022 Aaditya <aaditya_gnulinux@zoho.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,8 +25,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=TLP
-VERSION=${VERSION:-1.2.2}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-1.5.0}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -38,9 +38,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
@@ -79,23 +76,15 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Switch to rc.d
-sed 's/init.d/rc.d/' -i Makefile
-
-# Fix for x86_64
-sed "s/usr\/lib/usr\/lib${LIBDIRSUFFIX}/" -i Makefile
-
-# Correct sourcing of non-existant file
-sed 's|. \/lib\/lsb\/init-functions|#. \/lib\/lsb\/init-functions|' -i tlp.init
+# Slackware specific
+sed 's|init.d|rc.d|' -i Makefile
+sed "s|/lib/elogind|/lib${LIBDIRSUFFIX}/elogind|" -i Makefile
export TLP_MAN=/usr/man
make install-tlp install-man DESTDIR=$PKG
-# Install tlp pm-utils hook as we dont have elogind
-install -D -m 755 $CWD/49tlp $PKG/usr/lib${LIBDIRSUFFIX}/pm-utils/sleep.d/49tlp
-
# Don't clobber configs
-mv $PKG/etc/default/tlp $PKG/etc/default/tlp.new
+mv $PKG/etc/tlp.conf $PKG/etc/tlp.conf.new
# move to rc.tlp
mv $PKG/etc/rc.d/tlp $PKG/etc/rc.d/rc.tlp.new
@@ -105,7 +94,7 @@ 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 COPYING LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION
+cp COPYING LICENSE README.rst $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install