diff options
author | Thomas Krug | 2015-06-14 20:55:49 +0200 |
---|---|---|
committer | Thomas Krug | 2015-06-14 20:55:49 +0200 |
commit | f65d5a01950768181dc75a9477d067ba63a5027a (patch) | |
tree | 2e415c8df56007e73ce473a7ce4986d3ae42f226 | |
download | aur-f65d5a01950768181dc75a9477d067ba63a5027a.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | 90-acpi_call.rules | 1 | ||||
-rw-r--r-- | 90-tp_smapi.rules | 4 | ||||
-rw-r--r-- | PKGBUILD | 63 | ||||
-rw-r--r-- | tp-battery-icon.desktop | 9 | ||||
-rw-r--r-- | tp-battery-icon.install | 13 |
6 files changed, 114 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..682bde8cf413 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = tp-battery-icon-git + pkgdesc = A simple yet powerful tray icon, using tp_smapi or acpi_call. + pkgver = 20121115 + pkgrel = 2 + url = https://github.com/phragment/tp-battery-icon + install = tp-battery-icon.install + arch = any + license = GPL3 + makedepends = git + depends = python + depends = python-gobject + optdepends = tp_smapi: support for pre Sandy Bridge ThinkPads + optdepends = acpi_call: support for newer ThinkPads + provides = tp-battery-icon + conflicts = tp-battery-icon + source = tp-battery-icon.desktop + source = 90-tp_smapi.rules + source = 90-acpi_call.rules + md5sums = 55013014907d603bc3b1621cbf17f92c + md5sums = db0364032a7d0625bcc27f519428f9ff + md5sums = 67f7ee0c792f515195fba26d26449ca6 + +pkgname = tp-battery-icon-git + diff --git a/90-acpi_call.rules b/90-acpi_call.rules new file mode 100644 index 000000000000..c0f552c9eea0 --- /dev/null +++ b/90-acpi_call.rules @@ -0,0 +1 @@ +SUBSYSTEM=="module", DEVPATH=="/module/acpi_call", RUN+="/bin/sh -c 'find /proc/acpi -name call | xargs /bin/chmod 666'" diff --git a/90-tp_smapi.rules b/90-tp_smapi.rules new file mode 100644 index 000000000000..1f0e3b7a950f --- /dev/null +++ b/90-tp_smapi.rules @@ -0,0 +1,4 @@ +DRIVER=="smapi", RUN+="/bin/sh -c 'find /sys/devices/platform/smapi/ -name force_discharge | xargs /bin/chmod 666'" +DRIVER=="smapi", RUN+="/bin/sh -c 'find /sys/devices/platform/smapi/ -name start_charge_thresh | xargs /bin/chmod 666'" +DRIVER=="smapi", RUN+="/bin/sh -c 'find /sys/devices/platform/smapi/ -name stop_charge_thresh | xargs /bin/chmod 666'" + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c43a27c20227 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Thomas Krug <t.krug@elektronenpumpe.de> +# Contributor: Thomas Krug <t.krug@elektronenpumpe.de> + +pkgname=tp-battery-icon-git +pkgver=20121115 +pkgrel=2 +pkgdesc="A simple yet powerful tray icon, using tp_smapi or acpi_call." +arch=('any') +url="https://github.com/phragment/tp-battery-icon" +license=('GPL3') +depends=('python' 'python-gobject') +optdepends=('tp_smapi: support for pre Sandy Bridge ThinkPads' + 'acpi_call: support for newer ThinkPads') +makedepends=('git') +provides=('tp-battery-icon') +conflicts=('tp-battery-icon') +install=tp-battery-icon.install +source=('tp-battery-icon.desktop' + '90-tp_smapi.rules' + '90-acpi_call.rules') +md5sums=('55013014907d603bc3b1621cbf17f92c' + 'db0364032a7d0625bcc27f519428f9ff' + '67f7ee0c792f515195fba26d26449ca6') + +_gitroot=git://github.com/phragment/tp-battery-icon.git +_gitname=tp-battery-icon-git + +build() { + cd "$srcdir" + msg "Connecting to GIT server...." + + if [[ -d "$_gitname" ]]; then + cd "$_gitname" && git pull origin + msg "The local files are updated." + else + git clone "$_gitroot" "$_gitname" + fi + + msg "GIT checkout done or server timeout" + msg "Starting build..." + + rm -rf "$srcdir/$_gitname-build" + git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" + cd "$srcdir/$_gitname-build" + + # nothing to do here +} + +package() { + cd "$srcdir/$_gitname-build" + + install -D -m755 "tp-battery-icon.py" "$pkgdir/usr/bin/tp-battery-icon" + install -D -m644 "tp-battery-icon.svg" "$pkgdir/usr/share/pixmaps/tp-battery-icon.svg" + cp -r "icons/" "$pkgdir/usr/share/pixmaps/tp-battery-icons/" + + install -D -m644 "$srcdir/tp-battery-icon.desktop" "$pkgdir/usr/share/applications/tp-battery-icon.desktop" + install -D -m644 "$srcdir/tp-battery-icon.desktop" "$pkgdir/etc/xdg/autostart/tp-battery-icon.desktop" + + install -D -m644 "$srcdir/90-tp_smapi.rules" "$pkgdir/usr/lib/udev/rules.d/90-tp_smapi.rules" + install -D -m644 "$srcdir/90-acpi_call.rules" "$pkgdir/usr/lib/udev/rules.d/90-acpi_call.rules" +} + +# vim:set ts=2 sw=2 et: diff --git a/tp-battery-icon.desktop b/tp-battery-icon.desktop new file mode 100644 index 000000000000..7ef68b05a462 --- /dev/null +++ b/tp-battery-icon.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=ThinkPad Battery Icon +Comment=A simple yet powerful tray icon, using tp_smapi or acpi_call. +Exec=tp-battery-icon +Terminal=false +Type=Application +Icon=tp-battery-icon +Categories=GTK; +StartupNotify=false diff --git a/tp-battery-icon.install b/tp-battery-icon.install new file mode 100644 index 000000000000..a6a73e84bb47 --- /dev/null +++ b/tp-battery-icon.install @@ -0,0 +1,13 @@ +post_install() { + update-desktop-database -q +} + +post_upgrade(){ + update-desktop-database -q +} + +post_remove() { + update-desktop-database -q +} + +# vim:set ts=2 sw=2 et: |