summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Yan2018-06-29 02:40:36 +0800
committerFelix Yan2018-06-29 02:40:36 +0800
commit248020b49008b765c0bc1607837c6978234843b3 (patch)
tree18a08294518845be0540d25f1f7844dc3f9e65aa
downloadaur-248020b49008b765c0bc1607837c6978234843b3.tar.gz
addpkg: lenovo-throttling-fix-git 0.36.1f40f7d-1
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD40
2 files changed, 60 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..54ddffe82770
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+# Generated by mksrcinfo v8
+# Thu Jun 28 18:40:30 UTC 2018
+pkgbase = lenovo-throttling-fix-git
+ pkgdesc = Better aggregated chnroutes
+ pkgver = 0.36.1f40f7d
+ pkgrel = 1
+ url = https://github.com/erpalma/lenovo-throttling-fix
+ arch = any
+ license = MIT
+ makedepends = git
+ depends = python-dbus
+ depends = python-psutil
+ depends = python-gobject
+ depends = python-periphery
+ backup = etc/lenovo_fix.conf
+ source = git+https://github.com/erpalma/lenovo-throttling-fix.git
+ md5sums = SKIP
+
+pkgname = lenovo-throttling-fix-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ada68f8692d7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Felix Yan <felixonmars@archlinux.org>
+
+_pkgname=lenovo-throttling-fix
+pkgname=$_pkgname-git
+pkgver=0.36.1f40f7d
+pkgrel=1
+pkgdesc="Better aggregated chnroutes"
+arch=('any')
+url="https://github.com/erpalma/lenovo-throttling-fix"
+license=('MIT')
+depends=('python-dbus' 'python-psutil' 'python-gobject' 'python-periphery')
+makedepends=('git')
+backup=('etc/lenovo_fix.conf')
+source=("git+https://github.com/erpalma/${_pkgname}.git")
+md5sums=('SKIP')
+
+prepare() {
+ sed -i 's|ExecStart=.*|ExecStart=/usr/lib/lenovo_fix.py|' $_pkgname/systemd/lenovo_fix.service
+}
+
+build() {
+ cd $_pkgname
+ python -m compileall lenovo_fix.py
+}
+
+pkgver() {
+ cd $_pkgname
+ echo 0.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
+}
+
+package() {
+ cd $_pkgname
+ install -Dm644 etc/lenovo_fix.conf "$pkgdir"/etc/lenovo_fix.conf
+ install -Dm644 systemd/lenovo_fix.service "$pkgdir"/usr/lib/systemd/system/lenovo_fix.service
+ install -Dm755 lenovo_fix.py "$pkgdir"/usr/lib/lenovo_fix.py
+ cp -a __pycache__ "$pkgdir"/usr/lib/
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et: