source: debian/rules @ 0dd6570

Last change on this file since 0dd6570 was e46db53, checked in by Wilmer van der Gaast <wilmer@…>, at 2011-12-11T12:12:24Z

Another packaging fix: Don't put skyped manpage in bitlbee-common.

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