Index: debian/changelog
===================================================================
--- debian/changelog	(revision e74c7fe11099e45da9a17b4d791162d57d2768f8)
+++ debian/changelog	(revision 92998915be47eab17e548af5c3dd43fa4eab9683)
@@ -1,10 +1,11 @@
 bitlbee (1.2-4) unstable; urgency=low
 
-  * Not a real release, just a placeholder for the changelog.
   * Fixed init script to use the BITLBEE_OPTS variable, not an undefined
-    DAEMON_OPT.
+    DAEMON_OPT. (Closes: #474583)
   * Added dependency information to the init script. (Closes: #472567)
-
- -- Wilmer van der Gaast <wilmer@gaast.net>  Sat, 29 Mar 2008 21:10:33 +0000
+  * Added bitlbee-dev package. Patch from RISKO Gergely <risko@debian.org>
+    with some small modifications. (Closes: #473480)
+
+ -- Wilmer van der Gaast <wilmer@gaast.net>  Wed, 07 May 2008 22:40:40 -0700
 
 bitlbee (1.2-3) unstable; urgency=low
Index: debian/control
===================================================================
--- debian/control	(revision e74c7fe11099e45da9a17b4d791162d57d2768f8)
+++ debian/control	(revision 92998915be47eab17e548af5c3dd43fa4eab9683)
@@ -12,2 +12,11 @@
  This program can be used as an IRC server which forwards everything you
  say to people on other chat networks: Jabber, ICQ, AIM, MSN and Yahoo.
+
+Package: bitlbee-dev
+Architecture: all
+Depends: bitlbee (= ${binary:Version})
+Description: An IRC to other chat networks gateway
+ This program can be used as an IRC server which forwards everything you
+ say to people on other chat networks: Jabber, ICQ, AIM, MSN and Yahoo.
+ .
+ This package holds development stuff for compiling plug-ins.
Index: debian/rules
===================================================================
--- debian/rules	(revision e74c7fe11099e45da9a17b4d791162d57d2768f8)
+++ debian/rules	(revision 92998915be47eab17e548af5c3dd43fa4eab9683)
@@ -13,5 +13,5 @@
 build-arch: build-arch-stamp
 build-arch-stamp:
-	if [ ! -d debian ]; then exit 1; fi
+	[ -d debian ]
 	./configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent
 	$(MAKE)
@@ -20,6 +20,6 @@
 
 clean:
-	if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
-	rm -rf build-arch-stamp debian/bitlbee debian/*.substvars debian/files
+	[ "`whoami`" = "root" -a -d debian ]
+	rm -rf build-arch-stamp debian/bitlbee debian/*.substvars debian/files debian/bitlbee-dev
 	-$(MAKE) distclean
 #	-$(MAKE) -C doc/ clean
@@ -27,5 +27,5 @@
 
 install-arch: build-arch
-	if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
+	[ "`whoami`" = "root" -a -d debian ]
 	mkdir -p debian/bitlbee/DEBIAN/
 	$(MAKE) install install-etc DESTDIR=`pwd`/debian/bitlbee
@@ -35,6 +35,13 @@
 	cp doc/user-guide/user-guide.html debian/bitlbee/usr/share/doc/bitlbee/
 
+install-indep: install-arch
+	[ "`whoami`" = "root" -a -d debian ]
+	mkdir -p debian/bitlbee-dev/DEBIAN/
+	$(MAKE) install-dev DESTDIR=`pwd`/debian/bitlbee-dev
+
+	mkdir -p debian/bitlbee-dev/usr/share/doc/bitlbee-dev/
+
 binary-arch: build-arch install-arch
-	if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
+	[ "`whoami`" = "root" -a -d debian ]
 
 	chmod 755 debian/post* debian/pre* debian/config debian/bitlbee.init
@@ -52,5 +59,5 @@
 		        doc/bitlbee/examples/* man/man8/bitlbee.8 man/man5/bitlbee.conf.5
 	
-	chown -R root.root debian/bitlbee/
+	chown -R root:root debian/bitlbee/
 	find debian/bitlbee/usr/share/ -type d -exec chmod 755 {} \;
 	find debian/bitlbee/usr/share/ -type f -exec chmod 644 {} \;
@@ -77,10 +84,25 @@
 	dpkg --build debian/bitlbee ..
 
-debug-build:
-	BITLBEE_VERSION=\"`date +%Y%m%d`-`hostname`-debug\" debian/rules clean binary DEBUG=1
+binary-indep: install-indep
+	[ "`whoami`" = "root" -a -d debian ]
 
-binary: binary-arch
+	chown -R root.root debian/bitlbee-dev/
+	find debian/bitlbee-dev/usr/share/ -type d -exec chmod 755 {} \;
+	find debian/bitlbee-dev/usr/share/ -type f -exec chmod 644 {} \;
+
+	cp debian/changelog debian/bitlbee-dev/usr/share/doc/bitlbee-dev/changelog.Debian
+	gzip -9 debian/bitlbee-dev/usr/share/doc/bitlbee-dev/changelog.Debian
+	cp debian/copyright debian/bitlbee-dev/usr/share/doc/bitlbee-dev/copyright
+
+	cd debian/bitlbee-dev; \
+		find usr -type f -exec md5sum {} \; > DEBIAN/md5sums
+
+	dpkg-gencontrol -ldebian/changelog -isp -pbitlbee-dev -Pdebian/bitlbee-dev
+
+	dpkg --build debian/bitlbee-dev ..
+
+binary: binary-arch binary-indep
 build: build-arch
-install: install-arch
+install: install-arch install-indep
 
-.PHONY: build-arch build clean binary-arch binary install-arch install
+.PHONY: build-arch build clean binary-arch binary install-arch install binary-indep install-indep
