Index: debian/README.Debian
===================================================================
--- debian/README.Debian	(revision fc82be67d1f785218273e6269ed9d089a89b2bfd)
+++ debian/README.Debian	(revision a83442a7c4dbf99937e9e5397e5665c671694161)
@@ -1,5 +1,5 @@
-                   *** NEWS (Version 1.1 and later) ***
+                   *** NEWS (Version 1.2 and later) ***
 
-Starting from version 1.1, BitlBee has a forking daemon mode. The Debian
+Starting from version 1.2, BitlBee has a forking daemon mode. The Debian
 package now uses this mode by default, instead of inetd mode. If you don't
 want to use this, you can disable the init scripts (best way to do this is
Index: debian/changelog
===================================================================
--- debian/changelog	(revision fc82be67d1f785218273e6269ed9d089a89b2bfd)
+++ debian/changelog	(revision a83442a7c4dbf99937e9e5397e5665c671694161)
@@ -1,11 +1,32 @@
-bitlbee (1.1.1dev-0pre) unstable; urgency=low
-
+bitlbee (1.2-1) unstable; urgency=low
+
+  * New upstream release. (Closes: #325017, #386914, #437515)
+  * With hopefully completely sane charset handling (Closes: #296145)
   * Switched to the new forking daemon mode. Added /etc/default/bitlbee
     file, an init script. People who want to stick with inetd can do so, see
     the defaults file.
+    (Closes: #460741, #466171, #294585, #345038, #306452, #392682)
   * Got rid of debconf Woody compatibility stuff.
   * No more MPL code in BitlBee, thanks to the Jabber module rewrite!
-
- -- Wilmer van der Gaast <wilmer@gaast.net>  Fri, 06 Jul 2007 09:09:36 +0100
+  * Added Italian translation, sorry for taking so long! (Closes: #448238)
+  * Added libevent dependency (more reliable event handling).
+  * Removed GLib 1.x dependency because BitlBee really requires GLib >=2.4.
+
+ -- Wilmer van der Gaast <wilmer@gaast.net>  Tue, 18 Mar 2008 23:44:19 +0000
+
+bitlbee (1.0.4-2) unstable; urgency=low
+
+  * Removed $DEB_BUILD_OPTIONS because apparently buildds fill it with crap.
+    (Closes: #458717)
+
+ -- Wilmer van der Gaast <wilmer@gaast.net>  Mon, 11 Feb 2008 19:15:33 +0000
+
+bitlbee (1.0.4-1) unstable; urgency=low
+
+  * New upstream release.
+  * Changed libnss-dev dependency. (Closes: #370442)
+  * Added build-indep rule to debian/rules. (Closes: #395673)
+
+ -- Wilmer van der Gaast <wilmer@gaast.net>  Wed, 29 Aug 2007 20:24:28 +0100
 
 bitlbee (1.0.3-1.3) unstable; urgency=low
Index: debian/control
===================================================================
--- debian/control	(revision fc82be67d1f785218273e6269ed9d089a89b2bfd)
+++ debian/control	(revision a83442a7c4dbf99937e9e5397e5665c671694161)
@@ -4,5 +4,5 @@
 Maintainer: Wilmer van der Gaast <wilmer@gaast.net>
 Standards-Version: 3.5.9
-Build-Depends: libglib2.0-dev | libglib-dev, libgnutls-dev | libnss-dev (>= 1.6), debconf-2.0, po-debconf
+Build-Depends: libglib2.0-dev (>= 2.4), libevent-dev, libgnutls-dev | libnss-dev (>= 1.6), debconf-2.0, po-debconf
 
 Package: bitlbee
Index: debian/po/it.po
===================================================================
--- debian/po/it.po	(revision a83442a7c4dbf99937e9e5397e5665c671694161)
+++ debian/po/it.po	(revision a83442a7c4dbf99937e9e5397e5665c671694161)
@@ -0,0 +1,36 @@
+# Italian translation of the bitlbee debconf template
+# This file is distributed under the same license as the bitlbee package
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Luca Monducci <luca.mo@tiscali.it>, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bitlbee\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-08-30 04:31+0200\n"
+"PO-Revision-Date: 2007-10-27 11:52+0200\n"
+"Last-Translator: Luca Monducci <luca.mo@tiscali.it>\n"
+"Language-Team: Italian <debian-l10n-italian@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:1001
+msgid "On what TCP port should BitlBee listen for connections?"
+msgstr "Su quale porta TCP si deve mettere in ascolto BitlBee?"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:1001
+msgid ""
+"BitlBee normally listens on the regular IRC port, 6667. This might not be a "
+"very good idea when you're running a real IRC daemon as well. 6668 might be "
+"a good alternative. Leaving this value blank means that BitlBee will not be "
+"run automatically."
+msgstr ""
+"Normalmente BitlBee si mette in ascolto sulla consueta porta IRC, la 6667. "
+"Questa potrebbe non essere una buona idea se è in esecuzione anche un reale "
+"demone IRC. La porta 6668 potrebbe essere una valida alternativa. Lasciando "
+"vuoto questo valore BitlBee non viene avviato automaticamente."
Index: debian/postinst
===================================================================
--- debian/postinst	(revision fc82be67d1f785218273e6269ed9d089a89b2bfd)
+++ debian/postinst	(revision a83442a7c4dbf99937e9e5397e5665c671694161)
@@ -16,7 +16,14 @@
 [ -r /etc/default/bitlbee ] && source /etc/default/bitlbee
 
-if [ "$BITLBEE_DISABLED" = "0" ]; then
+if [ "$BITLBEE_DISABLED" = "0" ] && expr "$2" : '0\..*' > /dev/null || expr "$2" : '1\.0\..*' > /dev/null; then
 	## In case it's still there (if we're upgrading right now)
 	update-inetd --remove '.*/usr/sbin/bitlbee'
+	if grep -q /usr/sbin/bitlbee /etc/inetd.conf 2> /dev/null; then
+		# Thanks for breaking update-inetd! (bugs.debian.org/311111)
+		# I hope that it works at least with xinetd, because this
+		# emergency hack doesn't:
+		perl -pi -e 's:^[^#].*/usr/sbin/bitlbee$:## Now using daemon mode\: # $&:' /etc/inetd.conf
+		killall -HUP inetd
+	fi
 fi
 
Index: debian/postrm
===================================================================
--- debian/postrm	(revision fc82be67d1f785218273e6269ed9d089a89b2bfd)
+++ debian/postrm	(revision a83442a7c4dbf99937e9e5397e5665c671694161)
@@ -9,3 +9,4 @@
 
 update-rc.d bitlbee remove > /dev/null 2>&1 || true
-deluser --remove-home bitlbee || true
+deluser --system --remove-home bitlbee || true
+rm -f /etc/default/bitlbee
Index: debian/rules
===================================================================
--- debian/rules	(revision fc82be67d1f785218273e6269ed9d089a89b2bfd)
+++ debian/rules	(revision a83442a7c4dbf99937e9e5397e5665c671694161)
@@ -3,13 +3,16 @@
 DEBUG ?= 0
 
+ifdef BITLBEE_VERSION
+BITLBEE_FORCE_VERSION=1
+else
 # Want to use the full package version number instead of just the release.
 BITLBEE_VERSION ?= "$(shell dpkg-parsechangelog | grep ^Version: | awk '{print $$2}')"
 export BITLBEE_VERSION
-
+endif
 
 build-arch: build-arch-stamp
 build-arch-stamp:
 	if [ ! -d debian ]; then exit 1; fi
-	./configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee $(DEB_BUILD_OPTIONS)
+	./configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent $(DEB_BUILD_OPTIONS)
 	$(MAKE)
 #	$(MAKE) -C doc/ all
@@ -66,5 +69,5 @@
 		find usr -type f -exec md5sum {} \; > DEBIAN/md5sums
 	dpkg-shlibdeps -Tdebian/bitlbee.substvars -dDepends debian/bitlbee/usr/sbin/bitlbee
-ifdef BITLBEE_VERSION
+ifdef BITLBEE_FORCE_VERSION
 	dpkg-gencontrol -ldebian/changelog -isp -pbitlbee -Tdebian/bitlbee.substvars -Pdebian/bitlbee -v1:$(BITLBEE_VERSION)-0 -V'debconf-depends=debconf (>= 1.2.0) | debconf-2.0'
 else
