From 6960b719bf0d22aab8d177d69f8acfa4c5a2b5b6 Mon Sep 17 00:00:00 2001 From: Sergio Jimenez Date: Fri, 18 Jan 2013 00:03:15 +0100 Subject: [PATCH] Initial import for laptop-mode --- srcpkgs/laptop-mode/INSTALL | 14 ++++++++++++++ srcpkgs/laptop-mode/template | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 srcpkgs/laptop-mode/INSTALL create mode 100644 srcpkgs/laptop-mode/template diff --git a/srcpkgs/laptop-mode/INSTALL b/srcpkgs/laptop-mode/INSTALL new file mode 100644 index 0000000000..e512104f1a --- /dev/null +++ b/srcpkgs/laptop-mode/INSTALL @@ -0,0 +1,14 @@ +case $ACTION in +post) + cat <<_EOF +=========================================================================== + +A systemd service has been installed for ${PKGNAME}-${VERSION}: + + $ systemctl enable laptop-mode.service + $ systemctl start laptop-mode.service + +=========================================================================== +_EOF + ;; +esac diff --git a/srcpkgs/laptop-mode/template b/srcpkgs/laptop-mode/template new file mode 100644 index 0000000000..42d78209f0 --- /dev/null +++ b/srcpkgs/laptop-mode/template @@ -0,0 +1,32 @@ +# Template file for 'laptop-mode' +pkgname=laptop-mode +version=1.62 +revision=1 +wrksrc=$pkgname-tools_$version +noarch=yes +short_desc="Laptop power saving package for Linux systems" +maintainer="tripledes " +license="GPL-2" +homepage="http://samwel.tk/laptop_mode/" +distfiles="${homepage}/tools/downloads/$pkgname-tools_$version.tar.gz" +checksum=d40b3d2fb4dc120b4a427ef7dbddc9dd4d9ea0c475685538d36d3457b39158cd +fulldepends="acpid hdparm sdparm wireless_tools xset bluez" +conf_files="/etc/laptop-mode/lm-profiler.conf /etc/laptop-mode/conf.d/lcd-brightness.conf /etc/laptop-mode/conf.d/video-out.conf + /etc/laptop-mode/conf.d/wireless-iwl-power.conf /etc/laptop-mode/conf.d/nmi-watchdog.conf /etc/laptop-mode/conf.d/dpms-standby.conf + /etc/laptop-mode/conf.d/runtime-pm.conf /etc/laptop-mode/conf.d/ethernet.conf /etc/laptop-mode/conf.d/eee-superhe.conf + /etc/laptop-mode/conf.d/hal-polling.conf /etc/laptop-mode/conf.d/cpufreq.conf /etc/laptop-mode/conf.d/battery-level-polling.conf + /etc/laptop-mode/conf.d/intel-hda-powersave.conf /etc/laptop-mode/conf.d/configuration-file-control.conf /etc/laptop-mode/conf.d/bluetooth.conf + /etc/laptop-mode/conf.d/usb-autosuspend.conf /etc/laptop-mode/conf.d/wireless-ipw-power.conf /etc/laptop-mode/conf.d/start-stop-programs.conf + /etc/laptop-mode/conf.d/ac97-powersave.conf /etc/laptop-mode/conf.d/auto-hibernate.conf /etc/laptop-mode/conf.d/intel-sata-powermgmt.conf + /etc/laptop-mode/conf.d/wireless-power.conf /etc/laptop-mode/conf.d/sched-smt-power-savings.conf /etc/laptop-mode/conf.d/sched-mc-power-savings.conf + /etc/laptop-mode/conf.d/terminal-blanking.conf /etc/laptop-mode/conf.d/exec-commands.conf /etc/laptop-mode/laptop-mode.conf" + +do_install() +{ + export DESTDIR=${XBPS_DESTDIR}/${pkgname}-${version} ACPI=force APM=disabled PMU=disabled INIT_D=none + sed -i 's|/etc/udev|/usr/lib/udev|g' install.sh + # see /lib -> /usr/lib move + sed -i 's|DESTDIR/lib|DESTDIR/usr/lib|g' install.sh + sed -i 's|/lib|/usr/lib|g' etc/rules/99-laptop-mode.rules + $wrksrc/install.sh +}