source: debian/rules @ 5b94e9e

Last change on this file since 5b94e9e was 5b94e9e, checked in by Wilmer van der Gaast <wilmer@…>, at 2010-08-17T23:34:25Z

Move scripts, debconf and /etc stuff to bitlbee-common and really have
*just* the binary in bitlbee{,-libpurple}. This should fix issues with
installing the package on a clean machine.

  • Property mode set to 100755
File size: 3.2 KB
[19a8088]1#!/usr/bin/make -f
3# Finally switching to debhelper.
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.
[d20ea9f]10# Include the bitlbee-libpurple variant by default
[19a8088]13DEBUG ?= 0
[4c03881]15ifndef BITLBEE_VERSION
[19a8088]16# Want to use the full package version number instead of just the release.
[095a5f0]17BITLBEE_CONFIGURE_VERSION ?= BITLBEE_VERSION=\"$(shell dpkg-parsechangelog | grep ^Version: | awk '{print $$2}')\"
[095a5f0]20build: build-stamp
22        dh_testdir
[4772500]24        mkdir -p debian/build-native
[095a5f0]25        ROOT=$$PWD; cd debian/build-native; $(BITLBEE_CONFIGURE_VERSION) $$ROOT/configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent $(BITLBEE_CONFIGURE_FLAGS)
26        $(MAKE) -C debian/build-native
[d20ea9f]28ifeq ($(BITLBEE_LIBPURPLE),1)
[4772500]29        mkdir -p debian/build-libpurple
[095a5f0]30        ROOT=$$PWD; cd debian/build-libpurple; $(BITLBEE_CONFIGURE_VERSION) $$ROOT/configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --purple=1 $(BITLBEE_CONFIGURE_FLAGS)
31        $(MAKE) -C debian/build-libpurple
[bc49ec2]34        $(MAKE) -C doc
[095a5f0]36        touch build-stamp
39        dh_testdir
40        dh_testroot
41        rm -f build-stamp
[5b94e9e]43        rm -rf build-arch-stamp debian/build-* debian/bitlbee-libpurple.prerm
[095a5f0]44        $(MAKE) distclean
[095a5f0]46        dh_clean
48install: build
49        dh_testdir
50        dh_testroot
[560d0a0]51        dh_clean -k
[095a5f0]52        dh_installdirs
[5b94e9e]54        $(MAKE) -C debian/build-native install DESTDIR=`pwd`/debian/bitlbee
55        $(MAKE) -C debian/build-native install-etc DESTDIR=`pwd`/debian/bitlbee-common
[095a5f0]56        $(MAKE) -C debian/build-native install-dev DESTDIR=`pwd`/debian/bitlbee-dev
[5b94e9e]57        patch debian/bitlbee-common/etc/bitlbee/bitlbee.conf debian/patches/bitlbee.conf.diff
[5b94e9e]60        $(MAKE) -C debian/build-libpurple install DESTDIR=`pwd`/debian/bitlbee-libpurple
61        ln -sf debian/bitlbee.prerm debian/bitlbee-libpurple.prerm
64        mkdir -p debian/bitlbee-common/usr
65        mv debian/bitlbee/usr/share debian/bitlbee-common/usr
66        rm -rf debian/bitlbee-libpurple/usr/share
69        dh_testdir
70        dh_testroot
[4772500]72        dh_installchangelogs doc/CHANGES
[095a5f0]73        dh_installexamples
[560d0a0]74        dh_installdocs #--link-doc=bitlbee-common
75        # TODO: Restore --link-doc up here and remove the hack below once
76        # Hardy and Lenny are deprecated.
[d20ea9f]77        for p in bitlbee bitlbee-libpurple bitlbee-dev; do rm -r debian/$$p/usr/share/doc/$$p && ln -s bitlbee-common debian/$$p/usr/share/doc/$$p; done
[095a5f0]78        dh_installdebconf
[5b94e9e]79        dh_installinit --init-script=bitlbee
[095a5f0]80        dh_installman
81        dh_strip
82        dh_link
83        dh_compress
84        dh_fixperms
85        dh_installdeb
86        dh_shlibdeps
[4c03881]87ifdef BITLBEE_VERSION
[4772500]88        dh_gencontrol -- -v1:$(BITLBEE_VERSION)-0  -Vbee:Version=1:$(BITLBEE_VERSION)-0
[8f984a0]90        dh_gencontrol -- -Vbee:Version=$(shell dpkg-parsechangelog | grep ^Version: | awk '{print $$2}' | sed -e 's/+b[0-9]\+$$//')
92        dh_md5sums
[d20ea9f]93ifeq ($(BITLBEE_LIBPURPLE),1)
[095a5f0]94        dh_builddeb
96        dh_builddeb -Nbitlbee-libpurple
[095a5f0]99binary-indep: build install
100        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
[095a5f0]102binary-arch: build install
103        $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
[095a5f0]105binary-%: build install
106        make -f debian/rules binary-common DH_OPTIONS=-p$*
[095a5f0]108binary: binary-indep binary-arch
109.PHONY: build clean binary-indep binary-arch binary-common binary install
Note: See TracBrowser for help on using the repository browser.