1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
#!/usr/bin/make -f
#
export PYTHON = python3
# Include the bitlbee-libpurple variant and OTR plugin by default.
BITLBEE_LIBPURPLE ?= 1
BITLBEE_OTR ?= plugin
BITLBEE_CONFIGURE_FLAGS ?=
DEBUG ?= 0
ifndef BITLBEE_VERSION
# Want to use the full package version number instead of just the release.
include /usr/share/dpkg/default.mk
BITLBEE_CONFIGURE_VERSION ?= BITLBEE_VERSION=$(DEB_VERSION)
endif
ifneq ($(BITLBEE_LIBPURPLE),1)
DH_OPTIONS += -Nbitlbee-libpurple
endif
ifneq ($(BITLBEE_OTR),plugin)
DH_OPTIONS += -Nbitlbee-plugin-otr
endif
CONFIGURE_OVERRIDES:=CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
%:
dh $@
override_dh_auto_configure:
echo "Configure and build are done in dh_auto_build"
override_dh_auto_build:
mkdir -p debian/build-native
ROOT=$$PWD; cd debian/build-native; $(BITLBEE_CONFIGURE_VERSION) $(CONFIGURE_OVERRIDES) $$ROOT/configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent --otr=$(BITLBEE_OTR) --systemdsystemunitdir=/lib/systemd/system --pcdir=/usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig $(BITLBEE_CONFIGURE_FLAGS)
$(MAKE) -C debian/build-native
ifeq ($(BITLBEE_LIBPURPLE),1)
mkdir -p debian/build-libpurple
ROOT=$$PWD; cd debian/build-libpurple; $(BITLBEE_CONFIGURE_VERSION) $(CONFIGURE_OVERRIDES) $$ROOT/configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --systemdsystemunitdir=/lib/systemd/system --pcdir=/usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig --purple=1 $(BITLBEE_CONFIGURE_FLAGS)
$(MAKE) -C debian/build-libpurple
endif
$(MAKE) -C doc
$(MAKE) -C doc/user-guide
SYSTEMDSYSTEMUNITDIR=/usr/lib/systemd/system/ make systemd
override_dh_auto_clean:
rm -rf debian/build-* debian/bitlbee-libpurple.prerm
$(MAKE) distclean
override_dh_auto_test:
echo "FIXME: Run upstream build time test"
override_dh_auto_install:
$(MAKE) -C debian/build-native install-bin DESTDIR=`pwd`/debian/bitlbee
$(MAKE) -C debian/build-native install-etc install-doc DESTDIR=`pwd`/debian/bitlbee-common
$(MAKE) -C debian/build-native install-dev DESTDIR=`pwd`/debian/bitlbee-dev
$(MAKE) -C debian/build-native install-plugin-otr DESTDIR=`pwd`/debian/bitlbee-plugin-otr
ifeq ($(BITLBEE_LIBPURPLE),1)
$(MAKE) -C debian/build-libpurple install-bin DESTDIR=`pwd`/debian/bitlbee-libpurple
ln -sf debian/bitlbee.prerm debian/bitlbee-libpurple.prerm
endif
chmod 640 debian/bitlbee-common/etc/bitlbee/bitlbee.conf
override_dh_installdocs:
dh_installdocs --link-doc=bitlbee-common
override_dh_installchangelogs:
dh_installchangelogs doc/CHANGES
override_dh_installinit:
dh_installinit -p bitlbee-common --init-script=bitlbee
|