2013-08-24 06:26:07 +00:00
|
|
|
# Template file for 'tlp'
|
|
|
|
pkgname=tlp
|
2014-03-24 22:53:53 +00:00
|
|
|
version=0.5
|
2013-08-24 06:26:07 +00:00
|
|
|
revision=1
|
|
|
|
makedepends="hdparm bash iw rfkill ethtool upower"
|
2014-01-01 15:10:11 +00:00
|
|
|
depends="${makedepends}"
|
|
|
|
conf_files="/etc/default/tlp"
|
|
|
|
conflicts="laptop-mode>=0"
|
|
|
|
noarch="yes"
|
2013-08-24 06:26:07 +00:00
|
|
|
short_desc="Advanced power management tool for Linux"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
license="GPL-2"
|
|
|
|
homepage="http://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html"
|
|
|
|
|
|
|
|
do_fetch() {
|
|
|
|
git clone -b${version} git://github.com/linrunner/TLP.git tlp-${version}
|
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
sed -i -e 's|/lib/udev|/usr/lib/udev/|' Makefile
|
|
|
|
sed -i -e 's|/usr/sbin/|/usr/bin|' Makefile
|
|
|
|
sed -i -e 's|$(SBIN)|$(BIN)|' Makefile
|
|
|
|
sed -i -e 's|SBIN = $(DESTDIR)/usr/sbin||' Makefile
|
|
|
|
sed -i -e 's|/usr/sbin/|/usr/bin/|' tlp.service
|
|
|
|
sed -i -e 's|/usr/sbin/tlp|/usr/bin/tlp|' tlp.rules
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
make DESTDIR=${DESTDIR} install-tlp
|
|
|
|
|
|
|
|
vmkdir usr/share/man/man1
|
|
|
|
install -m644 man/*.1 ${DESTDIR}/usr/share/man/man1
|
|
|
|
vmkdir usr/share/man/man8
|
|
|
|
install -m644 man/*.8 ${DESTDIR}/usr/share/man/man8
|
|
|
|
|
|
|
|
vmkdir usr/lib/systemd/system
|
|
|
|
vinstall tlp.service 644 usr/lib/systemd/system
|
|
|
|
vinstall tlp-sleep.service 644 usr/lib/systemd/system
|
|
|
|
|
|
|
|
vmkdir usr/share/bash-completion/completions
|
|
|
|
mv ${DESTDIR}/etc/bash_completion.d/tlp ${DESTDIR}/usr/share/bash-completion/completions
|
|
|
|
|
|
|
|
rm -rf ${DESTDIR}/etc/init.d ${DESTDIR}/usr/lib/pm-utils
|
|
|
|
}
|