aboutsummaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2016-07-09 18:06:09 +0200
committerMarius Halden <marius.h@lden.org>2016-07-09 18:06:09 +0200
commitef9769c1e59dec5435670b507712c5fa9dfede67 (patch)
tree5654f07fad56346642b3ddf292aa1558ff574b17 /debian/rules
parent2f2fb6dda408ad2562cc754e2ca0ad3c2ea8bc8e (diff)
parentf60dc5cb68ac91df714f01ef61ba819eeac584aa (diff)
Merge branch 'master' into patched-master
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules12
1 files changed, 12 insertions, 0 deletions
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