[arch-commits] Commit in ibam/repos (18 files)
Sergej Pupykin
spupykin at archlinux.org
Mon Jul 27 09:32:55 UTC 2015
Date: Monday, July 27, 2015 @ 11:32:55
Author: spupykin
Revision: 137488
archrelease: copy trunk to community-i686, community-x86_64
Added:
ibam/repos/community-i686/03acpi-check.dpatch
(from rev 137487, ibam/trunk/03acpi-check.dpatch)
ibam/repos/community-i686/PKGBUILD
(from rev 137487, ibam/trunk/PKGBUILD)
ibam/repos/community-i686/ibam-0.5.2-debian-sysfs-lenovo.patch
(from rev 137487, ibam/trunk/ibam-0.5.2-debian-sysfs-lenovo.patch)
ibam/repos/community-i686/ibam-0.5.2-sysfs.patch
(from rev 137487, ibam/trunk/ibam-0.5.2-sysfs.patch)
ibam/repos/community-i686/ibam.install
(from rev 137487, ibam/trunk/ibam.install)
ibam/repos/community-x86_64/03acpi-check.dpatch
(from rev 137487, ibam/trunk/03acpi-check.dpatch)
ibam/repos/community-x86_64/PKGBUILD
(from rev 137487, ibam/trunk/PKGBUILD)
ibam/repos/community-x86_64/ibam-0.5.2-debian-sysfs-lenovo.patch
(from rev 137487, ibam/trunk/ibam-0.5.2-debian-sysfs-lenovo.patch)
ibam/repos/community-x86_64/ibam-0.5.2-sysfs.patch
(from rev 137487, ibam/trunk/ibam-0.5.2-sysfs.patch)
ibam/repos/community-x86_64/ibam.install
(from rev 137487, ibam/trunk/ibam.install)
Deleted:
ibam/repos/community-i686/03acpi-check.dpatch
ibam/repos/community-i686/PKGBUILD
ibam/repos/community-i686/ibam-0.5.2-sysfs.patch
ibam/repos/community-i686/ibam.install
ibam/repos/community-x86_64/03acpi-check.dpatch
ibam/repos/community-x86_64/PKGBUILD
ibam/repos/community-x86_64/ibam-0.5.2-sysfs.patch
ibam/repos/community-x86_64/ibam.install
-------------------------------------------------------+
/03acpi-check.dpatch | 56 +++++++++
/PKGBUILD | 92 ++++++++++++++++
/ibam-0.5.2-sysfs.patch | 34 +++++
/ibam.install | 16 ++
community-i686/03acpi-check.dpatch | 28 ----
community-i686/PKGBUILD | 43 -------
community-i686/ibam-0.5.2-debian-sysfs-lenovo.patch | 76 +++++++++++++
community-i686/ibam-0.5.2-sysfs.patch | 17 --
community-i686/ibam.install | 8 -
community-x86_64/03acpi-check.dpatch | 28 ----
community-x86_64/PKGBUILD | 43 -------
community-x86_64/ibam-0.5.2-debian-sysfs-lenovo.patch | 76 +++++++++++++
community-x86_64/ibam-0.5.2-sysfs.patch | 17 --
community-x86_64/ibam.install | 8 -
14 files changed, 350 insertions(+), 192 deletions(-)
Deleted: community-i686/03acpi-check.dpatch
===================================================================
--- community-i686/03acpi-check.dpatch 2015-07-27 09:32:32 UTC (rev 137487)
+++ community-i686/03acpi-check.dpatch 2015-07-27 09:32:55 UTC (rev 137488)
@@ -1,28 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 03acpi-check.dpatch by Martin Wuertele <maxx at 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
-
- at 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;
-
Copied: ibam/repos/community-i686/03acpi-check.dpatch (from rev 137487, ibam/trunk/03acpi-check.dpatch)
===================================================================
--- community-i686/03acpi-check.dpatch (rev 0)
+++ community-i686/03acpi-check.dpatch 2015-07-27 09:32:55 UTC (rev 137488)
@@ -0,0 +1,28 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03acpi-check.dpatch by Martin Wuertele <maxx at 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
+
+ at 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;
+
Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD 2015-07-27 09:32:32 UTC (rev 137487)
+++ community-i686/PKGBUILD 2015-07-27 09:32:55 UTC (rev 137488)
@@ -1,43 +0,0 @@
-# $Id$
-# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
-# Contributor: Kessia 'even' Pinheiro <kessiapinheiro at gmail.com>
-# Contributor: Penguin <TGates81.at.gmail.dot.com>
-
-pkgname=ibam
-pkgver=0.5.2
-pkgrel=7
-pkgdesc="An intelligent battery monitor"
-arch=('i686' 'x86_64')
-url="http://ibam.sourceforge.net/"
-license=('GPL')
-depends=('gcc-libs')
-makedepends=('sed' 'make')
-optdepends=('gnuplot: graphs support')
-install="ibam.install"
-source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz"
- 03acpi-check.dpatch
- ibam-0.5.2-sysfs.patch)
-md5sums=('2d5222ff504dd19e7c1ea8acc2f13cf5'
- '2f27fc97932bd59cabacbad063a13f0e'
- '2a50027f73276d91555105b713687a4d')
-
-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
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- install -m0755 -d ${pkgdir}/usr/bin
- install -m0755 -D ${srcdir}/${pkgname}-${pkgver}/ibam ${pkgdir}/usr/bin/ibam
-}
Copied: ibam/repos/community-i686/PKGBUILD (from rev 137487, ibam/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD (rev 0)
+++ community-i686/PKGBUILD 2015-07-27 09:32:55 UTC (rev 137488)
@@ -0,0 +1,46 @@
+# $Id$
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Contributor: Kessia 'even' Pinheiro <kessiapinheiro at gmail.com>
+# Contributor: Penguin <TGates81.at.gmail.dot.com>
+
+pkgname=ibam
+pkgver=0.5.2
+pkgrel=8
+pkgdesc="An intelligent battery monitor"
+arch=('i686' 'x86_64')
+url="http://ibam.sourceforge.net/"
+license=('GPL')
+depends=('gcc-libs')
+makedepends=('sed' 'make')
+optdepends=('gnuplot: graphs support')
+install="ibam.install"
+source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz"
+ 03acpi-check.dpatch
+ ibam-0.5.2-sysfs.patch
+ ibam-0.5.2-debian-sysfs-lenovo.patch)
+md5sums=('2d5222ff504dd19e7c1ea8acc2f13cf5'
+ '2f27fc97932bd59cabacbad063a13f0e'
+ '2a50027f73276d91555105b713687a4d'
+ '49f0667537a221f9f1ab5b8a1f513adb')
+
+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
+ patch -p1 <$srcdir/ibam-0.5.2-debian-sysfs-lenovo.patch
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ install -m0755 -d ${pkgdir}/usr/bin
+ install -m0755 -D ${srcdir}/${pkgname}-${pkgver}/ibam ${pkgdir}/usr/bin/ibam
+}
Copied: ibam/repos/community-i686/ibam-0.5.2-debian-sysfs-lenovo.patch (from rev 137487, ibam/trunk/ibam-0.5.2-debian-sysfs-lenovo.patch)
===================================================================
--- community-i686/ibam-0.5.2-debian-sysfs-lenovo.patch (rev 0)
+++ community-i686/ibam-0.5.2-debian-sysfs-lenovo.patch 2015-07-27 09:32:55 UTC (rev 137488)
@@ -0,0 +1,76 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 05_sysfs_lenovo.dpatch by Martin Wuertele <maxx at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: add lenovo sysfs detection
+
+ at DPATCH@
+
+--- ibam-0.5.2/ibam.inl.orig 2011-02-15 21:42:39.000000000 +0100
++++ ibam-0.5.2/ibam.inl 2011-02-15 21:41:08.000000000 +0100
+@@ -540,6 +540,7 @@
+
+ if(present)
+ {
++ // try charge_full
+ in.open((((Path)+battery_entry->d_name)+"/charge_full").c_str());
+ if(!in.fail())
+ {
+@@ -547,10 +548,19 @@
+ total_capacity+=capacity;
+ }
+ in.close();
++ // try energy_full
++ in.open((((Path)+battery_entry->d_name)+"/energy_full").c_str());
++ if(!in.fail())
++ {
++ in>>capacity;
++ total_capacity+=capacity;
++ }
++ in.close();
+ }
+
+ if(present && capacity)
+ {
++ // try charge_now
+ in.open((((Path)+battery_entry->d_name)+"/charge_now").c_str());
+ if(!in.fail())
+ {
+@@ -558,10 +568,19 @@
+ total_remain+=remain;
+ }
+ in.close();
+- }
++ // try energy_now
++ in.open((((Path)+battery_entry->d_name)+"/energy_now").c_str());
++ if(!in.fail())
++ {
++ in>>remain;
++ total_remain+=remain;
++ }
++ in.close();
++ }
+
+ if(present && capacity)
+ {
++ // try current_now
+ in.open((((Path)+battery_entry->d_name)+"/current_now").c_str());
+ if(!in.fail())
+ {
+@@ -569,7 +588,15 @@
+ total_rate+=rate;
+ }
+ in.close();
+- }
++ // try energy_now
++ in.open((((Path)+battery_entry->d_name)+"/energy_now").c_str());
++ if(!in.fail())
++ {
++ in>>rate;
++ total_rate+=rate;
++ }
++ in.close();
++ }
+
+ if(present && capacity)
+ {
Deleted: community-i686/ibam-0.5.2-sysfs.patch
===================================================================
--- community-i686/ibam-0.5.2-sysfs.patch 2015-07-27 09:32:32 UTC (rev 137487)
+++ community-i686/ibam-0.5.2-sysfs.patch 2015-07-27 09:32:55 UTC (rev 137488)
@@ -1,17 +0,0 @@
-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/present").c_str());
-+ if(!sysfs.is_open()) {
-+ sysfs.open((sysfs_path+"/BAT1/present").c_str());
-+ }
-+ if(!sysfs.is_open()) {
-+ sysfs.open((sysfs_path+"/BAT2/present").c_str());
-+ }
- if(sysfs.is_open()) {
- #ifdef IBAM_DEBUG
- cout << "using sysfs" << endl;
Copied: ibam/repos/community-i686/ibam-0.5.2-sysfs.patch (from rev 137487, ibam/trunk/ibam-0.5.2-sysfs.patch)
===================================================================
--- community-i686/ibam-0.5.2-sysfs.patch (rev 0)
+++ community-i686/ibam-0.5.2-sysfs.patch 2015-07-27 09:32:55 UTC (rev 137488)
@@ -0,0 +1,17 @@
+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/present").c_str());
++ if(!sysfs.is_open()) {
++ sysfs.open((sysfs_path+"/BAT1/present").c_str());
++ }
++ if(!sysfs.is_open()) {
++ sysfs.open((sysfs_path+"/BAT2/present").c_str());
++ }
+ if(sysfs.is_open()) {
+ #ifdef IBAM_DEBUG
+ cout << "using sysfs" << endl;
Deleted: community-i686/ibam.install
===================================================================
--- community-i686/ibam.install 2015-07-27 09:32:32 UTC (rev 137487)
+++ community-i686/ibam.install 2015-07-27 09:32:55 UTC (rev 137488)
@@ -1,8 +0,0 @@
-post_install() {
- echo -e "-> install gnuplot to use the \`--plot' switch."
- /bin/true
-}
-
-post_upgrade() {
- post_install $1
-}
Copied: ibam/repos/community-i686/ibam.install (from rev 137487, ibam/trunk/ibam.install)
===================================================================
--- community-i686/ibam.install (rev 0)
+++ community-i686/ibam.install 2015-07-27 09:32:55 UTC (rev 137488)
@@ -0,0 +1,8 @@
+post_install() {
+ echo -e "-> install gnuplot to use the \`--plot' switch."
+ /bin/true
+}
+
+post_upgrade() {
+ post_install $1
+}
Deleted: community-x86_64/03acpi-check.dpatch
===================================================================
--- community-x86_64/03acpi-check.dpatch 2015-07-27 09:32:32 UTC (rev 137487)
+++ community-x86_64/03acpi-check.dpatch 2015-07-27 09:32:55 UTC (rev 137488)
@@ -1,28 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 03acpi-check.dpatch by Martin Wuertele <maxx at 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
-
- at 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;
-
Copied: ibam/repos/community-x86_64/03acpi-check.dpatch (from rev 137487, ibam/trunk/03acpi-check.dpatch)
===================================================================
--- community-x86_64/03acpi-check.dpatch (rev 0)
+++ community-x86_64/03acpi-check.dpatch 2015-07-27 09:32:55 UTC (rev 137488)
@@ -0,0 +1,28 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03acpi-check.dpatch by Martin Wuertele <maxx at 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
+
+ at 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;
+
Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD 2015-07-27 09:32:32 UTC (rev 137487)
+++ community-x86_64/PKGBUILD 2015-07-27 09:32:55 UTC (rev 137488)
@@ -1,43 +0,0 @@
-# $Id$
-# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
-# Contributor: Kessia 'even' Pinheiro <kessiapinheiro at gmail.com>
-# Contributor: Penguin <TGates81.at.gmail.dot.com>
-
-pkgname=ibam
-pkgver=0.5.2
-pkgrel=7
-pkgdesc="An intelligent battery monitor"
-arch=('i686' 'x86_64')
-url="http://ibam.sourceforge.net/"
-license=('GPL')
-depends=('gcc-libs')
-makedepends=('sed' 'make')
-optdepends=('gnuplot: graphs support')
-install="ibam.install"
-source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz"
- 03acpi-check.dpatch
- ibam-0.5.2-sysfs.patch)
-md5sums=('2d5222ff504dd19e7c1ea8acc2f13cf5'
- '2f27fc97932bd59cabacbad063a13f0e'
- '2a50027f73276d91555105b713687a4d')
-
-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
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- install -m0755 -d ${pkgdir}/usr/bin
- install -m0755 -D ${srcdir}/${pkgname}-${pkgver}/ibam ${pkgdir}/usr/bin/ibam
-}
Copied: ibam/repos/community-x86_64/PKGBUILD (from rev 137487, ibam/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2015-07-27 09:32:55 UTC (rev 137488)
@@ -0,0 +1,46 @@
+# $Id$
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Contributor: Kessia 'even' Pinheiro <kessiapinheiro at gmail.com>
+# Contributor: Penguin <TGates81.at.gmail.dot.com>
+
+pkgname=ibam
+pkgver=0.5.2
+pkgrel=8
+pkgdesc="An intelligent battery monitor"
+arch=('i686' 'x86_64')
+url="http://ibam.sourceforge.net/"
+license=('GPL')
+depends=('gcc-libs')
+makedepends=('sed' 'make')
+optdepends=('gnuplot: graphs support')
+install="ibam.install"
+source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz"
+ 03acpi-check.dpatch
+ ibam-0.5.2-sysfs.patch
+ ibam-0.5.2-debian-sysfs-lenovo.patch)
+md5sums=('2d5222ff504dd19e7c1ea8acc2f13cf5'
+ '2f27fc97932bd59cabacbad063a13f0e'
+ '2a50027f73276d91555105b713687a4d'
+ '49f0667537a221f9f1ab5b8a1f513adb')
+
+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
+ patch -p1 <$srcdir/ibam-0.5.2-debian-sysfs-lenovo.patch
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ install -m0755 -d ${pkgdir}/usr/bin
+ install -m0755 -D ${srcdir}/${pkgname}-${pkgver}/ibam ${pkgdir}/usr/bin/ibam
+}
Copied: ibam/repos/community-x86_64/ibam-0.5.2-debian-sysfs-lenovo.patch (from rev 137487, ibam/trunk/ibam-0.5.2-debian-sysfs-lenovo.patch)
===================================================================
--- community-x86_64/ibam-0.5.2-debian-sysfs-lenovo.patch (rev 0)
+++ community-x86_64/ibam-0.5.2-debian-sysfs-lenovo.patch 2015-07-27 09:32:55 UTC (rev 137488)
@@ -0,0 +1,76 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 05_sysfs_lenovo.dpatch by Martin Wuertele <maxx at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: add lenovo sysfs detection
+
+ at DPATCH@
+
+--- ibam-0.5.2/ibam.inl.orig 2011-02-15 21:42:39.000000000 +0100
++++ ibam-0.5.2/ibam.inl 2011-02-15 21:41:08.000000000 +0100
+@@ -540,6 +540,7 @@
+
+ if(present)
+ {
++ // try charge_full
+ in.open((((Path)+battery_entry->d_name)+"/charge_full").c_str());
+ if(!in.fail())
+ {
+@@ -547,10 +548,19 @@
+ total_capacity+=capacity;
+ }
+ in.close();
++ // try energy_full
++ in.open((((Path)+battery_entry->d_name)+"/energy_full").c_str());
++ if(!in.fail())
++ {
++ in>>capacity;
++ total_capacity+=capacity;
++ }
++ in.close();
+ }
+
+ if(present && capacity)
+ {
++ // try charge_now
+ in.open((((Path)+battery_entry->d_name)+"/charge_now").c_str());
+ if(!in.fail())
+ {
+@@ -558,10 +568,19 @@
+ total_remain+=remain;
+ }
+ in.close();
+- }
++ // try energy_now
++ in.open((((Path)+battery_entry->d_name)+"/energy_now").c_str());
++ if(!in.fail())
++ {
++ in>>remain;
++ total_remain+=remain;
++ }
++ in.close();
++ }
+
+ if(present && capacity)
+ {
++ // try current_now
+ in.open((((Path)+battery_entry->d_name)+"/current_now").c_str());
+ if(!in.fail())
+ {
+@@ -569,7 +588,15 @@
+ total_rate+=rate;
+ }
+ in.close();
+- }
++ // try energy_now
++ in.open((((Path)+battery_entry->d_name)+"/energy_now").c_str());
++ if(!in.fail())
++ {
++ in>>rate;
++ total_rate+=rate;
++ }
++ in.close();
++ }
+
+ if(present && capacity)
+ {
Deleted: community-x86_64/ibam-0.5.2-sysfs.patch
===================================================================
--- community-x86_64/ibam-0.5.2-sysfs.patch 2015-07-27 09:32:32 UTC (rev 137487)
+++ community-x86_64/ibam-0.5.2-sysfs.patch 2015-07-27 09:32:55 UTC (rev 137488)
@@ -1,17 +0,0 @@
-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/present").c_str());
-+ if(!sysfs.is_open()) {
-+ sysfs.open((sysfs_path+"/BAT1/present").c_str());
-+ }
-+ if(!sysfs.is_open()) {
-+ sysfs.open((sysfs_path+"/BAT2/present").c_str());
-+ }
- if(sysfs.is_open()) {
- #ifdef IBAM_DEBUG
- cout << "using sysfs" << endl;
Copied: ibam/repos/community-x86_64/ibam-0.5.2-sysfs.patch (from rev 137487, ibam/trunk/ibam-0.5.2-sysfs.patch)
===================================================================
--- community-x86_64/ibam-0.5.2-sysfs.patch (rev 0)
+++ community-x86_64/ibam-0.5.2-sysfs.patch 2015-07-27 09:32:55 UTC (rev 137488)
@@ -0,0 +1,17 @@
+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/present").c_str());
++ if(!sysfs.is_open()) {
++ sysfs.open((sysfs_path+"/BAT1/present").c_str());
++ }
++ if(!sysfs.is_open()) {
++ sysfs.open((sysfs_path+"/BAT2/present").c_str());
++ }
+ if(sysfs.is_open()) {
+ #ifdef IBAM_DEBUG
+ cout << "using sysfs" << endl;
Deleted: community-x86_64/ibam.install
===================================================================
--- community-x86_64/ibam.install 2015-07-27 09:32:32 UTC (rev 137487)
+++ community-x86_64/ibam.install 2015-07-27 09:32:55 UTC (rev 137488)
@@ -1,8 +0,0 @@
-post_install() {
- echo -e "-> install gnuplot to use the \`--plot' switch."
- /bin/true
-}
-
-post_upgrade() {
- post_install $1
-}
Copied: ibam/repos/community-x86_64/ibam.install (from rev 137487, ibam/trunk/ibam.install)
===================================================================
--- community-x86_64/ibam.install (rev 0)
+++ community-x86_64/ibam.install 2015-07-27 09:32:55 UTC (rev 137488)
@@ -0,0 +1,8 @@
+post_install() {
+ echo -e "-> install gnuplot to use the \`--plot' switch."
+ /bin/true
+}
+
+post_upgrade() {
+ post_install $1
+}
More information about the arch-commits
mailing list