--- battery-stats-0.3.5.orig/debian/rules
+++ battery-stats-0.3.5/debian/rules
@@ -0,0 +1,16 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+
+build/battery-stats::
+	mogrify -format xpm -geometry 32x32 $(CURDIR)/pixmaps/battery-stats.png
+
+clean::
+	rm -f $(CURDIR)/pixmaps/battery-stats.xpm
+
+install/battery-stats::
+	cp pixmaps/battery-stats.xpm $(CURDIR)/debian/battery-stats/usr/share/battery-stats/pixmaps/battery-stats.xpm
+	mkdir -p $(CURDIR)/debian/battery-stats/usr/share/applications
+	install -m 644 $(CURDIR)/debian/battery-stats.desktop \
+		$(CURDIR)/debian/battery-stats/usr/share/applications/battery-stats.desktop
--- battery-stats-0.3.5.orig/debian/changelog
+++ battery-stats-0.3.5/debian/changelog
@@ -0,0 +1,171 @@
+battery-stats (0.3.5-1) unstable; urgency=low
+
+  * New upstream version
+  * debian/control:
+    + Standards-Version bumped to 3.8.1
+    + added DM-Upload-Allowed: yes
+    + added the new upstream homepage
+  * debian/rules: added $(CURDIR) to all occurrences
+  * debian/watch: updated with the new path for downloads
+
+ -- Antonio Radici <antonio@dyne.org>  Sat, 13 Jun 2009 20:58:26 +0100
+
+battery-stats (0.3.4-2) experimental; urgency=low
+
+  * readded debian/logrotate which got lost between 0.3.3 and 0.3.4
+
+ -- Antonio Radici <antonio@dyne.org>  Sat, 31 Jan 2009 23:39:09 +0000
+
+battery-stats (0.3.4-1) experimental; urgency=low
+
+  [ Antonio Radici ]
+  * debianizing new upstream release which includes:
+    + all debian patches
+    + autotools packaging and optinal ACPI support
+  * debian/ rebuilt to use cdbs, so it will correctly use autotools
+  * debian/control:
+    + added [i386 amd64 ia64] to libacpi-dev Build-Depends
+      (Closes: #512701)
+    + added autotools-dev, cdbs and gnuplot-nox as dependencies
+  * debian/watch: added the new repository
+  * debian/copyright
+    + added new upstream author and repository URL
+    + GPL renamed GPL-2
+  * debian/changelog
+    + uploading on experimental
+  * debian/battery-stats.desktop
+    + added and distributed through debian/control
+
+  [ GonÃ©ri Le Bouder ]
+  * debian menu want xpm icon, adjust the debian/rules to generate it
+    from the .png and add a builddeps on imagemagick
+
+ -- Antonio Radici <antonio@dyne.org>  Sun, 25 Jan 2009 12:36:18 +0000
+
+battery-stats (0.3.3-3) unstable; urgency=low
+
+  * New maintainer (Closes: #473820)
+  * debian/copyright:
+    + updated the URL where the source can be found (Closes: #409825)
+  * debian/rules:
+    + modified to support dpatch
+  * debian/patches/gnuplot-newsyntax.patch:
+    + use the right gnuplot syntax to generate the graph 
+      (Closes: #283984)
+  * debian/patches/manpages.patch:
+    + make the package lintian clean by fixing two manpage warnings
+  * debian/patches/acpi-support.patch:
+    + add ACPI support (patch from "Michael Bunk" <michael.bunk@gmail.com>)
+    + (Closes: #287230)
+  * debian/patches/compiler-warnings.patch:
+    + remove some compiler warnings
+
+ -- Antonio Radici <antonio@dyne.org>  Sat, 17 Jan 2009 13:37:05 +0000
+
+battery-stats (0.3.3-2) unstable; urgency=low
+
+  * QA upload.
+  * Changed maintainer to Debian QA Group
+  * Changed to debhelper level 7
+  * Updated standards version
+  * Clean up rules, copyright, menu
+  * Remove log files on purge (closes: #326266)
+
+ -- Peter Eisentraut <petere@debian.org>  Mon, 16 Jun 2008 23:32:04 +0200
+
+battery-stats (0.3.3-1.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Added LSB formatted dependency info in init.d script (closes: #468299)
+
+ -- Peter Eisentraut <petere@debian.org>  Tue, 01 Apr 2008 22:45:11 +0200
+
+battery-stats (0.3.3-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * debian/logrotate now use invoke-rc.d (Closes: #367745)
+
+ -- Philippe Le Brouster <plb@ac-grenoble.fr>  Fri, 28 Sep 2007 23:59:00 +0200
+
+battery-stats (0.3.3-1) unstable; urgency=low
+
+  * New upstream release (Closes: bug#185623). Thanks to David Z Maze.
+
+ -- Karl E. Jorgensen <karl@jorgensen.com>  Fri, 21 Mar 2003 01:17:58 +0000
+
+battery-stats (0.3.2-1) unstable; urgency=low
+
+  * package adopted and uploaded by Werner Heuser <wehe@debian.org>
+    (Closes: bug#171112)
+  * No longer a debian-native package; gives more freedom to sponsor and NMUs.
+  * Calling battery-graph from the menu is now immune to log rotation.
+    oops.
+  * Increased standards-version to 3.5.6.1
+
+ -- Karl E. Jorgensen <karl@jorgensen.com>  Fri, 21 Feb 2003 14:46:38 +0000
+
+battery-stats (0.3.1) unstable; urgency=low
+
+  * Makefile no longer relies on PATH containing "." when calling
+    mkinstalldirs. [Credit to Werner Heuser for spotting this]
+  * debian/control::Architecture changed to "any". Although this is
+    completely untested on other architectures than i386, at least this
+    will give non-i386 users a chance to test it.
+
+ -- Karl E. Jorgensen <karl@jorgensen.com>  Thu, 16 Jan 2003 14:20:34 +0000
+
+battery-stats (0.3) unstable; urgency=low
+
+  * The "I Really Hate Trains" release. Despite this, no railway staff was
+    injured during the preparation of this release.
+  * New program: battery-log to separate out extraction the log data from the
+    log files
+  * new option --flush on battery-stats-collector to control how often
+    the logfile is fflush()'d. It tended to keep the disk spinning, and thus
+    wasting battery. oops.
+  * battery-stats-collector's args can now be overridden by
+    /etc/battery-stats.conf
+  * battery-graph now interprets all dates as LOCAL TIME, and not UTC.
+    All this UTC stuff was far too confusing.
+    This will make the battery-graph command INCOMPATIBLE with (but much more
+    intuitive than) the previous version.
+  * Dates & Times on the graph are now in local time
+  * battery-graph supports durations in units of weeks
+  * New options on battery-graph :
+     --since  as shorthand for --from xxx --to now
+     --display
+     --geometry
+     --title
+  * battery-graph: -T option discouraged: use --text instead.
+  * Minor tweaks in the man-page for battery-graph
+  * battery-stats-collector: new option: --ignore-missing-battery
+  * Split out default settings, /etc/battery-stats.conf is more friendly
+    now
+  * Changelog for 0.2 incorrectly said that the BIOS estimate was shown on
+    the graph. Don't believe it. So far, it is only logged. We apologise for
+    any inconvenience this may have caused (as they say on the trains...). No:
+    you don't get a refund.
+
+ -- Karl E. Jorgensen <karl@jorgensen.com>  Wed, 27 Nov 2002 14:00:05 +0000
+
+battery-stats (0.2) unstable; urgency=low
+
+  * Can now create graphs
+  * Also captures minutes-left according to apm
+  * Date is now also written in a human/gnuplot-friendly format
+  * Errors can now be logged to syslog
+  * Now accessible through the menu : Apps/System
+  * Logrotate will now take care of rotating the logs
+  * Graph now also shows BIOS estimate
+
+ -- Karl E. Jorgensen <karl@jorgensen.com>  Wed, 18 Sep 2002 23:40:03 +0100
+
+battery-stats (0.1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Karl E. Jorgensen <karl@jorgensen.com>  Wed, 18 Sep 2002 00:27:36 +0100
+
+Local variables:
+mode: debian-changelog
+End:
--- battery-stats-0.3.5.orig/debian/menu
+++ battery-stats-0.3.5/debian/menu
@@ -0,0 +1,4 @@
+?package(battery-stats):\
+ needs="X11"\
+ section="Applications/System/Monitoring"\
+ title="Battery Charge Graph" command="/usr/bin/battery-graph"
--- battery-stats-0.3.5.orig/debian/logrotate
+++ battery-stats-0.3.5/debian/logrotate
@@ -0,0 +1,16 @@
+/var/log/battery-stats {
+    rotate 5
+    delaycompress
+    missingok
+    notifempty
+    nocopytruncate
+    nomail
+    weekly
+    postrotate 
+        if which invoke-rc.d >/dev/null 2>&1; then 
+          invoke-rc.d battery-stats restart > /dev/null 
+        else 
+          /etc/init.d/battery-stats restart > /dev/null 
+        fi
+    endscript
+}
--- battery-stats-0.3.5.orig/debian/control
+++ battery-stats-0.3.5/debian/control
@@ -0,0 +1,20 @@
+Source: battery-stats
+Section: admin
+Priority: extra
+Maintainer: Antonio Radici <antonio@dyne.org>
+Build-Depends: debhelper (>= 7), libapm-dev, libacpi-dev [i386 amd64 ia64], cdbs, autotools-dev, gnuplot-nox (>= 4), imagemagick
+Standards-Version: 3.8.1
+DM-Upload-Allowed: yes
+Homepage: http://theforest.dyne.org/battery-stats/
+
+Package: battery-stats
+Architecture: any
+Depends: logrotate, gnuplot (>= 4.0.0), gzip (>= 1.3.2), ${shlibs:Depends}, ${misc:Depends}
+Description: collects statistics about charge of laptop batteries
+ This package provides battery-stats-collector, a daemon which will periodically 
+ collect statistics about the charge of the batteries present.
+ .
+ It also proves a binary called battery-graph, which can be used to generate
+ qplot graphs about the battery charge/discharge patters over time
+ .
+ Note: This requires APM or ACPI to be enabled and working in your kernel.
--- battery-stats-0.3.5.orig/debian/init.d
+++ battery-stats-0.3.5/debian/init.d
@@ -0,0 +1,72 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          battery-stats
+# Required-Start:    $remote_fs $syslog
+# Required-Stop:     $remote_fs $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: start/stop the battery statistics collector
+### END INIT INFO
+#
+# Based on skeleton written by Miquel van Smoorenburg <miquels@cistron.nl>.
+# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+# Modified for battery-stats by Karl E. Jørgensen <karl@jorgensen.com>
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/battery-stats-collector
+NAME=battery-stats-collector
+DESC="Battery statistics collector"
+
+# Please use /etc/battery-stats.conf to override these parameters.
+SYS_ARGS="--syslog --output /var/log/battery-stats"
+ARGS="--interval=60 --flush=10 --ignore-missing-battery"
+
+CONFIG=/etc/battery-stats.conf
+
+test -f $DAEMON || exit 0
+
+set -e
+
+if [ -f $CONFIG ]
+then
+    . $CONFIG
+fi
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: "
+	start-stop-daemon --background --make-pidfile --start --quiet \
+		--pidfile /var/run/$NAME.pid \
+		--exec $DAEMON -- $SYS_ARGS $ARGS
+	echo "$NAME."
+	;;
+  stop)
+	echo -n "Stopping $DESC: "
+	start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.pid \
+		--exec $DAEMON
+	echo "$NAME."
+	;;
+  reload|restart|force-reload)
+	#
+	#	If the "reload" option is implemented, move the "force-reload"
+	#	option to the "reload" entry above. If not, "force-reload" is
+	#	just the same as "restart".
+	#
+	echo -n "Restarting $DESC: "
+	start-stop-daemon --stop --quiet --pidfile \
+		/var/run/$NAME.pid --exec $DAEMON
+	sleep 1
+	start-stop-daemon --background --make-pidfile --start --quiet \
+		--pidfile /var/run/$NAME.pid \
+		--exec $DAEMON -- $SYS_ARGS $ARGS
+	echo "$NAME."
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
--- battery-stats-0.3.5.orig/debian/compat
+++ battery-stats-0.3.5/debian/compat
@@ -0,0 +1 @@
+7
--- battery-stats-0.3.5.orig/debian/watch
+++ battery-stats-0.3.5/debian/watch
@@ -0,0 +1,10 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# See uscan(1) for format
+
+# Compulsory line, this is a version 3 file
+version=3
+
+# Uncomment to examine a Webserver directory
+http://theforest.dyne.org/battery-stats/download/battery-stats-(.*)\.tar\.gz
--- battery-stats-0.3.5.orig/debian/battery-stats.desktop
+++ battery-stats-0.3.5/debian/battery-stats.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Battery Charge Graph
+Type=Application
+Comment
+Exec=/usr/bin/battery-graph
+Icon=/usr/share/battery-graph/pixmaps/battery-stats.xpm
+Terminal=false
+Categories=Utility
--- battery-stats-0.3.5.orig/debian/copyright
+++ battery-stats-0.3.5/debian/copyright
@@ -0,0 +1,44 @@
+This package was debianized by:
+
+    Antonio Radici <antonio@dyne.org> on Tue, 27 Jan 2009 18:40:21 +0000
+
+It was downloaded from:
+    (up to 0.3.3)
+    http://karl.jorgensen.com/battery-stats/ 
+    (from 0.3.4)
+    http://theforest.dyne.org/battery-stats/
+
+Upstream Authors:
+
+    Karl E. Jorgensen <karl@jorgensen.com>
+    Antonio Radici <antonio@dyne.org>
+
+Copyright:
+
+    <Copyright (C) 2002-2009 Karl E. Jorgesen>
+    <Copyright (C) 2009 Antonio Radici>
+
+License:
+
+    This package is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This package is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this package; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL-2'.
+
+The Debian packaging is:
+
+    Copyright C) 2009, Antonio Radici <antonio@dyne.org>
+
+and is licensed under the GPL, see above.
--- battery-stats-0.3.5.orig/debian/postrm
+++ battery-stats-0.3.5/debian/postrm
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+
+if [ "$1" = purge ]; then
+	rm -f /var/log/battery-stats*
+fi
+
+#DEBHELPER#
