summaryrefslogtreecommitdiff
path: root/extra/xfce4-battery-plugin
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2012-02-28 12:05:35 +0100
committerMichał Masłowski <mtjm@mtjm.eu>2012-02-28 12:05:35 +0100
commit7cd4823a20b85a5e516ae51fc04a4d1b72b5d0b9 (patch)
tree31c86c3a5284a8b8a7f1720d27ce9e5dbf09fee4 /extra/xfce4-battery-plugin
parentd17a0ec458b03b0ed38eff13d399567f36156a73 (diff)
parent1f567a9d58d16b76320168f0624aa55bd6320284 (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts: community/cairo-clock/PKGBUILD community/flashrom/PKGBUILD community/kmess/PKGBUILD core/tzdata/PKGBUILD extra/gc/PKGBUILD extra/libsigc++/PKGBUILD extra/libxcomposite/PKGBUILD extra/libxdmcp/PKGBUILD extra/libxevie/PKGBUILD extra/libxext/PKGBUILD extra/libxinerama/PKGBUILD extra/libxkbfile/PKGBUILD extra/libxpm/PKGBUILD extra/libxres/PKGBUILD extra/libxss/PKGBUILD extra/libxt/PKGBUILD extra/libxtst/PKGBUILD extra/libxv/PKGBUILD extra/libxvmc/PKGBUILD extra/llvm/PKGBUILD extra/pdns-recursor/PKGBUILD extra/pdns/PKGBUILD extra/procmail/PKGBUILD extra/ptlib/PKGBUILD extra/pycrypto/PKGBUILD extra/pyorbit/PKGBUILD extra/vlc/PKGBUILD extra/xfce4-battery-plugin/PKGBUILD
Diffstat (limited to 'extra/xfce4-battery-plugin')
-rw-r--r--extra/xfce4-battery-plugin/PKGBUILD37
-rw-r--r--extra/xfce4-battery-plugin/show-time-when-on-battery.patch21
-rw-r--r--extra/xfce4-battery-plugin/xfce4-battery-plugin.install6
3 files changed, 48 insertions, 16 deletions
diff --git a/extra/xfce4-battery-plugin/PKGBUILD b/extra/xfce4-battery-plugin/PKGBUILD
index b1f526cdf..54eaad736 100644
--- a/extra/xfce4-battery-plugin/PKGBUILD
+++ b/extra/xfce4-battery-plugin/PKGBUILD
@@ -1,34 +1,43 @@
-# $Id: PKGBUILD 149238 2012-02-06 16:19:07Z foutrelis $
+# $Id: PKGBUILD 151509 2012-02-26 21:57:00Z foutrelis $
# Maintainer: aurelien <aurelien@archlinux.org>
# Contributor: Aurelien Foret <orelien@chez.com>
pkgname=xfce4-battery-plugin
pkgver=1.0.0
-pkgrel=2
+pkgrel=3
pkgdesc="A battery monitor plugin for the Xfce panel"
-arch=(i686 x86_64 'mips64el')
+arch=('i686' 'x86_64' 'mips64el')
license=('GPL2')
url="http://xfce-goodies.berlios.de/"
groups=('xfce4-goodies')
depends=('xfce4-panel' 'libxfcegui4' 'hicolor-icon-theme')
makedepends=('intltool')
options=('!libtool')
-install=${pkgname}.install
-source=(http://archive.xfce.org/src/panel-plugins/${pkgname}/1.0/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('2696307f34f6b9630fcaaea102004e78')
+install=$pkgname.install
+source=(http://archive.xfce.org/src/panel-plugins/$pkgname/1.0/$pkgname-$pkgver.tar.bz2
+ show-time-when-on-battery.patch)
+sha256sums=('c28bb580e6b932c017b5bc6b2e75de8c3557e08d9606c7a70134aa035f8a121f'
+ '7cabd72a462406295e438a2aae89c09af9f759b5c257f7ecd19ae02c81250575')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
- ./configure --prefix=/usr \
- --sysconfdir=/etc \
- --libexecdir=/usr/lib \
- --localstatedir=/var \
- --disable-static \
- --disable-debug
+
+ # Fix FS#27438: Remaining time not shown on some systems
+ patch -Np1 -i "$srcdir/show-time-when-on-battery.patch"
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib \
+ --localstatedir=/var \
+ --disable-static \
+ --disable-debug
make
}
package() {
- cd ${srcdir}/${pkgname}-${pkgver}
- make DESTDIR=${pkgdir} install
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
}
+
+# vim:set ts=2 sw=2 et:
diff --git a/extra/xfce4-battery-plugin/show-time-when-on-battery.patch b/extra/xfce4-battery-plugin/show-time-when-on-battery.patch
new file mode 100644
index 000000000..d5ed36460
--- /dev/null
+++ b/extra/xfce4-battery-plugin/show-time-when-on-battery.patch
@@ -0,0 +1,21 @@
+From f4a68f05e838291d1ddcb60f7c719873bfd57d27 Mon Sep 17 00:00:00 2001
+From: flo <florian.a.jung@web.de>
+Date: Fri, 18 Feb 2011 17:21:12 +0000
+Subject: Show time when on battery power (bug #3736).
+
+---
+diff --git a/panel-plugin/libacpi.c b/panel-plugin/libacpi.c
+index 87339b7..838a760 100644
+--- a/panel-plugin/libacpi.c
++++ b/panel-plugin/libacpi.c
+@@ -787,7 +787,7 @@ int read_acpi_state_sysfs(int battery)
+ acpistate->rcapacity = read_sysfs_int(buf);
+ acpistate->percentage = (((float) acpistate->rcapacity)/acpiinfo->last_full_capacity) * 100;
+ }
+- if (strcmp(name,"current_now") == 0)
++ if ((strcmp(name,"current_now") == 0) || (strcmp(name,"power_now") == 0))
+ {
+ sprintf(buf,"%s/%s",batteries[battery], name);
+ acpistate->prate = read_sysfs_int(buf);
+--
+cgit v0.9.0.2
diff --git a/extra/xfce4-battery-plugin/xfce4-battery-plugin.install b/extra/xfce4-battery-plugin/xfce4-battery-plugin.install
index 21b79d2d4..e4f8fd06c 100644
--- a/extra/xfce4-battery-plugin/xfce4-battery-plugin.install
+++ b/extra/xfce4-battery-plugin/xfce4-battery-plugin.install
@@ -3,9 +3,11 @@ post_install() {
}
post_upgrade() {
- post_install $1
+ post_install
}
post_remove() {
- gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+ post_install
}
+
+# vim:set ts=2 sw=2 et: