source: debian/rules @ 134a02c

Last change on this file since 134a02c was 560d0a0, checked in by Wilmer van der Gaast <wilmer@…>, at 2010-06-06T19:01:14Z

Some more fixes to make this work with older distros (Hardy's stuck with
debhelper 6) and on de code.b.o build bot (a substvars file I wasn't using
anymore caused troubles).

  • Property mode set to 100755
File size: 3.1 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
[b5b40ff]10BITLBEE_CONFIGURE_FLAGS ?=
[19a8088]11DEBUG ?= 0
12
[4c03881]13ifndef BITLBEE_VERSION
[19a8088]14# Want to use the full package version number instead of just the release.
[095a5f0]15BITLBEE_CONFIGURE_VERSION ?= BITLBEE_VERSION=\"$(shell dpkg-parsechangelog | grep ^Version: | awk '{print $$2}')\"
[379c08a]16endif
[19a8088]17
[095a5f0]18build: build-stamp
19build-stamp:
20        dh_testdir
[19a8088]21
[4772500]22        mkdir -p debian/build-native
[095a5f0]23        ROOT=$$PWD; cd debian/build-native; $(BITLBEE_CONFIGURE_VERSION) $$ROOT/configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent $(BITLBEE_CONFIGURE_FLAGS)
24        $(MAKE) -C debian/build-native
[19a8088]25
[4772500]26        mkdir -p debian/build-libpurple
[095a5f0]27        ROOT=$$PWD; cd debian/build-libpurple; $(BITLBEE_CONFIGURE_VERSION) $$ROOT/configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --purple=1 $(BITLBEE_CONFIGURE_FLAGS)
28        $(MAKE) -C debian/build-libpurple
[19a8088]29
[bc49ec2]30        $(MAKE) -C doc
31
[095a5f0]32        touch build-stamp
[46d4230]33
[095a5f0]34clean:
35        dh_testdir
36        dh_testroot
37        rm -f build-stamp
[46d4230]38
[095a5f0]39        rm -rf build-arch-stamp debian/build-*
40        $(MAKE) distclean
[46d4230]41
[095a5f0]42        dh_clean
43
44install: build
45        dh_testdir
46        dh_testroot
[560d0a0]47        dh_clean -k
[095a5f0]48        dh_installdirs
49
50        $(MAKE) -C debian/build-native install install-etc DESTDIR=`pwd`/debian/bitlbee
51        $(MAKE) -C debian/build-libpurple install install-etc DESTDIR=`pwd`/debian/bitlbee-libpurple
52        $(MAKE) -C debian/build-native install-dev DESTDIR=`pwd`/debian/bitlbee-dev
53
54        patch debian/bitlbee/etc/bitlbee/bitlbee.conf debian/patches/bitlbee.conf.diff
55        patch debian/bitlbee-libpurple/etc/bitlbee/bitlbee.conf debian/patches/bitlbee.conf.diff
56
57        mkdir -p debian/bitlbee-common/usr
58        mv debian/bitlbee/usr/share debian/bitlbee-common/usr
59        rm -rf debian/bitlbee-libpurple/usr/share
60
61binary-common:
62        dh_testdir
63        dh_testroot
64
[4772500]65        dh_installchangelogs doc/CHANGES
[095a5f0]66        dh_installexamples
[560d0a0]67        dh_installdocs #--link-doc=bitlbee-common
68        # TODO: Restore --link-doc up here and remove the hack below once
69        # Hardy and Lenny are deprecated.
70        for p in bitlbee bitlbee-libpurple bitlbee-dev; do rm -rf debian/$$p/usr/share/doc/$$p; ln -s bitlbee-common debian/$$p/usr/share/doc/$$p; done
[095a5f0]71        dh_installdebconf
72        dh_installinit
[4c03881]73ifeq ($(DH_OPTIONS),-a)
74        cp -a debian/bitlbee/etc debian/bitlbee-libpurple
75endif
[095a5f0]76        dh_installman
77        dh_strip
78        dh_link
79        dh_compress
80        dh_fixperms
81        dh_installdeb
[4c03881]82ifeq ($(DH_OPTIONS),-a)
[bc49ec2]83        cp -a debian/bitlbee/DEBIAN/post* debian/bitlbee/DEBIAN/pre* debian/bitlbee-libpurple/DEBIAN
[4c03881]84endif
[095a5f0]85        dh_shlibdeps
[4c03881]86ifdef BITLBEE_VERSION
[4772500]87        dh_gencontrol -- -v1:$(BITLBEE_VERSION)-0  -Vbee:Version=1:$(BITLBEE_VERSION)-0
[095a5f0]88else
[4772500]89        dh_gencontrol -- -Vbee:Version=$(shell dpkg-parsechangelog | grep ^Version: | awk '{print $$2}' | sed -e 's/+[^+]*$$//')
[095a5f0]90endif
91        dh_md5sums
92        dh_builddeb
[46d4230]93
[095a5f0]94binary-indep: build install
95        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
[46d4230]96
[095a5f0]97binary-arch: build install
98        $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
[19a8088]99
[095a5f0]100binary-%: build install
101        make -f debian/rules binary-common DH_OPTIONS=-p$*
[19a8088]102
[095a5f0]103binary: binary-indep binary-arch
104.PHONY: build clean binary-indep binary-arch binary-common binary install
Note: See TracBrowser for help on using the repository browser.