diff options
-rw-r--r-- | .SRCINFO | 40 | ||||
-rw-r--r-- | MKPKG | 5 | ||||
-rw-r--r-- | PKGBUILD | 71 | ||||
-rw-r--r-- | tlp-arch.patch | 41 |
4 files changed, 157 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..fe1b10ad6aaf --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,40 @@ +pkgbase = tlp-git + pkgver = 0.7.r1.3409912 + pkgrel = 1 + url = http://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html + arch = any + license = GPL2 + license = GPL3 + makedepends = git + source = tlp::git+https://github.com/linrunner/TLP.git#branch=devel + source = tlp-arch.patch + sha256sums = SKIP + sha256sums = 836a07ebb222d7d696ac33d8596a9b129debb70793bb4dbb6283ce8311ea303c + +pkgname = tlp-git + pkgdesc = Linux Advanced Power Management + depends = hdparm + depends = iw + depends = pciutils + depends = rfkill + depends = usbutils + depends = util-linux + optdepends = acpi_call: Sandy Bridge and newer ThinkPad battery functions + optdepends = ethtool: Disable Wake On Lan + optdepends = lsb-release: Display LSB release version in tlp-stat + optdepends = smartmontools: Display S.M.A.R.T. data in tlp-stat + optdepends = tp_smapi: ThinkPad battery functions + optdepends = x86_energy_perf_policy: Set energy versus performance policy on x86 processors + provides = tlp + conflicts = laptop-mode-tools + conflicts = pm-utils + conflicts = tlp + backup = etc/default/tlp + +pkgname = tlp-rdw-git + pkgdesc = Linux Advanced Power Management - Radio Device Wizard + depends = networkmanager + depends = tlp + provides = tlp-rdw + conflicts = tlp-rdw + diff --git a/MKPKG b/MKPKG new file mode 100644 index 000000000000..cbfebc8d68bf --- /dev/null +++ b/MKPKG @@ -0,0 +1,5 @@ +pkgname=('tlp-git' 'tlp-rdw-git') + +check_git $packagedir/tlp-git/tlp + +# vim: ts=2 sw=2 et: diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..87d76ea52aa7 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,71 @@ +# Maintainer: Maxime Gauduin <alucryd@archlinux.org> +# Contributor: Marc Schulte <bomba@nerdstube.de> + +pkgbase=tlp-git +pkgname=('tlp-git' 'tlp-rdw-git') +pkgver=0.7.r1.3409912 +pkgrel=1 +arch=('any') +url='http://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html' +license=('GPL2' 'GPL3') +makedepends=('git') +source=('tlp::git+https://github.com/linrunner/TLP.git#branch=devel' + 'tlp-arch.patch') +sha256sums=('SKIP' + '836a07ebb222d7d696ac33d8596a9b129debb70793bb4dbb6283ce8311ea303c') + +pkgver() { + cd tlp + + tag='0.7' + + echo "${tag}.r$(git rev-list --count ${tag}..HEAD).$(git rev-parse --short HEAD)" +} + +prepare() { + cd tlp + + patch -Np1 -i ../tlp-arch.patch +} + +package_tlp-git() { + pkgdesc='Linux Advanced Power Management' + depends=('hdparm' 'iw' 'pciutils' 'rfkill' 'usbutils' 'util-linux') + optdepends=('acpi_call: Sandy Bridge and newer ThinkPad battery functions' + 'ethtool: Disable Wake On Lan' + 'lsb-release: Display LSB release version in tlp-stat' + 'smartmontools: Display S.M.A.R.T. data in tlp-stat' + 'tp_smapi: ThinkPad battery functions' + 'x86_energy_perf_policy: Set energy versus performance policy on x86 processors') + provides=('tlp') + conflicts=('laptop-mode-tools' 'pm-utils' 'tlp') + backup=('etc/default/tlp') + + cd tlp + + export TLP_SBIN='/usr/bin' + export TLP_ULIB='/usr/lib/udev' + export TLP_SYSD='/usr/lib/systemd/system' + export TLP_NO_INIT='1' + export TLP_NO_PMUTILS='1' + export TLP_WITH_SYSTEMD='1' + + make DESTDIR="${pkgdir}" install-tlp + + install -dm 755 "${pkgdir}"/usr/share/man/man{1,8} + install -m 644 man/*.1 "${pkgdir}"/usr/share/man/man1/ + install -m 644 man/*.8 "${pkgdir}"/usr/share/man/man8/ +} + +package_tlp-rdw-git() { + pkgdesc='Linux Advanced Power Management - Radio Device Wizard' + depends=('networkmanager' 'tlp') + provides=('tlp-rdw') + conflicts=('tlp-rdw') + + cd tlp + + make DESTDIR="${pkgdir}" install-rdw +} + +# vim: ts=2 sw=2 et: diff --git a/tlp-arch.patch b/tlp-arch.patch new file mode 100644 index 000000000000..fbf3c6b31a3d --- /dev/null +++ b/tlp-arch.patch @@ -0,0 +1,41 @@ +diff -rupN tlp.orig/tlp.rules tlp/tlp.rules +--- tlp.orig/tlp.rules 2015-01-10 02:43:33.341388989 +0100 ++++ tlp/tlp.rules 2015-01-10 02:45:33.361390081 +0100 +@@ -4,7 +4,7 @@ + # This software is licensed under the GPL v2 or later. + + # handle change of power source ac/bat +-ACTION=="change", SUBSYSTEM=="power_supply", ATTR{type}=="Mains", RUN+="/usr/sbin/tlp auto" ++ACTION=="change", SUBSYSTEM=="power_supply", ATTR{type}=="Mains", RUN+="/usr/bin/tlp auto" + + # handle added usb devices (exclude subdevices via DRIVER=="USB") +-ACTION=="add", SUBSYSTEM=="usb", DRIVER=="usb", ENV{DEVTYPE}=="usb_device", RUN+="/lib/udev/tlp-usb-udev %p" ++ACTION=="add", SUBSYSTEM=="usb", DRIVER=="usb", ENV{DEVTYPE}=="usb_device", RUN+="/usr/lib/udev/tlp-usb-udev %p" +diff -rupN tlp.orig/tlp.service tlp/tlp.service +--- tlp.orig/tlp.service 2015-01-10 02:43:33.341388989 +0100 ++++ tlp/tlp.service 2015-01-10 02:43:48.678055785 +0100 +@@ -11,8 +11,8 @@ Before=shutdown.target + [Service] + Type=simple + RemainAfterExit=yes +-ExecStart=/usr/sbin/tlp init start +-ExecStop=/usr/sbin/tlp init stop ++ExecStart=/usr/bin/tlp init start ++ExecStop=/usr/bin/tlp init stop + + [Install] + WantedBy=multi-user.target +diff -rupN tlp.orig/tlp-sleep.service tlp/tlp-sleep.service +--- tlp.orig/tlp-sleep.service 2015-01-10 02:43:33.341388989 +0100 ++++ tlp/tlp-sleep.service 2015-01-10 02:43:48.678055785 +0100 +@@ -11,8 +11,8 @@ StopWhenUnneeded=yes + [Service] + Type=oneshot + RemainAfterExit=yes +-ExecStart=/usr/sbin/tlp suspend +-ExecStop=/usr/sbin/tlp resume ++ExecStart=/usr/bin/tlp suspend ++ExecStop=/usr/bin/tlp resume + + [Install] + WantedBy=sleep.target |