Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=a7bd63c5fa8a2409797e831ef5e93ac47c8598ff
commit a7bd63c5fa8a2409797e831ef5e93ac47c8598ff Author: Devil505 <devil505li...@gmail.com> Date: Sat Sep 10 20:58:43 2011 +0200 laptop-mode-tools-1.59-1-i686 * new package diff --git a/source/apps-extra/laptop-mode-tools/FrugalBuild b/source/apps-extra/laptop-mode-tools/FrugalBuild new file mode 100644 index 0000000..b7ccee2 --- /dev/null +++ b/source/apps-extra/laptop-mode-tools/FrugalBuild @@ -0,0 +1,55 @@ +# Compiling Time: 0.01 SBU +# Maintainer: Devil505 <devil505li...@gmail.com> + +pkgname=laptop-mode-tools +pkgver=1.59 +pkgrel=1 +pkgdesc="A kernel mode that allows you to extend the battery life of your laptop" +url="http://www.samwel.tk/laptop_mode/" +depends=('hdparm' 'acpid') +backup=(etc/laptop-mode/conf.d/ac97-powersave.conf + etc/laptop-mode/conf.d/auto-hibernate.conf + etc/laptop-mode/conf.d/battery-level-polling.conf + etc/laptop-mode/conf.d/bluetooth.conf + etc/laptop-mode/conf.d/configuration-file-control.conf + etc/laptop-mode/conf.d/cpufreq.conf + etc/laptop-mode/conf.d/dpms-standby.conf + etc/laptop-mode/conf.d/eee-superhe.conf + etc/laptop-mode/conf.d/ethernet.conf + etc/laptop-mode/conf.d/exec-commands.conf + etc/laptop-mode/conf.d/hal-polling.conf + etc/laptop-mode/conf.d/intel-hda-powersave.conf + etc/laptop-mode/conf.d/intel-sata-powermgmt.conf + etc/laptop-mode/conf.d/lcd-brightness.conf + etc/laptop-mode/conf.d/nmi-watchdog.conf + etc/laptop-mode/conf.d/runtime-pm.conf + etc/laptop-mode/conf.d/sched-mc-power-savings.conf + etc/laptop-mode/conf.d/sched-smt-power-savings.conf + etc/laptop-mode/conf.d/start-stop-programs.conf + etc/laptop-mode/conf.d/terminal-blanking.conf + etc/laptop-mode/conf.d/usb-autosuspend.conf + etc/laptop-mode/conf.d/video-out.conf + etc/laptop-mode/conf.d/wireless-ipw-power.conf + etc/laptop-mode/conf.d/wireless-iwl-power.conf + etc/laptop-mode/conf.d/wireless-power.conf + etc/laptop-mode/laptop-mode.conf + etc/laptop-mode/lm-profiler.conf) +groups=('apps-extra') +archs=('i686' 'x86_64') +Fpkgversep="_" +up2date="Flasttar $url/packages/tarball" +source=($url/tools/downloads/${pkgname}_${pkgver}.tar.gz $pkgname.service) +sha1sums=('332399aace420733ccfa9557fd8d316570153a7c' \ + 'e5c4cf8d19dd461c1bb21e6092b28549b1098602') + +build() { + Fcd ${pkgname}-${pkgver} + Fsed "etc/udev" "lib/udev" install.sh + make DESTDIR="$Fdestdir" INIT_D=none MAN_D=/usr/share/man install || Fdie + Fmkdir /etc/tmpfiles.d + cat > $Fdestdir/etc/tmpfiles.d/laptop-mode-tools.conf << EOF +d $Flocalstatedir/run/laptop-mode-tools 0755 root root - +EOF + Fmkdir lib/systemd/system/ + Finstall 0644 $pkgname.service /lib/systemd/system/$pkgname.service +} diff --git a/source/apps-extra/laptop-mode-tools/laptop-mode-tools.install b/source/apps-extra/laptop-mode-tools/laptop-mode-tools.install new file mode 100644 index 0000000..0c28084 --- /dev/null +++ b/source/apps-extra/laptop-mode-tools/laptop-mode-tools.install @@ -0,0 +1,35 @@ +post_install() +{ + update_host + systemctl daemon-reload >/dev/null 2>&1 + echo "To enable laptop-mode-tools on boot:" + echo "systemctl enable laptop-mode-tools.service" + #systemctl enable laptop-mode-tools.service >/dev/null 2>&1 +} + +post_upgrade() +{ + systemctl daemon-reload >/dev/null 2>&1 + systemctl try-restart laptop-mode-tools.service >/dev/null 2>&1 + echo "To enable laptop-mode-tools on boot:" + echo "systemctl enable laptop-mode-tools.service" + #systemctl enable laptop-mode-tools.service >/dev/null 2>&1 +} + +pre_remove() +{ + systemctl stop laptop-mode-tools.service >/dev/null 2>&1 + systemctl disable laptop-mode-tools.service >/dev/null 2>&1 +} + +post_remove() +{ + systemctl daemon-reload >/dev/null 2>&1 +} + +op=$1 +shift + +$op $* + +# vim: ft=sh diff --git a/source/apps-extra/laptop-mode-tools/laptop-mode-tools.service b/source/apps-extra/laptop-mode-tools/laptop-mode-tools.service new file mode 100644 index 0000000..8704d2b --- /dev/null +++ b/source/apps-extra/laptop-mode-tools/laptop-mode-tools.service @@ -0,0 +1,15 @@ +[Unit] +Description=Laptop Power Saving Tools +After=acpid.service +Wants=acpid.service + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStartPre=/bin/touch /var/run/laptop-mode-tools/enabled +ExecStart=/usr/sbin/laptop_mode auto +ExecStop=/usr/sbin/laptop_mode stop +ExecStopPost=/bin/rm -f /var/run/laptop-mode-tools/enabled + +[Install] +WantedBy=multi-user.target _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git