source: debian/rules @ b3eee9b

Last change on this file since b3eee9b was 2d93a51e, checked in by Wilmer van der Gaast <wilmer@…>, at 2011-12-23T08:47:02Z

Removing the version number override hack broken by a recent NMU. Instead,
I'll try to solve this problem on just the buildbot using "dch".

  • Property mode set to 100755
File size: 3.7 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.
11# Don't build skype by default since it depends on deleted/non-free
12# packages. Need to at least get python-skype back into Debian.
[d20ea9f]13BITLBEE_LIBPURPLE ?= 1
[27b407f]14BITLBEE_OTR ?= plugin
[6c0fe9b]15BITLBEE_SKYPE ?= 0
[b5b40ff]16BITLBEE_CONFIGURE_FLAGS ?=
[19a8088]17DEBUG ?= 0
18
[4c03881]19ifndef BITLBEE_VERSION
[19a8088]20# Want to use the full package version number instead of just the release.
[256164c]21BITLBEE_CONFIGURE_VERSION ?= BITLBEE_VERSION=\"$(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')\"
[379c08a]22endif
[19a8088]23
[763a3ab]24ifneq ($(BITLBEE_LIBPURPLE),1)
25DH_OPTIONS += -Nbitlbee-libpurple
26endif
27
[27b407f]28ifneq ($(BITLBEE_OTR),plugin)
29DH_OPTIONS += -Nbitlbee-plugin-otr
30endif
31
[57da960]32ifneq ($(BITLBEE_SKYPE),plugin)
33DH_OPTIONS += -Nbitlbee-plugin-skype -Nskyped
34endif
35
[095a5f0]36build: build-stamp
37build-stamp:
38        dh_testdir
[19a8088]39
[4772500]40        mkdir -p debian/build-native
[57da960]41        ROOT=$$PWD; cd debian/build-native; $(BITLBEE_CONFIGURE_VERSION) $$ROOT/configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent --otr=$(BITLBEE_OTR) --skype=$(BITLBEE_SKYPE) $(BITLBEE_CONFIGURE_FLAGS)
[095a5f0]42        $(MAKE) -C debian/build-native
[19a8088]43
[d20ea9f]44ifeq ($(BITLBEE_LIBPURPLE),1)
[4772500]45        mkdir -p debian/build-libpurple
[095a5f0]46        ROOT=$$PWD; cd debian/build-libpurple; $(BITLBEE_CONFIGURE_VERSION) $$ROOT/configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --purple=1 $(BITLBEE_CONFIGURE_FLAGS)
47        $(MAKE) -C debian/build-libpurple
[d20ea9f]48endif
[19a8088]49
[bc49ec2]50        $(MAKE) -C doc
51
[095a5f0]52        touch build-stamp
[46d4230]53
[095a5f0]54clean:
55        dh_testdir
56        dh_testroot
57        rm -f build-stamp
[46d4230]58
[5b94e9e]59        rm -rf build-arch-stamp debian/build-* debian/bitlbee-libpurple.prerm
[095a5f0]60        $(MAKE) distclean
[46d4230]61
[095a5f0]62        dh_clean
63
64install: build
65        dh_testdir
66        dh_testroot
[560d0a0]67        dh_clean -k
[095a5f0]68        dh_installdirs
69
[27b407f]70        $(MAKE) -C debian/build-native install-bin DESTDIR=`pwd`/debian/bitlbee
71        $(MAKE) -C debian/build-native install-etc install-doc DESTDIR=`pwd`/debian/bitlbee-common
[095a5f0]72        $(MAKE) -C debian/build-native install-dev DESTDIR=`pwd`/debian/bitlbee-dev
[57da960]73        $(MAKE) -C debian/build-native install-plugin-otr DESTDIR=`pwd`/debian/bitlbee-plugin-otr
74        $(MAKE) -C debian/build-native install-plugin-skype DESTDIR=`pwd`/debian/skyped
75
[6c0fe9b]76ifneq ($(BITLBEE_SKYPE),0)
[57da960]77        mkdir -p debian/bitlbee-plugin-skype/usr
78        mv debian/skyped/usr/lib debian/bitlbee-plugin-skype/usr
[d20ea9f]79
[e46db53]80        mkdir -p debian/skyped/usr/share/man/man1
81        mv debian/bitlbee-common/usr/share/man/man1/skyped* debian/skyped/usr/share/man/man1
[6c0fe9b]82endif
[e46db53]83
[d20ea9f]84ifeq ($(BITLBEE_LIBPURPLE),1)
[27b407f]85        $(MAKE) -C debian/build-libpurple install-bin DESTDIR=`pwd`/debian/bitlbee-libpurple
[5b94e9e]86        ln -sf debian/bitlbee.prerm debian/bitlbee-libpurple.prerm
[d20ea9f]87endif
[095a5f0]88
[27b407f]89        patch debian/bitlbee-common/etc/bitlbee/bitlbee.conf debian/patches/bitlbee.conf.diff
90        chmod 640 debian/bitlbee-common/etc/bitlbee/bitlbee.conf
[095a5f0]91
92binary-common:
93        dh_testdir
94        dh_testroot
95
[4772500]96        dh_installchangelogs doc/CHANGES
[095a5f0]97        dh_installexamples
[560d0a0]98        dh_installdocs #--link-doc=bitlbee-common
99        # TODO: Restore --link-doc up here and remove the hack below once
100        # Hardy and Lenny are deprecated.
[27b407f]101        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
[095a5f0]102        dh_installdebconf
[5b94e9e]103        dh_installinit --init-script=bitlbee
[095a5f0]104        dh_installman
[6c2b430]105        dh_lintian
[095a5f0]106        dh_strip
107        dh_link
108        dh_compress
109        dh_fixperms
110        dh_installdeb
111        dh_shlibdeps
[256164c]112        dh_gencontrol
[095a5f0]113        dh_md5sums
114        dh_builddeb
[46d4230]115
[095a5f0]116binary-indep: build install
[763a3ab]117        DH_OPTIONS=-i $(MAKE) -f debian/rules binary-common
[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
[095a5f0]125binary: binary-indep binary-arch
126.PHONY: build clean binary-indep binary-arch binary-common binary install
Note: See TracBrowser for help on using the repository browser.