mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
system/TLP: Updated for version 0.5.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
439167b133
commit
1dd344df33
3 changed files with 36 additions and 6 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Slackware build script for TLP
|
||||
|
||||
# Copyright 2013 Aaditya Bagga <aaditya_gnulinux@zoho.com>
|
||||
# Copyright 2013-2014 Aaditya Bagga <aaditya_gnulinux@zoho.com>
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
|
@ -23,7 +23,7 @@
|
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
PRGNAM=TLP
|
||||
VERSION=${VERSION:-0.4.1}
|
||||
VERSION=${VERSION:-0.5}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
|
@ -84,6 +84,9 @@ make install-tlp DESTDIR=$PKG
|
|||
# move to rc.tlp
|
||||
mv $PKG/etc/rc.d/tlp $PKG/etc/rc.d/rc.tlp
|
||||
|
||||
# Don't clobber configs
|
||||
mv $PKG/etc/default/tlp $PKG/etc/default/tlp.new
|
||||
|
||||
# install man files
|
||||
mkdir -p $PKG/usr/man/man{1,8}
|
||||
install -m 644 man/bluetooth.1 $PKG/usr/man/man1/
|
||||
|
@ -106,6 +109,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|||
|
||||
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}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
PRGNAM="TLP"
|
||||
VERSION="0.4.1"
|
||||
VERSION="0.5"
|
||||
HOMEPAGE="http://linrunner.de/en/tlp/tlp.html"
|
||||
DOWNLOAD="https://github.com/linrunner/TLP/archive/0.4.1.tar.gz"
|
||||
MD5SUM="43cb7a875e4237cbb1392294585ccc4f"
|
||||
DOWNLOAD="https://github.com/linrunner/TLP/archive/0.5.tar.gz"
|
||||
MD5SUM="93b2162cb278b3b5757d701edf2e1f7a"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
MAINTAINER="aaditya"
|
||||
MAINTAINER="Aaditya Bagga"
|
||||
EMAIL="aaditya_gnulinux@zoho.com"
|
||||
|
|
26
system/TLP/doinst.sh
Normal file
26
system/TLP/doinst.sh
Normal file
|
@ -0,0 +1,26 @@
|
|||
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...
|
||||
}
|
||||
|
||||
preserve_perms() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
if [ -e $OLD ]; then
|
||||
cp -a $OLD ${NEW}.incoming
|
||||
cat $NEW > ${NEW}.incoming
|
||||
mv ${NEW}.incoming $NEW
|
||||
fi
|
||||
config $NEW
|
||||
}
|
||||
|
||||
config etc/default/tlp.new
|
||||
preserve_perms etc/rc.d/rc.tlp.new
|
Loading…
Reference in a new issue