summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrederik2015-07-13 02:21:07 +0200
committerfrederik2015-07-13 02:21:07 +0200
commit0b2cb74044feb34589b32f45d664b2970ab25860 (patch)
tree0150edfc06078d29616ece65d6f3a433be7a6986
downloadaur-0b2cb74044feb34589b32f45d664b2970ab25860.tar.gz
initial commit
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD36
-rw-r--r--tlp.patch11
3 files changed, 66 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..64e0fcc1a6a3
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = tpacpi-bat-git
+ pkgdesc = A Perl script with ACPI calls for recent ThinkPads (such as T420 and W520) whose battery thresholds are not supported by tp_smapi
+ pkgver = 93.9374d51
+ pkgrel = 1
+ url = https://github.com/teleshoes/tpacpi-bat
+ arch = any
+ license = GPLv3
+ makedepends = git
+ depends = perl
+ depends = acpi_call
+ provides = tpacpi-bat
+ conflicts = tpacpi-bat
+ source = git://github.com/teleshoes/tpacpi-bat.git
+ source = tlp.patch
+ md5sums = SKIP
+ md5sums = 9799f80a35939a0dd009d05c94418fbf
+
+pkgname = tpacpi-bat-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1c8f28bc34e6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Lucky <archlinux@builds.lucky.li>
+
+pkgname=tpacpi-bat-git
+_pkgname="${pkgname%-*}"
+pkgver=93.9374d51
+pkgrel=1
+pkgdesc="A Perl script with ACPI calls for recent ThinkPads (such as T420 and W520) whose battery thresholds are not supported by tp_smapi"
+url="https://github.com/teleshoes/tpacpi-bat"
+license=("GPLv3")
+arch=("any")
+depends=("perl" "acpi_call")
+makedepends=("git")
+conflicts=("${_pkgname}")
+provides=("${_pkgname}")
+source=("git://github.com/teleshoes/tpacpi-bat.git"
+ "tlp.patch")
+md5sums=("SKIP"
+ "9799f80a35939a0dd009d05c94418fbf")
+
+pkgver() {
+ cd "${_pkgname}"
+ echo $(git rev-list --count master).$(git rev-parse --short master)
+}
+
+
+prepare() {
+ cd "${_pkgname}"
+# patch -uNp1 -i "${srcdir}/tlp.patch"
+}
+
+package() {
+ cd "${_pkgname}"
+
+ install -Dm755 "${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
+ install -Dm644 "${_pkgname%-*}.service" "${pkgdir}/usr/lib/systemd/system/${_pkgname}.service"
+}
diff --git a/tlp.patch b/tlp.patch
new file mode 100644
index 000000000000..36cefa300f1b
--- /dev/null
+++ b/tlp.patch
@@ -0,0 +1,11 @@
+diff --git a/tpacpi.service b/tpacpi.service
+index 4446b70..24ef8d6 100644
+--- a/tpacpi.service
++++ b/tpacpi.service
+@@ -1,5 +1,6 @@
+ [Unit]
+ Description=sets battery thresholds
++After=tlp.service
+
+ [Service]
+ Type=oneshot