source: debian/rules @ 0d753ff

Last change on this file since 0d753ff was c81b412, checked in by dx <dx@…>, at 2020-09-01T09:11:33Z

Add missing debian/rules target build-indep.

Changes-By: lintian-brush
Fixes: lintian: debian-rules-missing-recommended-target
See-also: https://lintian.debian.org/tags/debian-rules-missing-recommended-target.html

  • Property mode set to 100755
File size: 3.8 KB
RevLine 
[19a8088]1#!/usr/bin/make -f
[095a5f0]2#
3# Finally switching to debhelper.
4#
5# Not using debhelper was an exercise suggested to me by my AM (Gergely
6# Nagy). It was educating at the time but I finally decided that the
7# exercise is over now.
8#
[19a8088]9
[6c0fe9b]10# Include the bitlbee-libpurple variant and OTR plugin by default.
[d20ea9f]11BITLBEE_LIBPURPLE ?= 1
[27b407f]12BITLBEE_OTR ?= plugin
[b5b40ff]13BITLBEE_CONFIGURE_FLAGS ?=
[19a8088]14DEBUG ?= 0
15
[4c03881]16ifndef BITLBEE_VERSION
[19a8088]17# Want to use the full package version number instead of just the release.
[0edb57f]18BITLBEE_CONFIGURE_VERSION ?= BITLBEE_VERSION="$(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')"
[379c08a]19endif
[19a8088]20
[763a3ab]21ifneq ($(BITLBEE_LIBPURPLE),1)
22DH_OPTIONS += -Nbitlbee-libpurple
23endif
24
[27b407f]25ifneq ($(BITLBEE_OTR),plugin)
26DH_OPTIONS += -Nbitlbee-plugin-otr
27endif
28
[e01ff50]29CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
30CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
31LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
32
33CONFIGURE_OVERRIDES:=CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
34
[135271c]35HAS_DH_SYSTEMD:=$(shell dpkg-query -W -f='$${Status}' dh-systemd 2>/dev/null | grep -c "ok installed")
[53cb4ae]36
[f8d2cff]37build-arch: build
[135271c]38
[095a5f0]39build: build-stamp
40build-stamp:
41        dh_testdir
[19a8088]42
[4772500]43        mkdir -p debian/build-native
[8d7b0a4]44        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)
[095a5f0]45        $(MAKE) -C debian/build-native
[19a8088]46
[d20ea9f]47ifeq ($(BITLBEE_LIBPURPLE),1)
[4772500]48        mkdir -p debian/build-libpurple
[8d7b0a4]49        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)
[095a5f0]50        $(MAKE) -C debian/build-libpurple
[d20ea9f]51endif
[19a8088]52
[bc49ec2]53        $(MAKE) -C doc
[0d8add8a]54        $(MAKE) -C doc/user-guide
[bc49ec2]55
[095a5f0]56        touch build-stamp
[46d4230]57
[095a5f0]58clean:
59        dh_testdir
60        dh_testroot
61        rm -f build-stamp
[46d4230]62
[5b94e9e]63        rm -rf build-arch-stamp debian/build-* debian/bitlbee-libpurple.prerm
[095a5f0]64        $(MAKE) distclean
[46d4230]65
[095a5f0]66        dh_clean
67
68install: build
69        dh_testdir
70        dh_testroot
[e9a3e8c]71        dh_prep
[095a5f0]72        dh_installdirs
73
[27b407f]74        $(MAKE) -C debian/build-native install-bin DESTDIR=`pwd`/debian/bitlbee
75        $(MAKE) -C debian/build-native install-etc install-doc DESTDIR=`pwd`/debian/bitlbee-common
[095a5f0]76        $(MAKE) -C debian/build-native install-dev DESTDIR=`pwd`/debian/bitlbee-dev
[57da960]77        $(MAKE) -C debian/build-native install-plugin-otr DESTDIR=`pwd`/debian/bitlbee-plugin-otr
78
[135271c]79ifeq ($(HAS_DH_SYSTEMD),1)
80        $(MAKE) -C debian/build-native install-systemd DESTDIR=`pwd`/debian/bitlbee-common
81endif
82
[d20ea9f]83ifeq ($(BITLBEE_LIBPURPLE),1)
[27b407f]84        $(MAKE) -C debian/build-libpurple install-bin DESTDIR=`pwd`/debian/bitlbee-libpurple
[5b94e9e]85        ln -sf debian/bitlbee.prerm debian/bitlbee-libpurple.prerm
[d20ea9f]86endif
[095a5f0]87
[27b407f]88        patch debian/bitlbee-common/etc/bitlbee/bitlbee.conf debian/patches/bitlbee.conf.diff
89        chmod 640 debian/bitlbee-common/etc/bitlbee/bitlbee.conf
[095a5f0]90
91binary-common:
92        dh_testdir
93        dh_testroot
94
95        dh_installexamples
[f8d2cff]96        dh_installdocs --link-doc=bitlbee-common
[e979b0f]97        dh_installchangelogs doc/CHANGES
[095a5f0]98        dh_installdebconf
[135271c]99ifeq ($(HAS_DH_SYSTEMD),1)
[46b5ed1]100        dh_systemd_enable -p bitlbee-common --no-enable bitlbee.socket
101        dh_systemd_enable -p bitlbee-common bitlbee.service
102        dh_installinit -p bitlbee-common --init-script=bitlbee
103        dh_systemd_start -p bitlbee-common
[135271c]104else
[46b5ed1]105        dh_installinit -p bitlbee-common --init-script=bitlbee
[135271c]106endif
[095a5f0]107        dh_installman
[6c2b430]108        dh_lintian
[095a5f0]109        dh_strip
110        dh_link
111        dh_compress
112        dh_fixperms
113        dh_installdeb
114        dh_shlibdeps
[256164c]115        dh_gencontrol
[095a5f0]116        dh_md5sums
117        dh_builddeb
[46d4230]118
[095a5f0]119binary-arch: build install
[763a3ab]120        DH_OPTIONS=-a $(MAKE) -f debian/rules binary-common
[19a8088]121
[095a5f0]122binary-%: build install
[763a3ab]123        DH_OPTIONS=-p$* $(MAKE) -f debian/rules binary-common
[19a8088]124
[f8d2cff]125binary: binary-arch
[c81b412]126.PHONY: build clean binary-arch binary-common binary install build-indep
127
128build-indep:
Note: See TracBrowser for help on using the repository browser.