From a376e517ac04b6d7d94bbf858051026872a535ed Mon Sep 17 00:00:00 2001 From: Aaditya Bagga Date: Mon, 15 Aug 2022 23:40:42 +0530 Subject: system/TLP: Updated for version 1.5.0. Signed-off-by: Willy Sudiarto Raharjo --- system/TLP/49tlp | 22 ---------------------- system/TLP/README | 20 +++++++++----------- system/TLP/README.Slackware | 22 ++++++++++++++-------- system/TLP/TLP.SlackBuild | 20 ++++---------------- system/TLP/TLP.info | 6 +++--- system/TLP/doinst.sh | 2 +- system/TLP/slack-desc | 14 +++++++------- 7 files changed, 38 insertions(+), 68 deletions(-) delete mode 100644 system/TLP/49tlp (limited to 'system/TLP') diff --git a/system/TLP/49tlp b/system/TLP/49tlp deleted file mode 100644 index bfe0e81af10f..000000000000 --- a/system/TLP/49tlp +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# tlp - handle suspend/hibernate/resume tasks -# -# Copyright (c) 2018 Thomas Koch -# This software is licensed under the GPL v2 or later. - -. "${PM_FUNCTIONS}" - -case $1 in - hibernate|suspend) - tlp suspend - ;; - - thaw|resume) - tlp resume - ;; - - *) exit $NA - ;; -esac - -exit 0 diff --git a/system/TLP/README b/system/TLP/README index 7a6c61fa0b56..cf948f65de81 100644 --- a/system/TLP/README +++ b/system/TLP/README @@ -1,16 +1,14 @@ -TLP implements advanced power management for Linux. +TLP is a command line tool for optimizing power usage, +relevant for laptops. -It is a command line tool with automated background tasks, -does not contain a GUI. +The default settings are optimized, and customization can be done +by editing TLP's configuration file(s). -Remove any power saving settings/scripts (e.g.: in /etc/rc.local), -and uninstall laptop-mode-tools prior installing or TLP may not work -properly. +Note - Remove any power saving settings/scripts (e.g.: in /etc/rc.local), +and uninstall laptop-mode-tools to allow TLP to work properly. -See README.SLACKWARE for more information about post-installation -script. +See README.SLACKWARE for post-installation instructions. -An additional configuration is available for Thinkpads. See the -website for more details: +Additional configuration is available for Thinkpads. -http://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html +Website: https://linrunner.de/tlp/ diff --git a/system/TLP/README.Slackware b/system/TLP/README.Slackware index 34e8b4723d4d..a028a1b3373a 100644 --- a/system/TLP/README.Slackware +++ b/system/TLP/README.Slackware @@ -10,13 +10,19 @@ chmod +x /etc/rc.d/rc.tlp /etc/rc.d/rc.acpid restart # Configure tlp to be run at startup -add "/etc/rc.d/rc.tlp start" (without quotes) to /etc/rc.d/rc.local +Add the following to /etc/rc.d/rc.local -After removal of this package you would need to revert the above -changes. Please make sure that you stopped the TLP service before -removing TLP. +if [ -x /etc/rc.d/rc.tlp ]; then + /etc/rc.d/rc.tlp start +fi -If you have enabled any hooks in /usr/lib/pm-utils/power.d/ (they are -disabled by default), then the instructions given in the TLP developer -documentation can be followed. -http://linrunner.de/en/tlp/docs/tlp-developer-documentation.html#installscripts +After removal of the package revert the above changes. +Make sure to stop the service before uninstalling. + +If any hooks in /usr/lib/pm-utils/power.d/ have been enabled (disabled by default), +the instructions in the developer documentation can be followed: + +https://web.archive.org/web/20180514003235/https://linrunner.de/en/tlp/docs/tlp-developer-documentation.html#installscripts + +TLP configuration moved from /etc/default/tlp to /etc/tlp.conf +since version 1.3.0. \ No newline at end of file diff --git a/system/TLP/TLP.SlackBuild b/system/TLP/TLP.SlackBuild index bd511beb50b9..ab42cf209d36 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 +# Copyright 2013-2022 Aaditya Bagga # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=TLP -VERSION=${VERSION:-1.2.2} +VERSION=${VERSION:-1.5.0} BUILD=${BUILD:-1} 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 @@ -82,20 +79,11 @@ find -L . \ # 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 - 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 +93,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 diff --git a/system/TLP/TLP.info b/system/TLP/TLP.info index bd380f406f19..ce0458a2779a 100644 --- a/system/TLP/TLP.info +++ b/system/TLP/TLP.info @@ -1,8 +1,8 @@ PRGNAM="TLP" -VERSION="1.2.2" +VERSION="1.5.0" HOMEPAGE="https://github.com/linrunner/TLP" -DOWNLOAD="https://github.com/linrunner/TLP/archive/1.2.2.tar.gz" -MD5SUM="23dc1b2edcf4d01a37c67b12f023df22" +DOWNLOAD="https://github.com/linrunner/TLP/archive/1.5.0.tar.gz" +MD5SUM="2f1cb91290ee7df54acf29ea8f780379" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/system/TLP/doinst.sh b/system/TLP/doinst.sh index d21b756e2afd..ae35cd7c56b5 100644 --- a/system/TLP/doinst.sh +++ b/system/TLP/doinst.sh @@ -22,5 +22,5 @@ preserve_perms() { config $NEW } -config etc/default/tlp.new +config etc/tlp.conf.new preserve_perms etc/rc.d/rc.tlp.new diff --git a/system/TLP/slack-desc b/system/TLP/slack-desc index 16b264494e43..6eb81a36c4cd 100644 --- a/system/TLP/slack-desc +++ b/system/TLP/slack-desc @@ -6,14 +6,14 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -TLP: TLP (Advanced Power Management Tool) +TLP: TLP (Optimize power usage) TLP: -TLP: TLP brings you the benefits of advanced power management for Linux +TLP: TLP brings the benefits of advanced power management for Linux TLP: without the need to understand every technical detail. -TLP: TLP comes with a default configuration already optimized for battery -TLP: life, so you may just install and forget it. -TLP: Nevertheless TLP is highly customizable to fulfil your specific -TLP: requirements. TLP: -TLP: Website - https://linrunner.de/en/tlp/tlp.html +TLP: It comes with a default configuration already optimized for battery +TLP: life. Customization can be done by editing its config files. +TLP: +TLP: Website: https://linrunner.de/tlp/ +TLP: TLP: -- cgit v1.2.3