summaryrefslogtreecommitdiff
path: root/community/ibam
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-09-06 01:39:14 -0700
committerroot <root@rshg054.dnsready.net>2013-09-06 01:39:14 -0700
commit670cfaf55e53f7380ca8ee7b4acb2bf0248685c4 (patch)
tree93a452c84aa492d51f56911d74a8fcbbd496b550 /community/ibam
parentf7a2cf07dfae6a6707525e05f4f7f1998b382c4d (diff)
Fri Sep 6 01:39:05 PDT 2013
Diffstat (limited to 'community/ibam')
-rw-r--r--community/ibam/03acpi-check.dpatch28
-rw-r--r--community/ibam/PKGBUILD16
2 files changed, 38 insertions, 6 deletions
diff --git a/community/ibam/03acpi-check.dpatch b/community/ibam/03acpi-check.dpatch
new file mode 100644
index 000000000..7a688fe20
--- /dev/null
+++ b/community/ibam/03acpi-check.dpatch
@@ -0,0 +1,28 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03acpi-check.dpatch by Martin Wuertele <maxx@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: change detection for sysfs and sysfs variable names for 2.6.30+ kernels
+
+@DPATCH@
+--- ibam-0.5.2/ibam.inl.orig 2010-01-03 12:17:10.000000000 +0100
++++ ibam-0.5.2/ibam.inl 2010-01-03 12:17:19.000000000 +0100
+@@ -945,7 +945,7 @@
+ string sysfs_path = "/sys/class/power_supply"; // ...
+ ifstream pmu,acpi,sysfs;
+ pmu.open((pmu_path+"/info").c_str());
+- acpi.open((acpi_path+"/info").c_str());
++ acpi.open((acpi_path+"/event").c_str());
+ if (pmu.is_open()) {
+ #ifdef IBAM_DEBUG
+ cout << "using pmu" << endl;
+@@ -959,7 +959,7 @@
+ acpi.close();
+ apm = new acpi_status();
+ } else {
+- sysfs.open((sysfs_path+"/BAT1/charge_full").c_str());
++ sysfs.open((sysfs_path+"/BAT0/present").c_str());
+ if(sysfs.is_open()) {
+ #ifdef IBAM_DEBUG
+ cout << "using sysfs" << endl;
+
diff --git a/community/ibam/PKGBUILD b/community/ibam/PKGBUILD
index 6f72fb3dc..3639e85a5 100644
--- a/community/ibam/PKGBUILD
+++ b/community/ibam/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 65562 2012-02-21 08:57:40Z spupykin $
+# $Id: PKGBUILD 96802 2013-09-05 18:01:44Z bgyorgy $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Kessia 'even' Pinheiro <kessiapinheiro at gmail.com>
# Contributor: Penguin <TGates81.at.gmail.dot.com>
pkgname=ibam
pkgver=0.5.2
-pkgrel=5
+pkgrel=6
pkgdesc="An intelligent battery monitor"
arch=('i686' 'x86_64')
url="http://ibam.sourceforge.net/"
@@ -15,20 +15,24 @@ makedepends=('sed' 'make')
optdepends=('gnuplot: graphs support')
install="ibam.install"
source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz"
- ibam-0.5.2-sysfs.patch)
+ 03acpi-check.dpatch)
md5sums=('2d5222ff504dd19e7c1ea8acc2f13cf5'
- 'c3aafebd5ad9159c89f71beab4a0f414')
+ '2f27fc97932bd59cabacbad063a13f0e')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- install -m0755 -d ${pkgdir}/usr/bin
sed -i \
-e "s|/local/bin|/bin|g" \
-e "s|^CFLAGS=-O3|CFLAGS=${CFLAGS}|g" \
Makefile
- patch -p1 <$srcdir/ibam-0.5.2-sysfs.patch
+ patch -p1 <$srcdir/03acpi-check.dpatch
make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ install -m0755 -d ${pkgdir}/usr/bin
install -m0755 -D ${srcdir}/${pkgname}-${pkgver}/ibam ${pkgdir}/usr/bin/ibam
}