diff options
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 27 | ||||
-rw-r--r-- | disable-apm.patch | 48 |
3 files changed, 92 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..52284de15e1d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = wmbattery + pkgdesc = Battery monitor dockapp for Window Maker + pkgver = 2.41 + pkgrel = 1 + url = http://kitenet.net/~joey/code/wmbattery/ + arch = i686 + arch = x86_64 + license = GPL + depends = libxpm + depends = hal + source = git://git.kitenet.net/wmbattery#tag=2.41 + source = disable-apm.patch + md5sums = SKIP + md5sums = c5e2a979ade6d16069065c93f2cf2402 + +pkgname = wmbattery + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f71915576c17 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,27 @@ +# Maintainer: Brian Bidulock <bidulock@openss7.org> +# Contributor: Henrik Tunedal <putte_xvi at tunedal dot nu> +pkgname=wmbattery +pkgver=2.41 +pkgrel=1 +pkgdesc="Battery monitor dockapp for Window Maker" +arch=(i686 x86_64) +url="http://kitenet.net/~joey/code/wmbattery/" +license=('GPL') +depends=(libxpm hal) +source=(git://git.kitenet.net/wmbattery#tag=2.41 + disable-apm.patch) +md5sums=('SKIP' + 'c5e2a979ade6d16069065c93f2cf2402') + +build() { + cd "$srcdir/$pkgname" + patch -p1 <../disable-apm.patch || return 1 + autoreconf -fiv || return 1 + ./configure --prefix=/usr || return 1 + make || return 1 +} + +package() { + cd "$srcdir/$pkgname" + make DESTDIR="$pkgdir/" install +} diff --git a/disable-apm.patch b/disable-apm.patch new file mode 100644 index 000000000000..26d99cb84e0a --- /dev/null +++ b/disable-apm.patch @@ -0,0 +1,48 @@ +diff -purN wmbattery.orig/apm.h wmbattery/apm.h +--- wmbattery.orig/apm.h 2013-04-11 10:08:58.000000000 -0600 ++++ wmbattery/apm.h 2013-04-11 10:14:23.000000000 -0600 +@@ -1,4 +1,17 @@ +-#include <apm.h> ++typedef struct apm_info ++{ ++ const char driver_version[10]; ++ int apm_version_major; ++ int apm_version_minor; ++ int apm_flags; ++ int ac_line_status; ++ int battery_status; ++ int battery_flags; ++ int battery_percentage; ++ int battery_time; ++ int using_minutes; ++} ++apm_info; + + /* Symbolic constants for apm may be in system apm.h, or may not. */ + #ifndef AC_LINE_STATUS_ON +diff -purN wmbattery.orig/wmbattery.c wmbattery/wmbattery.c +--- wmbattery.orig/wmbattery.c 2013-04-11 10:08:58.000000000 -0600 ++++ wmbattery/wmbattery.c 2013-04-11 10:15:29.000000000 -0600 +@@ -528,10 +528,6 @@ void alarmhandler(int sig) { + error("Cannot read HAL information."); + } + #endif +- else if (! use_sonypi) { +- if (apm_read(&cur_info) != 0) +- error("Cannot read APM information."); +- } + else { + if (sonypi_read(&cur_info) != 0) + error("Cannot read sonypi information."); +@@ -583,10 +579,7 @@ void check_battery_num(int real, int req + int main(int argc, char *argv[]) { + make_window(parse_commandline(argc, argv), argc ,argv); + +- /* Check for APM support (returns 0 on success). */ +- if (apm_exists() == 0) { +- if (! delay) +- delay = 1; ++ if (0) { + } + #ifdef HAL + /* Check for hal support. */ |