Changeset 135271c for debian/rules


Ignore:
Timestamp:
2016-06-12T08:34:56Z (8 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
5dbf66e, ddb3c08
Parents:
235b51a
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • debian/rules

    r235b51a r135271c  
    3939
    4040CONFIGURE_OVERRIDES:=CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
     41
     42HAS_DH_SYSTEMD:=$(shell dpkg-query -W -f='$${Status}' dh-systemd 2>/dev/null | grep -c "ok installed")
    4143
    4244build: build-stamp
     
    8183        $(MAKE) -C debian/build-native install-plugin-skype DESTDIR=`pwd`/debian/skyped
    8284
     85ifeq ($(HAS_DH_SYSTEMD),1)
     86        $(MAKE) -C debian/build-native install-systemd DESTDIR=`pwd`/debian/bitlbee-common
     87endif
     88
    8389ifneq ($(BITLBEE_SKYPE),0)
    8490        mkdir -p debian/bitlbee-plugin-skype/usr
     
    108114        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
    109115        dh_installdebconf
     116ifeq ($(HAS_DH_SYSTEMD),1)
     117        dh_systemd_enable
    110118        dh_installinit --init-script=bitlbee
     119        dh_systemd_start
     120else
     121        dh_installinit --init-script=bitlbee
     122endif
    111123        dh_installman
    112124        dh_lintian
Note: See TracChangeset for help on using the changeset viewer.