summaryrefslogtreecommitdiff
path: root/community/acpitool
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-11-15 11:36:24 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-11-15 11:36:24 -0300
commit7caeeae33fd491dbea5044168bbc50197963118c (patch)
tree2ceec96ef9e1897d921d05f2fc5c5dda2ad893e9 /community/acpitool
parent2f39e56def6dadf0746b6e96e756518f1af9396b (diff)
parent3d151dfc8e08b65c2c1d4b5e8081562d56ee7d41 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/ginac/PKGBUILD community/gnash/PKGBUILD community/haskell-tar/PKGBUILD community/libdlna/PKGBUILD community/mplayer2/PKGBUILD community/musescore/PKGBUILD community/open-vm-tools-modules/PKGBUILD community/paraview/PKGBUILD community/picard/PKGBUILD core/idnkit/PKGBUILD core/ifenslave/PKGBUILD extra/audacious/PKGBUILD extra/avidemux/PKGBUILD extra/ffmpeg/PKGBUILD extra/graphite/PKGBUILD extra/gstreamer0.10-ugly/PKGBUILD extra/k3b/PKGBUILD extra/kdemultimedia/PKGBUILD extra/koffice/PKGBUILD extra/kradio/PKGBUILD extra/libreoffice/PKGBUILD extra/mediastreamer/PKGBUILD extra/poppler/PKGBUILD extra/vlc/PKGBUILD libre/texlive-bin-libre/PKGBUILD
Diffstat (limited to 'community/acpitool')
-rw-r--r--community/acpitool/PKGBUILD11
-rw-r--r--community/acpitool/sysfs-battery.patch52
2 files changed, 59 insertions, 4 deletions
diff --git a/community/acpitool/PKGBUILD b/community/acpitool/PKGBUILD
index 95c0534e9..acd8be747 100644
--- a/community/acpitool/PKGBUILD
+++ b/community/acpitool/PKGBUILD
@@ -1,24 +1,27 @@
-# $Id: PKGBUILD 54004 2011-08-11 17:55:53Z spupykin $
+# $Id: PKGBUILD 58302 2011-11-10 17:58:29Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Gerhard Brauer <gerhard.brauer@web.de>
# Contributor: Milosz Piglas <archeofuture@gmail.com>
pkgname=acpitool
pkgver=0.5.1
-pkgrel=3
+pkgrel=5
pkgdesc="ACPI client - replacement for apm tool"
url="http://sourceforge.net/projects/acpitool/"
arch=('i686' 'x86_64' 'mips64el')
license=('GPL')
depends=('gcc-libs')
source=(http://downloads.sourceforge.net/sourceforge/acpitool/acpitool-$pkgver.tar.bz2
- linux-3.0.patch)
+ linux-3.0.patch
+ sysfs-battery.patch)
md5sums=('9e4ec55201be0be71ffbc56d38b42b57'
- 'eb149edb32be6cdf20a7d16beb3e9f70')
+ 'eb149edb32be6cdf20a7d16beb3e9f70'
+ '969fc4929cc215756db27168646c2b7a')
build() {
cd "$srcdir/$pkgname-$pkgver"
patch -p1 <$srcdir/linux-3.0.patch
+ patch -p1 <$srcdir/sysfs-battery.patch
./configure --prefix=/usr
make
}
diff --git a/community/acpitool/sysfs-battery.patch b/community/acpitool/sysfs-battery.patch
new file mode 100644
index 000000000..4f6898a78
--- /dev/null
+++ b/community/acpitool/sysfs-battery.patch
@@ -0,0 +1,52 @@
+diff -wbBur acpitool-0.5.1/src/acpitool.h acpitool-0.5.1.my/src/acpitool.h
+--- acpitool-0.5.1/src/acpitool.h 2008-10-16 19:38:12.000000000 +0400
++++ acpitool-0.5.1.my/src/acpitool.h 2011-11-10 21:55:23.000000000 +0400
+@@ -29,11 +29,11 @@
+
+ struct Battery_Info {
+ int Battery_Present;
+- char Charging_State[12];
+- char Remaining_Cap[10];
+- char Design_Cap[10];
+- char LastFull_Cap[10];
+- char Present_Rate[10];
++ char Charging_State[13];
++ char Remaining_Cap[13];
++ char Design_Cap[13];
++ char LastFull_Cap[13];
++ char Present_Rate[13];
+ char Technology[13];
+ char Model[13];
+ char Serial[13];
+diff -wbBur acpitool-0.5.1/src/battery.cpp acpitool-0.5.1.my/src/battery.cpp
+--- acpitool-0.5.1/src/battery.cpp 2009-08-13 23:42:43.000000000 +0400
++++ acpitool-0.5.1.my/src/battery.cpp 2011-11-10 21:48:22.000000000 +0400
+@@ -614,7 +614,7 @@
+ }
+
+ memset(str, '\0', 100);
+- for(int t=0; t<5; t++)
++ for(int t=0; t<1; t++)
+ fgets(str, 100, power_fp); /* skip first 5 lines */
+
+ /* get battery status (full, charging, ...) */
+@@ -664,8 +664,8 @@
+
+
+
+- fgets(str, 100, power_fp); /* skip 1 line */
+-
++ fgets(str, 100, power_fp); /* cycle count - skip 1 line */
++ fgets(str, 100, power_fp); /* voltage_min - skip 1 line */
+
+ /* get voltage_now */
+ memset(str, '\0', 100);
+@@ -756,7 +756,7 @@
+ else
+ strncpy(batt_info->Model, "unknown", 7);
+
+- fgets(str, 100, power_fp);
++ fgets(str, 100, power_fp); /* manufacturer - skip 1 line */
+
+ /* get serial */
+ memset(str, '\0', 100);