diff options
author | dequis <dx@dxzone.com.ar> | 2016-06-12 05:34:56 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2016-06-12 05:34:56 -0300 |
commit | 135271c12dda487556a7e36fb7f3256a2d2e3c90 (patch) | |
tree | b11f8de8b75078bdc0347454f0a806b2054f1e79 /debian/rules | |
parent | 235b51aca13f3ea68b697fccec0f19bbedca0bac (diff) |
debian: install systemd units and use dh_systemd
I'm using the debhelper version (9.20131227) to avoid depending on
dh_systemd for debian wheezy and ubuntu precise. If it's older than
that, it's probably a distro without dh_systemd.
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 12 |
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 |