[arch-commits] Commit in ibam/repos (12 files)

Evangelos Foutras foutrelis at archlinux.org
Sun Dec 6 01:44:12 UTC 2015


    Date: Sunday, December 6, 2015 @ 02:44:11
  Author: foutrelis
Revision: 148738

archrelease: copy trunk to community-staging-i686, community-staging-x86_64

Added:
  ibam/repos/community-staging-i686/
  ibam/repos/community-staging-i686/03acpi-check.dpatch
    (from rev 148737, ibam/trunk/03acpi-check.dpatch)
  ibam/repos/community-staging-i686/PKGBUILD
    (from rev 148737, ibam/trunk/PKGBUILD)
  ibam/repos/community-staging-i686/ibam-0.5.2-debian-sysfs-lenovo.patch
    (from rev 148737, ibam/trunk/ibam-0.5.2-debian-sysfs-lenovo.patch)
  ibam/repos/community-staging-i686/ibam-0.5.2-sysfs.patch
    (from rev 148737, ibam/trunk/ibam-0.5.2-sysfs.patch)
  ibam/repos/community-staging-i686/ibam.install
    (from rev 148737, ibam/trunk/ibam.install)
  ibam/repos/community-staging-x86_64/
  ibam/repos/community-staging-x86_64/03acpi-check.dpatch
    (from rev 148737, ibam/trunk/03acpi-check.dpatch)
  ibam/repos/community-staging-x86_64/PKGBUILD
    (from rev 148737, ibam/trunk/PKGBUILD)
  ibam/repos/community-staging-x86_64/ibam-0.5.2-debian-sysfs-lenovo.patch
    (from rev 148737, ibam/trunk/ibam-0.5.2-debian-sysfs-lenovo.patch)
  ibam/repos/community-staging-x86_64/ibam-0.5.2-sysfs.patch
    (from rev 148737, ibam/trunk/ibam-0.5.2-sysfs.patch)
  ibam/repos/community-staging-x86_64/ibam.install
    (from rev 148737, ibam/trunk/ibam.install)

---------------------------------------------------------------+
 community-staging-i686/03acpi-check.dpatch                    |   28 +++
 community-staging-i686/PKGBUILD                               |   46 ++++++
 community-staging-i686/ibam-0.5.2-debian-sysfs-lenovo.patch   |   76 ++++++++++
 community-staging-i686/ibam-0.5.2-sysfs.patch                 |   17 ++
 community-staging-i686/ibam.install                           |    8 +
 community-staging-x86_64/03acpi-check.dpatch                  |   28 +++
 community-staging-x86_64/PKGBUILD                             |   46 ++++++
 community-staging-x86_64/ibam-0.5.2-debian-sysfs-lenovo.patch |   76 ++++++++++
 community-staging-x86_64/ibam-0.5.2-sysfs.patch               |   17 ++
 community-staging-x86_64/ibam.install                         |    8 +
 10 files changed, 350 insertions(+)

Copied: ibam/repos/community-staging-i686/03acpi-check.dpatch (from rev 148737, ibam/trunk/03acpi-check.dpatch)
===================================================================
--- community-staging-i686/03acpi-check.dpatch	                        (rev 0)
+++ community-staging-i686/03acpi-check.dpatch	2015-12-06 01:44:11 UTC (rev 148738)
@@ -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;
+

Copied: ibam/repos/community-staging-i686/PKGBUILD (from rev 148737, ibam/trunk/PKGBUILD)
===================================================================
--- community-staging-i686/PKGBUILD	                        (rev 0)
+++ community-staging-i686/PKGBUILD	2015-12-06 01:44:11 UTC (rev 148738)
@@ -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=9
+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-staging-i686/ibam-0.5.2-debian-sysfs-lenovo.patch (from rev 148737, ibam/trunk/ibam-0.5.2-debian-sysfs-lenovo.patch)
===================================================================
--- community-staging-i686/ibam-0.5.2-debian-sysfs-lenovo.patch	                        (rev 0)
+++ community-staging-i686/ibam-0.5.2-debian-sysfs-lenovo.patch	2015-12-06 01:44:11 UTC (rev 148738)
@@ -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)
+          {

Copied: ibam/repos/community-staging-i686/ibam-0.5.2-sysfs.patch (from rev 148737, ibam/trunk/ibam-0.5.2-sysfs.patch)
===================================================================
--- community-staging-i686/ibam-0.5.2-sysfs.patch	                        (rev 0)
+++ community-staging-i686/ibam-0.5.2-sysfs.patch	2015-12-06 01:44:11 UTC (rev 148738)
@@ -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;

Copied: ibam/repos/community-staging-i686/ibam.install (from rev 148737, ibam/trunk/ibam.install)
===================================================================
--- community-staging-i686/ibam.install	                        (rev 0)
+++ community-staging-i686/ibam.install	2015-12-06 01:44:11 UTC (rev 148738)
@@ -0,0 +1,8 @@
+post_install() {
+  echo -e "->  install gnuplot to use the \`--plot' switch."
+  /bin/true
+}
+
+post_upgrade() {
+  post_install $1
+}

Copied: ibam/repos/community-staging-x86_64/03acpi-check.dpatch (from rev 148737, ibam/trunk/03acpi-check.dpatch)
===================================================================
--- community-staging-x86_64/03acpi-check.dpatch	                        (rev 0)
+++ community-staging-x86_64/03acpi-check.dpatch	2015-12-06 01:44:11 UTC (rev 148738)
@@ -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;
+

Copied: ibam/repos/community-staging-x86_64/PKGBUILD (from rev 148737, ibam/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2015-12-06 01:44:11 UTC (rev 148738)
@@ -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=9
+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-staging-x86_64/ibam-0.5.2-debian-sysfs-lenovo.patch (from rev 148737, ibam/trunk/ibam-0.5.2-debian-sysfs-lenovo.patch)
===================================================================
--- community-staging-x86_64/ibam-0.5.2-debian-sysfs-lenovo.patch	                        (rev 0)
+++ community-staging-x86_64/ibam-0.5.2-debian-sysfs-lenovo.patch	2015-12-06 01:44:11 UTC (rev 148738)
@@ -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)
+          {

Copied: ibam/repos/community-staging-x86_64/ibam-0.5.2-sysfs.patch (from rev 148737, ibam/trunk/ibam-0.5.2-sysfs.patch)
===================================================================
--- community-staging-x86_64/ibam-0.5.2-sysfs.patch	                        (rev 0)
+++ community-staging-x86_64/ibam-0.5.2-sysfs.patch	2015-12-06 01:44:11 UTC (rev 148738)
@@ -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;

Copied: ibam/repos/community-staging-x86_64/ibam.install (from rev 148737, ibam/trunk/ibam.install)
===================================================================
--- community-staging-x86_64/ibam.install	                        (rev 0)
+++ community-staging-x86_64/ibam.install	2015-12-06 01:44:11 UTC (rev 148738)
@@ -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