mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
system/thermal-daemon: Miscellaneous cleanups
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
parent
6a529b5875
commit
322cfb172d
4 changed files with 37 additions and 21 deletions
|
@ -1,16 +1,13 @@
|
|||
The Linux Thermal Daemon program from 01.org
|
||||
|
||||
Thermald deals with thermal issues for intel processor families codenamed
|
||||
intel sandy-bridge and above.
|
||||
Its is a Linux daemon used to prevent the overheating of systems.
|
||||
This daemon monitors temperature and applies compensation using available
|
||||
cooling methods.
|
||||
Thermald deals with thermal issues for intel processor families
|
||||
codenamed intel sandy-bridge and above. It is a Linux daemon
|
||||
used to prevent the overheating of systems. This daemon monitors
|
||||
temperature and applies compensation using available cooling methods.
|
||||
|
||||
Prerequisites:
|
||||
Prerequisites: intel p-state driver and kernel 3.10+
|
||||
|
||||
Uses intel p-state driver and works with kernels 3.10 and above.
|
||||
|
||||
Prefers kernel with
|
||||
Prefers kernel with:
|
||||
Intel RAPL power capping driver : Available from Linux kernel 3.13.rc1
|
||||
Intel P State driver (Available in Linux kernel stable release)
|
||||
Intel Power clamp driver (Available in Linux kernel stable release)
|
||||
|
@ -18,6 +15,4 @@ Prefers kernel with
|
|||
CONFIG_X86_MSR, so that x86 MSR can be read/write from user space
|
||||
to control RAPL if no RAPL powecap class driver is not present.
|
||||
|
||||
Default
|
||||
If none of the above is available uses cpufreq to control P states.
|
||||
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
Since this is a daemon, it should be started at boot via /etc/rc.d/rc.local :
|
||||
/usr/bin/thermald
|
||||
Since this is a daemon, it should be started at boot via /etc/rc.d/rc.local:
|
||||
/usr/bin/thermald
|
||||
|
||||
It might be necessary to create /var/run/thermald/ first (depending on your
|
||||
local system setup)
|
||||
|
||||
Also it would need to be stopped before shutdown, so an entry could be added
|
||||
to /etc/rc.d/rc.local_shutdown as well :
|
||||
killall thermald
|
||||
to /etc/rc.d/rc.local_shutdown as well:
|
||||
killall thermald
|
||||
|
||||
CONFIG_X86_MSR is listed as an (optional) dependency, msr-tools
|
||||
can be installed from http://01.org/msr-tools via src2pkg (www.src2pkg.net/)
|
||||
|
||||
If you installed a previous version of thermald, you may need to uninstall
|
||||
it one and then re-install this one instead of upgrading.
|
||||
it and then install this one instead of using upgradepkg
|
||||
|
|
16
system/thermal_daemon/doinst.sh
Normal file
16
system/thermal_daemon/doinst.sh
Normal file
|
@ -0,0 +1,16 @@
|
|||
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...
|
||||
}
|
||||
|
||||
config etc/thermald/thermal-conf.xml.new
|
||||
config etc/thermald/thermal-cpu-cdev-order.xml.new
|
||||
|
|
@ -86,9 +86,12 @@ find -L . \
|
|||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
#Remove /etc/init and systemd stuff
|
||||
# Remove /etc/init but keep dbus config
|
||||
rm -r $PKG/etc/init
|
||||
rm -r $PKG/etc/dbus-1
|
||||
|
||||
# Don't clobber configs
|
||||
mv $PKG/etc/thermald/thermal-conf.xml $PKG/etc/thermald/thermal-conf.xml.new
|
||||
mv $PKG/etc/thermald/thermal-cpu-cdev-order.xml $PKG/etc/thermald/thermal-cpu-cdev-order.xml.new
|
||||
|
||||
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
|
||||
|
@ -97,13 +100,12 @@ 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.txt \
|
||||
$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a COPYING README.txt $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
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}
|
||||
|
|
Loading…
Reference in a new issue