diff options
-rw-r--r-- | debian/control | 2 | ||||
-rwxr-xr-x | debian/rules | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/debian/control b/debian/control index 9da8ce9d..d83f089e 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: Wilmer van der Gaast <wilmer@gaast.net> Uploaders: Jelmer Vernooij <jelmer@debian.org> Standards-Version: 3.9.8 -Build-Depends: libglib2.0-dev (>= 2.4), libevent-dev, libgnutls28-dev | libgnutls-dev | gnutls-dev, po-debconf, libpurple-dev, libotr5-dev, debhelper (>= 6.0.7~) +Build-Depends: libglib2.0-dev (>= 2.4), libevent-dev, libgnutls28-dev | libgnutls-dev | gnutls-dev, po-debconf, libpurple-dev, libotr5-dev, debhelper (>= 6.0.7~), dh-systemd (>= 1.5) | debhelper (<< 9.20131227) Homepage: http://www.bitlbee.org/ Vcs-Git: https://github.com/bitlbee/bitlbee Vcs-Browser: https://github.com/bitlbee/bitlbee diff --git a/debian/rules b/debian/rules index febb1922..b1b3bd5c 100755 --- a/debian/rules +++ b/debian/rules @@ -39,6 +39,8 @@ LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) CONFIGURE_OVERRIDES:=CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" +HAS_DH_SYSTEMD:=$(shell dpkg-query -W -f='$${Status}' dh-systemd 2>/dev/null | grep -c "ok installed") + build: build-stamp build-stamp: dh_testdir @@ -80,6 +82,10 @@ install: build $(MAKE) -C debian/build-native install-plugin-otr DESTDIR=`pwd`/debian/bitlbee-plugin-otr $(MAKE) -C debian/build-native install-plugin-skype DESTDIR=`pwd`/debian/skyped +ifeq ($(HAS_DH_SYSTEMD),1) + $(MAKE) -C debian/build-native install-systemd DESTDIR=`pwd`/debian/bitlbee-common +endif + ifneq ($(BITLBEE_SKYPE),0) mkdir -p debian/bitlbee-plugin-skype/usr mv debian/skyped/usr/lib debian/bitlbee-plugin-skype/usr @@ -107,7 +113,13 @@ binary-common: # Hardy and Lenny are deprecated. for p in bitlbee bitlbee-libpurple bitlbee-dev bitlbee-plugin-otr; do rm -r debian/$$p/usr/share/doc/$$p && ln -s bitlbee-common debian/$$p/usr/share/doc/$$p || true; done dh_installdebconf +ifeq ($(HAS_DH_SYSTEMD),1) + dh_systemd_enable dh_installinit --init-script=bitlbee + dh_systemd_start +else + dh_installinit --init-script=bitlbee +endif dh_installman dh_lintian dh_strip |