aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-06-05 15:47:54 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-06-05 15:47:54 +0100
commit095a5f046c36c4cff689305fef81533a9e9603fc (patch)
treed23d5192f7f88382d62d856e05215860208ad914
parent04dc563f2a30476bf96e72ce3e66cb5a8b2606d3 (diff)
Redid debian/rules using debhelper, with good results. This creates mostly
fine debs. Need to do some more checks, and make sure bitlbee-libpurple gets the same maintainer scripts as bitlbee.
-rw-r--r--debian/bitlbee-common.docs6
-rw-r--r--debian/bitlbee-common.examples1
-rw-r--r--debian/changelog9
-rw-r--r--debian/compat1
-rw-r--r--debian/conffiles3
-rw-r--r--debian/control29
-rw-r--r--debian/patches/bitlbee.conf.diff4
-rwxr-xr-xdebian/rules163
8 files changed, 120 insertions, 96 deletions
diff --git a/debian/bitlbee-common.docs b/debian/bitlbee-common.docs
new file mode 100644
index 00000000..72ff657c
--- /dev/null
+++ b/debian/bitlbee-common.docs
@@ -0,0 +1,6 @@
+doc/user-guide/user-guide.txt
+doc/user-guide/user-guide.html
+doc/AUTHORS
+doc/CREDITS
+doc/FAQ
+doc/README
diff --git a/debian/bitlbee-common.examples b/debian/bitlbee-common.examples
new file mode 100644
index 00000000..81562b9e
--- /dev/null
+++ b/debian/bitlbee-common.examples
@@ -0,0 +1 @@
+utils/*
diff --git a/debian/changelog b/debian/changelog
index 56d0a551..ffb23ed8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+bitlbee (1.3-0) unstable; urgency=low
+
+ * Setting some bogus version number, fix that later.
+ * Now using debhelper to improve maintainability.
+ * Added a bitlbee-libpurple package, and split off docs and stuff into
+ bitlbee-common.
+
+ -- Wilmer van der Gaast <wilmer@gaast.net> Sat, 05 Jun 2010 15:16:38 +0100
+
bitlbee (1.2.6a-1) unstable; urgency=low
* New upstream version.
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 00000000..7f8f011e
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/conffiles b/debian/conffiles
deleted file mode 100644
index dcb4078e..00000000
--- a/debian/conffiles
+++ /dev/null
@@ -1,3 +0,0 @@
-/etc/bitlbee/motd.txt
-/etc/bitlbee/bitlbee.conf
-/etc/init.d/bitlbee
diff --git a/debian/control b/debian/control
index 8f861aeb..dfef8e39 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: net
Priority: optional
Maintainer: Wilmer van der Gaast <wilmer@gaast.net>
Uploaders: Jelmer Vernooij <jelmer@samba.org>
-Standards-Version: 3.8.0
+Standards-Version: 3.8.4
Build-Depends: libglib2.0-dev (>= 2.4), libevent-dev, libgnutls-dev | libnss-dev (>= 1.6), debconf-2.0, po-debconf, libpurple-dev
Homepage: http://www.bitlbee.org/
Vcs-Bzr: http://code.bitlbee.org/bitlbee/
@@ -11,11 +11,36 @@ DM-Upload-Allowed: yes
Package: bitlbee
Architecture: any
-Depends: ${shlibs:Depends}, adduser, net-tools, ${debconf-depends}, debianutils (>= 1.16)
+Depends: ${shlibs:Depends}, adduser, net-tools, debianutils (>= 1.16), bitlbee-common (>= ${source:Version}), bitlbee-common (<< ${source:Version}.1~)
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.
+Package: bitlbee-libpurple
+Architecture: any
+Depends: ${shlibs:Depends}, adduser, net-tools, debianutils (>= 1.16), bitlbee-common (>= ${source:Version}), bitlbee-common (<< ${source:Version}.1~)
+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 contains a version of BitlBee that uses the libpurple instant
+ messaging library instead of built-in code, which adds support for more IM
+ protocols (all protocols supported by Pidgin/Finch) and features (like file
+ transfers), at the price of being less lightweight.
+ .
+ This variant may not be very suitable for BitlBee instances used by many
+ (tens or hundreds) of clients.
+
+Package: bitlbee-common
+Architecture: all
+Replaces: bitlbee (<= 1.3)
+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 contains common files (mostly documentation) for bitlbee and
+ bitlbee-libpurple.
+
Package: bitlbee-dev
Architecture: all
Depends: bitlbee (>= ${source:Version}), bitlbee (<< ${source:Version}.1~)
diff --git a/debian/patches/bitlbee.conf.diff b/debian/patches/bitlbee.conf.diff
index c98fa546..339ccd4a 100644
--- a/debian/patches/bitlbee.conf.diff
+++ b/debian/patches/bitlbee.conf.diff
@@ -1,5 +1,5 @@
---- debian/bitlbee/etc/bitlbee/bitlbee.conf 2009-06-01 00:20:24.000000000 +0100
-+++ debian/bitlbee/etc/bitlbee/bitlbee.conf 2009-06-07 21:16:19.000000000 +0100
+--- bitlbee.conf 2009-06-01 00:20:24.000000000 +0100
++++ bitlbee.conf 2009-06-07 21:16:19.000000000 +0100
@@ -23,13 +23,18 @@
## If BitlBee is started by root as a daemon, it can drop root privileges,
## and change to the specified user.
diff --git a/debian/rules b/debian/rules
index df129f98..bbb368f9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,4 +1,11 @@
#!/usr/bin/make -f
+#
+# Finally switching to debhelper.
+#
+# Not using debhelper was an exercise suggested to me by my AM (Gergely
+# Nagy). It was educating at the time but I finally decided that the
+# exercise is over now.
+#
BITLBEE_CONFIGURE_FLAGS ?=
DEBUG ?= 0
@@ -7,104 +14,82 @@ 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
+BITLBEE_CONFIGURE_VERSION ?= BITLBEE_VERSION=\"$(shell dpkg-parsechangelog | grep ^Version: | awk '{print $$2}')\"
endif
-build-arch: build-arch-stamp
-build-arch-stamp:
- [ -d debian ]
- ./configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent $(BITLBEE_CONFIGURE_FLAGS)
- $(MAKE)
-# $(MAKE) -C doc/ all
- touch build-arch-stamp
+build: build-stamp
+build-stamp:
+ dh_testdir
-clean:
- [ "`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
-
-
-install-arch: build-arch
- [ "`whoami`" = "root" -a -d debian ]
- mkdir -p debian/bitlbee/DEBIAN/
- $(MAKE) install install-etc DESTDIR=`pwd`/debian/bitlbee
-
- mkdir -p debian/bitlbee/usr/share/doc/bitlbee/
- cp doc/user-guide/user-guide.txt debian/bitlbee/usr/share/doc/bitlbee/
- 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
- [ "`whoami`" = "root" -a -d debian ]
-
- chmod 755 debian/post* debian/pre* debian/config debian/bitlbee.init
-
- mkdir -p debian/bitlbee/usr/share/doc/bitlbee/examples/ debian/bitlbee/etc/init.d/
- -cp doc/RELEASE-SPEECH* debian/bitlbee/usr/share/doc/bitlbee/ && gzip -9 debian/bitlbee/usr/share/doc/bitlbee/RELEASE-SPEECH*
- cp doc/CREDITS doc/AUTHORS doc/README doc/FAQ debian/README.Debian debian/bitlbee/usr/share/doc/bitlbee/
- cp debian/changelog debian/bitlbee/usr/share/doc/bitlbee/changelog.Debian
- cp debian/copyright debian/bitlbee/usr/share/doc/bitlbee/copyright
- cp doc/CHANGES debian/bitlbee/usr/share/doc/bitlbee/changelog
- cp utils/* debian/bitlbee/usr/share/doc/bitlbee/examples/
- cp debian/bitlbee.init debian/bitlbee/etc/init.d/bitlbee
- patch -p0 < debian/patches/bitlbee.conf.diff
- cd debian/bitlbee/usr/share/; \
- gzip -9 doc/bitlbee/changelog.Debian doc/bitlbee/changelog doc/bitlbee/user-guide.txt \
- doc/bitlbee/examples/* man/man8/bitlbee.8 man/man5/bitlbee.conf.5
-
- 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 {} \;
-
- cp debian/prerm debian/bitlbee/DEBIAN/
- cp debian/postinst debian/bitlbee/DEBIAN/
- cp debian/postrm debian/bitlbee/DEBIAN/
- cp debian/config debian/bitlbee/DEBIAN/
-
- po2debconf debian/templates > debian/bitlbee/DEBIAN/templates
- cp debian/conffiles debian/bitlbee/DEBIAN/
-
- if [ "$(DEBUG)" = "0" ]; then strip -R .comment -R .note debian/bitlbee/usr/sbin/bitlbee; fi
-
- cd debian/bitlbee; \
- find usr -type f -exec md5sum {} \; > DEBIAN/md5sums
- dpkg-shlibdeps -Tdebian/bitlbee.substvars -dDepends debian/bitlbee/usr/sbin/bitlbee
-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
- dpkg-gencontrol -ldebian/changelog -isp -pbitlbee -Tdebian/bitlbee.substvars -Pdebian/bitlbee -V'debconf-depends=debconf (>= 1.2.0) | debconf-2.0'
-endif
+ mkdir debian/build-native
+ ROOT=$$PWD; cd debian/build-native; $(BITLBEE_CONFIGURE_VERSION) $$ROOT/configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent $(BITLBEE_CONFIGURE_FLAGS)
+ $(MAKE) -C debian/build-native
- dpkg --build debian/bitlbee ..
+ mkdir debian/build-libpurple
+ ROOT=$$PWD; cd debian/build-libpurple; $(BITLBEE_CONFIGURE_VERSION) $$ROOT/configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --purple=1 $(BITLBEE_CONFIGURE_FLAGS)
+ $(MAKE) -C debian/build-libpurple
-binary-indep: install-indep
- [ "`whoami`" = "root" -a -d debian ]
+ touch build-stamp
- 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 {} \;
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
- 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
+ rm -rf build-arch-stamp debian/build-*
+ $(MAKE) distclean
- cd debian/bitlbee-dev; \
- find usr -type f -exec md5sum {} \; > DEBIAN/md5sums
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_prep
+ dh_installdirs
+
+ $(MAKE) -C debian/build-native install install-etc DESTDIR=`pwd`/debian/bitlbee
+ $(MAKE) -C debian/build-libpurple install install-etc DESTDIR=`pwd`/debian/bitlbee-libpurple
+ $(MAKE) -C debian/build-native install-dev DESTDIR=`pwd`/debian/bitlbee-dev
+
+ patch debian/bitlbee/etc/bitlbee/bitlbee.conf debian/patches/bitlbee.conf.diff
+ patch debian/bitlbee-libpurple/etc/bitlbee/bitlbee.conf debian/patches/bitlbee.conf.diff
+
+ mkdir -p debian/bitlbee-common/usr
+ mv debian/bitlbee/usr/share debian/bitlbee-common/usr
+ rm -rf debian/bitlbee-libpurple/usr/share
+
+binary-common:
+ dh_testdir
+ dh_testroot
+
+ dh_installdocs --link-doc=bitlbee-common
+ dh_installchangelogs
+ dh_installexamples
+ dh_installdebconf
+ dh_installinit
+ dh_installman
+ dh_strip
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ifdef BITLBEE_FORCE_VERSION
+ dh_gencontrol -- -v1:$(BITLBEE_VERSION)-0
+else
+ dh_gencontrol
+endif
+ dh_md5sums
+ dh_builddeb
- dpkg-gencontrol -ldebian/changelog -isp -pbitlbee-dev -Pdebian/bitlbee-dev -v1:$(BITLBEE_VERSION)-0
+binary-indep: build install
+ $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
- dpkg --build debian/bitlbee-dev ..
+binary-arch: build install
+ $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
-binary: binary-arch binary-indep
-build: build-arch
-install: install-arch install-indep
+binary-%: build install
+ make -f debian/rules binary-common DH_OPTIONS=-p$*
-.PHONY: build-arch build clean binary-arch binary install-arch install binary-indep install-indep
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary-common binary install