source: debian/rules @ 4772500

Last change on this file since 4772500 was 4772500, checked in by Wilmer van der Gaast <wilmer@…>, at 2010-06-05T17:35:39Z

Put in the necessary hacks to make version number spoofing work again.

  • Property mode set to 100755
File size: 2.8 KB
Line 
1#!/usr/bin/make -f
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#
9
10BITLBEE_CONFIGURE_FLAGS ?=
11DEBUG ?= 0
12
13ifndef BITLBEE_VERSION
14# Want to use the full package version number instead of just the release.
15BITLBEE_CONFIGURE_VERSION ?= BITLBEE_VERSION=\"$(shell dpkg-parsechangelog | grep ^Version: | awk '{print $$2}')\"
16endif
17
18build: build-stamp
19build-stamp:
20        dh_testdir
21
22        mkdir -p debian/build-native
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
25
26        mkdir -p debian/build-libpurple
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
29
30        touch build-stamp
31
32clean:
33        dh_testdir
34        dh_testroot
35        rm -f build-stamp
36
37        rm -rf build-arch-stamp debian/build-*
38        $(MAKE) distclean
39
40        dh_clean
41
42install: build
43        dh_testdir
44        dh_testroot
45        dh_prep
46        dh_installdirs
47
48        $(MAKE) -C debian/build-native install install-etc DESTDIR=`pwd`/debian/bitlbee
49        $(MAKE) -C debian/build-libpurple install install-etc DESTDIR=`pwd`/debian/bitlbee-libpurple
50        $(MAKE) -C debian/build-native install-dev DESTDIR=`pwd`/debian/bitlbee-dev
51
52        patch debian/bitlbee/etc/bitlbee/bitlbee.conf debian/patches/bitlbee.conf.diff
53        patch debian/bitlbee-libpurple/etc/bitlbee/bitlbee.conf debian/patches/bitlbee.conf.diff
54
55        mkdir -p debian/bitlbee-common/usr
56        mv debian/bitlbee/usr/share debian/bitlbee-common/usr
57        rm -rf debian/bitlbee-libpurple/usr/share
58
59binary-common:
60        dh_testdir
61        dh_testroot
62
63        dh_installdocs --link-doc=bitlbee-common
64        dh_installchangelogs doc/CHANGES
65        dh_installexamples
66        dh_installdebconf
67        dh_installinit
68ifeq ($(DH_OPTIONS),-a)
69        cp -a debian/bitlbee/etc debian/bitlbee-libpurple
70endif
71        dh_installman
72        dh_strip
73        dh_link
74        dh_compress
75        dh_fixperms
76        dh_installdeb
77ifeq ($(DH_OPTIONS),-a)
78        cp -a debian/bitlbee/DEBIAN/{post,pre}* debian/bitlbee-libpurple/DEBIAN
79endif
80        dh_shlibdeps
81ifdef BITLBEE_VERSION
82        echo source:Version=1:$(BITLBEE_VERSION)-0 > debian/substvars
83        dh_gencontrol -- -v1:$(BITLBEE_VERSION)-0  -Vbee:Version=1:$(BITLBEE_VERSION)-0
84else
85        dh_gencontrol -- -Vbee:Version=$(shell dpkg-parsechangelog | grep ^Version: | awk '{print $$2}' | sed -e 's/+[^+]*$$//')
86endif
87        dh_md5sums
88        dh_builddeb
89
90binary-indep: build install
91        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
92
93binary-arch: build install
94        $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
95
96binary-%: build install
97        make -f debian/rules binary-common DH_OPTIONS=-p$*
98
99binary: binary-indep binary-arch
100.PHONY: build clean binary-indep binary-arch binary-common binary install
Note: See TracBrowser for help on using the repository browser.