From 65eeff79fff8a1bfdf67ca51d147384f46f4d5c0 Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Fri, 27 Dec 2013 23:55:53 +0000 Subject: Fri Dec 27 23:54:04 UTC 2013 --- community/ibam/PKGBUILD | 17 +++++++++++------ community/ibam/ibam-0.5.2-sysfs.patch | 12 ++++++------ 2 files changed, 17 insertions(+), 12 deletions(-) (limited to 'community/ibam') diff --git a/community/ibam/PKGBUILD b/community/ibam/PKGBUILD index 3639e85a5..f4288d5dc 100644 --- a/community/ibam/PKGBUILD +++ b/community/ibam/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 96802 2013-09-05 18:01:44Z bgyorgy $ +# $Id: PKGBUILD 100846 2013-11-11 19:51:58Z spupykin $ # Maintainer: Sergej Pupykin # Contributor: Kessia 'even' Pinheiro # Contributor: Penguin pkgname=ibam pkgver=0.5.2 -pkgrel=6 +pkgrel=7 pkgdesc="An intelligent battery monitor" arch=('i686' 'x86_64') url="http://ibam.sourceforge.net/" @@ -15,19 +15,24 @@ makedepends=('sed' 'make') optdepends=('gnuplot: graphs support') install="ibam.install" source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz" - 03acpi-check.dpatch) + 03acpi-check.dpatch + ibam-0.5.2-sysfs.patch) md5sums=('2d5222ff504dd19e7c1ea8acc2f13cf5' - '2f27fc97932bd59cabacbad063a13f0e') + '2f27fc97932bd59cabacbad063a13f0e' + '2a50027f73276d91555105b713687a4d') -build() { +prepare() { cd "${srcdir}/${pkgname}-${pkgver}" - sed -i \ -e "s|/local/bin|/bin|g" \ -e "s|^CFLAGS=-O3|CFLAGS=${CFLAGS}|g" \ Makefile patch -p1 <$srcdir/03acpi-check.dpatch + patch -p1 <$srcdir/ibam-0.5.2-sysfs.patch +} +build() { + cd "${srcdir}/${pkgname}-${pkgver}" make } diff --git a/community/ibam/ibam-0.5.2-sysfs.patch b/community/ibam/ibam-0.5.2-sysfs.patch index d9d73f924..a20b83db2 100644 --- a/community/ibam/ibam-0.5.2-sysfs.patch +++ b/community/ibam/ibam-0.5.2-sysfs.patch @@ -1,16 +1,16 @@ -diff -wbBur ibam-0.5.2/ibam.inl ibam-0.5.2.my/ibam.inl ---- ibam-0.5.2/ibam.inl 2009-03-09 16:53:20.000000000 +0000 -+++ ibam-0.5.2.my/ibam.inl 2011-03-24 19:41:32.000000000 +0000 +diff -wbBur ibam-0.5.2/ibam.inl ibam-0.5.2.q/ibam.inl +--- ibam-0.5.2/ibam.inl 2009-03-09 19:53:20.000000000 +0300 ++++ ibam-0.5.2.q/ibam.inl 2013-11-11 23:45:39.197066574 +0400 @@ -959,7 +959,13 @@ acpi.close(); apm = new acpi_status(); } else { -+ sysfs.open((sysfs_path+"/BAT0/charge_full").c_str()); + sysfs.open((sysfs_path+"/BAT0/present").c_str()); + if(!sysfs.is_open()) { - sysfs.open((sysfs_path+"/BAT1/charge_full").c_str()); ++ sysfs.open((sysfs_path+"/BAT1/present").c_str()); + } + if(!sysfs.is_open()) { -+ sysfs.open((sysfs_path+"/BAT2/charge_full").c_str()); ++ sysfs.open((sysfs_path+"/BAT2/present").c_str()); + } if(sysfs.is_open()) { #ifdef IBAM_DEBUG -- cgit v1.2.3-54-g00ecf