--- xfce4-battery-plugin-0.5.1.orig/debian/copyright +++ xfce4-battery-plugin-0.5.1/debian/copyright @@ -0,0 +1,45 @@ +This package was debianized by Andrew Lau on +Wed, 29 Oct 2003 15:47:14 +1100. + +It was downloaded from + +Upstream Authors: + Nick Penwardeni + Benedikt Meurer + edscott wilson garcia + Rickard E. Faith + Noberasco Michele <2001s098@educ.disi.unige.it + +Copyrights: +battery.c: + © 2003 Nicholas Penwarden + © 2003 Benedikt Meurer + © 2003 Edscott Wilson Garcia + © 2005 Eduard Roccatello + © 2006 Nick Schermer +libacpi: + © 2002 Costantino Pistagna + © 2003 Edscott Wilson Garcia + © 2003 Noberasco Michele <2001s098@educ.disi.unige.it> +libapm: © 1996, 1997 Rickard E. Faith + +Licensing: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. --- xfce4-battery-plugin-0.5.1.orig/debian/control +++ xfce4-battery-plugin-0.5.1/debian/control @@ -0,0 +1,23 @@ +Source: xfce4-battery-plugin +Section: x11 +Priority: optional +Maintainer: Debian Xfce Maintainers +Uploaders: Emanuele Rocca , Simon Huggins , Yves-Alexis Perez +Build-Depends: autotools-dev, cdbs, debhelper (>= 4.1), libgtk2.0-dev, + xfce4-panel-dev (>= 4.7.0), libxml2-dev, libxml-parser-perl, + libxfce4util-dev, libxfcegui4-dev +Standards-Version: 3.8.0 +Homepage: http://goodies.xfce.org/ +Vcs-Svn: svn://svn.debian.org/pkg-xfce/goodies/xfce4-battery-plugin/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-xfce/goodies/xfce4-battery-plugin/ + +Package: xfce4-battery-plugin +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: battery monitor plugin for the Xfce4 panel + A battery monitor panel plugin for Xfce4, compatible with APM and ACPI, using + either /proc files or the new sysfs files for recent kernels. You can use this + applet to monitor your battery level and be notified when your battery reaches + low and critcal levels. The applet can even be programmed to execute a command + on low and critcal levels. + --- xfce4-battery-plugin-0.5.1.orig/debian/README.Debian +++ xfce4-battery-plugin-0.5.1/debian/README.Debian @@ -0,0 +1,12 @@ +You need a working APM/ACPI configuration in order to take +advantage of this plugin. + +Please enable *at least* the following options for ACPI: + +CONFIG_ACPI +CONFIG_ACPI_AC +CONFIG_ACPI_BATTERY + +Or the following, for APM: + +CONFIG_APM --- xfce4-battery-plugin-0.5.1.orig/debian/compat +++ xfce4-battery-plugin-0.5.1/debian/compat @@ -0,0 +1 @@ +4 --- xfce4-battery-plugin-0.5.1.orig/debian/watch +++ xfce4-battery-plugin-0.5.1/debian/watch @@ -0,0 +1,4 @@ +version=3 +http://goodies.xfce.org/releases/xfce4-battery-plugin/ \ + xfce4-battery-plugin-(.*)\.tar\.bz2 + --- xfce4-battery-plugin-0.5.1.orig/debian/changelog +++ xfce4-battery-plugin-0.5.1/debian/changelog @@ -0,0 +1,197 @@ +xfce4-battery-plugin (0.5.1-1build2) natty; urgency=low + + * Rebuild against xfce4-panel 4.7. + + -- Lionel Le Folgoc Sun, 05 Dec 2010 11:15:18 +0100 + +xfce4-battery-plugin (0.5.1-1build1) maverick; urgency=low + + * Rebuild against updated xfce4-panel shlibs. + + -- Lionel Le Folgoc Wed, 09 Jun 2010 22:00:38 +0200 + +xfce4-battery-plugin (0.5.1-1) unstable; urgency=low + + * New upstream release. + * debian/patches: + - 03_lower-acpi-polling removed, same thing is included upstream now. + (kind-of) closes: #498337 + - 02_fix-2.6.21 same. + - 05_fix-apm-kfreebsd-amd6 as well. + - 08_ja.po too. + - 08_no-battery-display added, correctly handle cases when no battery is + present. Patch taken from Xfce #3546. closes: #494099 + * debian/control: + - remove Rudy Godoy from uploaders. + - add build-dep on libxfce4util-dev, libxfcegui4-dev. + - add dep on ${misc:Depends}. + + -- Yves-Alexis Perez Sun, 22 Feb 2009 18:34:36 +0100 + +xfce4-battery-plugin (0.5.0-7) unstable; urgency=low + + * debian/patches: + - 08_ja.po added, add japanese translation. closes: #475913 + * debian/control: + - update long description based on Ubuntu one. + - remove Martin Loschwitz from Uploaders. + - update standards version to 3.8.0. + + -- Yves-Alexis Perez Thu, 03 Jul 2008 08:37:17 +0200 + +xfce4-battery-plugin (0.5.0-6) unstable; urgency=low + + * debian/patches: + - 04_use-sysfs dropped, it causes too many problems. + - 07_use-sysfs-fixed added, enable generic sysfs use. + Thanks Daniel Gibson. closes: #466058 + + -- Yves-Alexis Perez Sun, 06 Apr 2008 11:39:22 +0200 + +xfce4-battery-plugin (0.5.0-5) unstable; urgency=low + + * debian/patches: 06_fix-ftbfs-2.6.24 added. + * debian/copyright: + - added dates. + - use © sign. + + -- Yves-Alexis Perez Tue, 18 Mar 2008 20:24:24 +0100 + +xfce4-battery-plugin (0.5.0-4) unstable; urgency=low + + * debian/patches: + - 01_fix-ftbfs-kfreebsd removed. + - 05_fix-apm-kfreebsd-amd64 added: fix ftbfs on kfreebsd-amd64 where apm + doesn't exist. (Xfce 3811) + + -- Yves-Alexis Perez Thu, 24 Jan 2008 22:52:08 +0100 + +xfce4-battery-plugin (0.5.0-3) unstable; urgency=low + + [ Simon Huggins ] + * debian/control: Move fake Homepage field to a real one now dpkg + supports it. + * Add Vcs-* headers to debian/control + + [ Yves-Alexis Perez ] + * debian/patches + - 04_use-sysfs: use sysfs interface if available. + - 03_lower-acpi-polling: don't refresh acpi system too often. + * debian/control: + - update email address. + - updated standards to 3.7.3. + + -- Yves-Alexis Perez Sun, 09 Dec 2007 00:23:32 +0100 + +xfce4-battery-plugin (0.5.0-2) unstable; urgency=low + + * debian/patches: added 02_fix-2.6.21.patch which fix battery plugin on + 2.6.21 kernels and over. closes: #409971 + + -- Yves-Alexis Perez Thu, 13 Sep 2007 22:42:42 +0200 + +xfce4-battery-plugin (0.5.0-1) unstable; urgency=low + + (Yves-Alexis Perez) + * New upstream release. + * debian/patches: + - added 01_fix-ftbfs-kfreebsd.patch, thanks Cyril Brulebois. closes: #415658 + (Stefan Ott) + * debian/control: updated the url + (Simon Huggins) + * Build against the latest and greatest xfce. + + -- Yves-Alexis Perez Mon, 16 Apr 2007 19:01:41 +0100 + +xfce4-battery-plugin (0.4.90.2-1) unstable; urgency=low + + * New upstream release. + + -- Yves-Alexis Perez Sat, 23 Sep 2006 15:38:21 +0100 + +xfce4-battery-plugin (0.4.0-3) unstable; urgency=low + + * Add correct panel build-dep. + + -- Simon Huggins Wed, 26 Jul 2006 16:36:32 +0100 + +xfce4-battery-plugin (0.4.0-2) unstable; urgency=low + + * (Yves-Alexis Perez) + - Incremented build-deps to match Xfce 4.4 Beta 2 + * (Emanuele Rocca) + - Standards-Version bumped + + -- Yves-Alexis Perez Tue, 25 Jul 2006 00:17:35 +0200 + +xfce4-battery-plugin (0.4.0-1) unstable; urgency=low + + * New upstream (unofficial) release + * Removed explicit dependency on xfce4-panel (managed by shlibs) + + -- Yves-Alexis Perez Wed, 03 May 2006 19:17:15 +0100 + +xfce4-battery-plugin (0.3.0-2) unstable; urgency=low + + * (Jani Monoses) + Modify ACPI battery status reading patch in debian/patches to work + with newer kernels and properly detect AC on/off. Closes: #343159 + * Updated Standards-version + + -- Simon Huggins Wed, 28 Dec 2005 15:54:48 +0000 + +xfce4-battery-plugin (0.3.0-1) unstable; urgency=low + + * New upstream release + + -- Emanuele Rocca Mon, 08 Aug 2005 21:57:27 +0200 + +xfce4-battery-plugin (0.2.0-7) unstable; urgency=low + + * Moving to unstable + + -- Emanuele Rocca Sun, 19 Jun 2005 14:31:28 +0200 + +xfce4-battery-plugin (0.2.0-6) experimental; urgency=low + + * README.Debian added to document APM/ACPI stuff (Closes: #294308) + + -- Emanuele Rocca Sun, 12 Jun 2005 19:54:23 +0200 + +xfce4-battery-plugin (0.2.0-5) unstable; urgency=low + + * (Rudy Godoy) + - Package adopted by the Debian Xfce Maintainers (Closes: #245114) + - Fixed description synopsis's uppercase use + - Added patch which fixes /proc ac adapter path (Closes: #251796) + * (Emanuele Rocca) + - Switched to simple-patchsys.mk (CDBS) + * (Simon Huggins) + - Add the libtool update magic + + -- Emanuele Rocca Sun, 23 Jan 2005 21:07:44 +0100 + +xfce4-battery-plugin (0.2.0-4) unstable; urgency=low + + * Uploading with maintainer set to QA Group + + -- Andrew Pollock Sun, 16 May 2004 22:21:49 +1000 + +xfce4-battery-plugin (0.2.0-3) unstable; urgency=low + + * Remove bashism from debian/rules + + -- Andrew Lau Sat, 8 Nov 2003 14:36:50 +1100 + +xfce4-battery-plugin (0.2.0-2) unstable; urgency=low + + * Remove libtool library and object. + + -- Andrew Lau Fri, 7 Nov 2003 16:16:35 +1100 + +xfce4-battery-plugin (0.2.0-1) unstable; urgency=low + + * Initial Release. + + -- Andrew Lau Wed, 29 Oct 2003 15:47:14 +1100 + --- xfce4-battery-plugin-0.5.1.orig/debian/rules +++ xfce4-battery-plugin-0.5.1/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk +include /usr/share/cdbs/1/class/autotools.mk + +binary-post-install/xfce4-battery-plugin:: + -rm -rf debian/xfce4-battery-plugin/usr/lib/xfce4/panel-plugins/*.a + -rm -rf debian/xfce4-battery-plugin/usr/lib/xfce4/panel-plugins/*.la --- xfce4-battery-plugin-0.5.1.orig/debian/patches/07_use-sysfs-fixed.patch +++ xfce4-battery-plugin-0.5.1/debian/patches/07_use-sysfs-fixed.patch @@ -0,0 +1,356 @@ +diff -ru xfce4-battery-plugin-0.5.0.orig/panel-plugin/libacpi.c xfce4-battery-plugin-0.5.0-fixed/panel-plugin/libacpi.c +--- xfce4-battery-plugin-0.5.0.orig/panel-plugin/libacpi.c 2008-04-06 02:56:10.502679698 +0200 ++++ xfce4-battery-plugin-0.5.0-fixed/panel-plugin/libacpi.c 2008-04-06 03:15:11.306678469 +0200 +@@ -54,6 +54,10 @@ + + static char batteries[MAXBATT][128]; + static char battinfo[MAXBATT][128]; ++/* path to AC adapter because not all AC adapter are listed ++in /sys/class/power_supply/AC/ this obviously only supports one AC adapter. */ ++static char sysfsacdir[128]; ++ + #ifndef __linux__ + #if HAVE_SYSCTL + static int +@@ -181,9 +185,76 @@ + #endif + #endif + ++int check_acpi_sysfs(void) ++{ ++ DIR *sysfs; ++ struct dirent *batt; ++ char *name; ++ FILE *typefile; ++ char typepath[128]; ++ char tmptype[8]; ++ ++ sysfs = opendir("/sys/class/power_supply"); ++ if (sysfs == 0) ++ { ++ #ifdef DEBUG ++ printf("DBG:No acpi support for sysfs. Trying procfs...\n"); ++ #endif ++ return 2; ++ } ++ ++ while ((batt = readdir(sysfs))) ++ { ++ name = batt->d_name; ++ if (!strncmp(".", name, 1)) continue; ++ /* check whether /sys/class/power_supply/$name/type exists and ++ contains "Battery" or "Mains" */ ++ sprintf(typepath, "/sys/class/power_supply/%s/type",name); ++ if(!(typefile = fopen(typepath, "r"))) continue; ++ fgets(tmptype, 8, typefile); ++ fclose(typefile); ++ if(strncmp("Battery", tmptype, 7)==0) ++ { ++ sprintf(batteries[batt_count], "/sys/class/power_supply/%s", name); ++ #ifdef DEBUG ++ printf("DBG:battery number %d at:\n",batt_count); ++ printf("DBG:sysfs dir->%s\n",batteries[batt_count]); ++ printf("DBG:------------------------\n"); ++ #endif ++ batt_count++; ++ } ++ /* I guess that the type of the AC adapter is always "Mains" (?) */ ++ else if(strncmp("Mains", tmptype, 5)==0){ ++ sprintf(sysfsacdir, "/sys/class/power_supply/%s", name); ++ #ifdef DEBUG ++ printf("DBG:sysfs AC dir->%s\n",sysfsacdir); ++ printf("DBG:------------------------\n"); ++ #endif ++ } ++ } ++ closedir(sysfs); ++ if ( batt_count == 0 ) ++ { ++#ifdef DEBUG ++ printf("DBG:No acpi support for sysfs. Trying procfs...\n"); ++#endif ++ acpi_sysfs = 0; ++ return 2; ++ } ++ else ++ { ++ acpi_sysfs = 1; ++ return 0; ++ } ++} ++ + /* see if we have ACPI support */ + int check_acpi(void) + { ++#ifdef __linux__ ++ if ( check_acpi_sysfs() == 0 ) ++ return 0; ++#endif + DIR *battdir; + struct dirent *batt; + char *name; +@@ -262,9 +333,82 @@ + #endif + } + ++int read_sysfs_int(char* filename) ++{ ++ FILE* f; ++ f = fopen(filename,"r"); ++ if ( !f ) ++ { ++#ifdef DEBUG ++ printf("DBG:Could not open %s\n",filename); ++#endif ++ return 0; ++ } ++ int out; ++ fscanf(f,"%d",&out); ++ fclose(f); ++ return out; ++} ++ ++char* read_sysfs_string(char* filename) ++{ ++ FILE* f; ++ f = fopen(filename,"r"); ++ if ( !f ) ++ { ++#ifdef DEBUG ++ printf("DBG:Could not open %s\n",filename); ++#endif ++ return NULL; ++ } ++ fscanf(f,"%s",buf2); ++ fclose(f); ++ return buf2; ++} ++ ++int read_acad_state_sysfs(void) ++{ ++ DIR *sysfs; ++ struct dirent *propety; ++ char *name; ++ char onlinefilepath[128]; ++ ++ sysfs = opendir(sysfsacdir); ++ if (sysfs == 0) ++ { ++ #ifdef DEBUG ++ printf("DBG:Can't open %s",sysfsacdir); ++ #endif ++ return 0; ++ } ++ closedir(sysfs); ++ ++ if (!acadstate) acadstate=(ACADstate *)malloc(sizeof(ACADstate)); ++ /* this code doesn't make much sense.. why look at the whole directory?! ++ while ((propety = readdir(sysfs))) ++ { ++ name = propety->d_name; ++ if (!strncmp(".", name, 1) || !strncmp("..", name, 2)) continue; ++ ++ if (strcmp(name,"online") == 0) ++ { ++ acadstate->state = ( read_sysfs_int("/sys/class/power_supply/AC/online") == 1 ) ; ++ } ++ } ++ */ ++ sprintf(onlinefilepath, "%s/online", sysfsacdir); ++ /* if onlinefilepath doesn't exist read_sysfs_int() will return 0 ++ so acadstate->state will be 0, that should be ok */ ++ acadstate->state = ( read_sysfs_int(onlinefilepath) == 1 ); ++ ++ return acadstate->state; ++} ++ + int read_acad_state(void) + { + #ifdef __linux__ ++ if (acpi_sysfs) ++ return read_acad_state_sysfs(); + FILE *acpi; + char *ptr; + char stat; +@@ -354,20 +498,83 @@ + #endif + } + ++int read_acpi_info_sysfs(int battery) ++{ ++ DIR *sysfs; ++ struct dirent *propety; ++ char *name; ++ ++ sysfs = opendir(batteries[battery]); ++ if (sysfs == 0) ++ { ++ #ifdef DEBUG ++ printf("DBG:Can't open %s!\n", batteries[battery]); ++ #endif ++ return 0; ++ } ++ /* malloc.. might explain the random battery level values on 2.6.24 ++ systems (energe_full is called charge_full so the value isn't initialised ++ and some random data from the heap is displayed..) ++ if (!acpiinfo) acpiinfo=(ACPIinfo *)malloc(sizeof(ACPIinfo)); ++ */ ++ if (!acpiinfo) acpiinfo=(ACPIinfo *)calloc(1, sizeof(ACPIinfo)); ++ ++ while ((propety = readdir(sysfs))) ++ { ++ name = propety->d_name; ++ if (!strncmp(".", name, 1) || !strncmp("..", name, 2)) continue; ++ /* at least on my system this is called charge_full */ ++ if ((strcmp(name,"energy_full") == 0) || (strcmp(name,"charge_full") == 0)) ++ { ++ sprintf(buf,"%s/%s",batteries[battery], name); ++ acpiinfo->last_full_capacity = read_sysfs_int(buf); ++ } ++ if ((strcmp(name,"energy_full_design") == 0) || (strcmp(name,"charge_full_design") == 0)) ++ { ++ sprintf(buf,"%s/%s",batteries[battery], name); ++ acpiinfo->design_capacity = read_sysfs_int(buf); ++ } ++ if (strcmp(name,"technology") == 0) ++ { ++ char *tmp; ++ sprintf(buf,"%s/%s",batteries[battery], name); ++ tmp = read_sysfs_string(buf); ++ if (tmp != NULL) ++ { ++ if (strcmp(tmp,"Li-ion") == 0) ++ acpiinfo->battery_technology = 1; ++ else ++ acpiinfo->battery_technology = 0; ++ } ++ } ++ if (strcmp(name,"present") == 0) ++ { ++ sprintf(buf,"%s/%s",batteries[battery], name); ++ acpiinfo->present = read_sysfs_int(buf); ++ } ++ } ++ closedir(sysfs); ++ return acpiinfo->present; ++} ++ + int read_acpi_info(int battery) + { + #ifdef __linux__ +- FILE *acpi; +- char *ptr; +- char stat; +- int temp; +- + if (battery > MAXBATT) { + #ifdef DEBUG + printf("DBG: error, battery > MAXBATT (%d)\n",MAXBATT); + #endif + return 0; + } ++ ++ if (acpi_sysfs) ++ return read_acpi_info_sysfs(battery); ++ ++ FILE *acpi; ++ char *ptr; ++ char stat; ++ int temp; ++ + if (!(acpi = fopen (battinfo[battery], "r"))) { + #ifdef DEBUG + printf("DBG:cannot open %s for read!\n",battinfo[battery]); +@@ -514,9 +721,80 @@ + + } + ++int read_acpi_state_sysfs(int battery) ++{ ++ DIR *sysfs; ++ struct dirent *propety; ++ char *name; ++ ++ sysfs = opendir(batteries[battery]); ++ if (sysfs == 0) ++ { ++ #ifdef DEBUG ++ printf("DBG:Can't open %s!\n", batteries[battery]); ++ #endif ++ return 0; ++ } ++ ++ /* again it might be better to use calloc ++ if (!acpistate) acpistate=(ACPIstate *)malloc(sizeof(ACPIstate)); ++ */ ++ if (!acpistate) acpistate=(ACPIstate *)calloc(1, sizeof(ACPIstate)); ++ ++ while ((propety = readdir(sysfs))) ++ { ++ name = propety->d_name; ++ if (!strncmp(".", name, 1) || !strncmp("..", name, 2)) continue; ++ ++ if (strcmp(name,"status") == 0) ++ { ++ char *tmp; ++ sprintf(buf,"%s/%s",batteries[battery], name); ++ tmp = read_sysfs_string(buf); ++ if ( tmp != NULL ) ++ { ++ if (strcmp(tmp,"Charging") == 0) ++ acpistate->state = CHARGING; ++ else if (strcmp(tmp,"Discharging") == 0) ++ acpistate->state = DISCHARGING; ++ else if (strcmp(tmp,"Full") == 0) ++ acpistate->state = POWER; ++ else ++ acpistate->state = UNKNOW; ++ } ++ } ++ /* on my system this is called charge_now */ ++ if ((strcmp(name,"energy_now") == 0) || (strcmp(name,"charge_now") == 0)) ++ { ++ sprintf(buf,"%s/%s",batteries[battery], name); ++ acpistate->rcapacity = read_sysfs_int(buf); ++ acpistate->percentage = (((float) acpistate->rcapacity)/acpiinfo->last_full_capacity) * 100; ++ } ++ if (strcmp(name,"current_now") == 0) ++ { ++ sprintf(buf,"%s/%s",batteries[battery], name); ++ acpistate->prate = read_sysfs_int(buf); ++ if ( acpistate->prate < 0 ) ++ acpistate->prate = 0; ++ if ( acpistate->prate > 0 ) ++ acpistate->rtime = (((float) acpistate->rcapacity) / acpistate->prate) * 60; ++ } ++ if (strcmp(name,"voltage_now") == 0) ++ { ++ sprintf(buf,"%s/%s",batteries[battery], name); ++ acpistate->pvoltage = read_sysfs_int(buf); ++ } ++ } ++ closedir(sysfs); ++ return acpiinfo->present; ++} ++ + int read_acpi_state(int battery) + { + #ifdef __linux__ ++ if (acpi_sysfs) ++ return read_acpi_state_sysfs(battery); ++ + FILE *acpi; + char *ptr; + char stat; +diff -ru xfce4-battery-plugin-0.5.0.orig/panel-plugin/libacpi.h xfce4-battery-plugin-0.5.0-fixed/panel-plugin/libacpi.h +--- xfce4-battery-plugin-0.5.0.orig/panel-plugin/libacpi.h 2007-01-17 18:56:51.000000000 +0100 ++++ xfce4-battery-plugin-0.5.0-fixed/panel-plugin/libacpi.h 2008-04-05 22:13:55.522679792 +0200 +@@ -80,6 +80,8 @@ + int batt_count; + /* temp buffer */ + char buf[512]; ++char buf2[512]; ++int acpi_sysfs; + #else + extern int batt_count; + extern ACPIstate *acpistate; --- xfce4-battery-plugin-0.5.1.orig/debian/patches/06_fix-ftbfs-2.6.24.patch +++ xfce4-battery-plugin-0.5.1/debian/patches/06_fix-ftbfs-2.6.24.patch @@ -0,0 +1,12 @@ +--- xfce4-battery-plugin-0.5.0/panel-plugin/libapm.h.orig 2008-03-18 20:10:58.000000000 +0100 ++++ xfce4-battery-plugin-0.5.0/panel-plugin/libapm.h 2008-03-18 20:14:45.000000000 +0100 +@@ -17,8 +17,8 @@ + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +-#include + #include ++#include + + #define APM_PROC "/proc/apm" + #define APM_DEVICE "/dev/apm_bios" --- xfce4-battery-plugin-0.5.1.orig/debian/patches/08_no-battery-display.patch +++ xfce4-battery-plugin-0.5.1/debian/patches/08_no-battery-display.patch @@ -0,0 +1,21 @@ +--- panel-plugin/battery.c.old 2007-09-14 23:40:34.282880732 +0100 ++++ panel-plugin/battery.c 2007-09-15 00:31:27.768941875 +0100 +@@ -502,8 +502,16 @@ battmon.c:241: for each function it appe + + + if(acline) { +- char *t=(charge<99.9)?_("(Charging from AC)"):_("(AC on-line)"); +- if(battmon->options.tooltip_display_percentage) { ++ char *t1=(charge<99.9)?_("(Charging from AC)"):_("(AC on-line)"); ++ char *t2=_("(No battery, AC on-line)"); ++ char *t; ++ ++ if((battmon->method == BM_USE_ACPI) && (acpiinfo->present == 0)) ++ t=t2; ++ else ++ t=t1; ++ ++ if(battmon->options.tooltip_display_percentage) { + g_snprintf(buffer, sizeof(buffer), "%d%% %s", charge,t); + } + else