source: debian/rules @ 5e81e60

Last change on this file since 5e81e60 was 483f8dd, checked in by Wilmer van der Gaast <wilmer@…>, at 2008-03-24T21:13:23Z

Removed DEB_BUILD_OPTIONS because it turns out this isn't just some string
I can pass through to configure, there's an official policy on what can be
in there exactly. (Or at least I found a suggested policy on the debian-
policy mailing list.) 1.2-3, because I just uploaded -2 already. :-(

  • Property mode set to 100755
File size: 3.3 KB
Line 
1#!/usr/bin/make -f
2
3DEBUG ?= 0
4
5ifdef BITLBEE_VERSION
6BITLBEE_FORCE_VERSION=1
7else
8# Want to use the full package version number instead of just the release.
9BITLBEE_VERSION ?= "$(shell dpkg-parsechangelog | grep ^Version: | awk '{print $$2}')"
10export BITLBEE_VERSION
11endif
12
13build-arch: build-arch-stamp
14build-arch-stamp:
15        if [ ! -d debian ]; then exit 1; fi
16        ./configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent
17        $(MAKE)
18#       $(MAKE) -C doc/ all
19        touch build-arch-stamp
20
21clean:
22        if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
23        rm -rf build-arch-stamp debian/bitlbee debian/*.substvars debian/files
24        -$(MAKE) distclean
25#       -$(MAKE) -C doc/ clean
26                               
27
28install-arch: build-arch
29        if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
30        mkdir -p debian/bitlbee/DEBIAN/
31        $(MAKE) install install-etc DESTDIR=`pwd`/debian/bitlbee
32
33        mkdir -p debian/bitlbee/usr/share/doc/bitlbee/
34        cp doc/user-guide/user-guide.txt debian/bitlbee/usr/share/doc/bitlbee/
35        cp doc/user-guide/user-guide.html debian/bitlbee/usr/share/doc/bitlbee/
36
37binary-arch: build-arch install-arch
38        if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
39
40        chmod 755 debian/post* debian/pre* debian/config debian/bitlbee.init
41
42        mkdir -p debian/bitlbee/usr/share/doc/bitlbee/examples/ debian/bitlbee/etc/init.d/
43        -cp doc/RELEASE-SPEECH* debian/bitlbee/usr/share/doc/bitlbee/ && gzip -9 debian/bitlbee/usr/share/doc/bitlbee/RELEASE-SPEECH*
44        cp doc/CREDITS doc/AUTHORS doc/README doc/FAQ debian/README.Debian debian/bitlbee/usr/share/doc/bitlbee/
45        cp debian/changelog debian/bitlbee/usr/share/doc/bitlbee/changelog.Debian
46        cp debian/copyright debian/bitlbee/usr/share/doc/bitlbee/copyright
47        cp doc/CHANGES debian/bitlbee/usr/share/doc/bitlbee/changelog
48        cp utils/* debian/bitlbee/usr/share/doc/bitlbee/examples/
49        cp debian/bitlbee.init debian/bitlbee/etc/init.d/bitlbee
50        cd debian/bitlbee/usr/share/; \
51                gzip -9 doc/bitlbee/changelog.Debian doc/bitlbee/changelog doc/bitlbee/user-guide.txt \
52                        doc/bitlbee/examples/* man/man8/bitlbee.8 man/man5/bitlbee.conf.5
53       
54        chown -R root.root debian/bitlbee/
55        find debian/bitlbee/usr/share/ -type d -exec chmod 755 {} \;
56        find debian/bitlbee/usr/share/ -type f -exec chmod 644 {} \;
57       
58        cp debian/prerm debian/bitlbee/DEBIAN/
59        cp debian/postinst debian/bitlbee/DEBIAN/
60        cp debian/postrm debian/bitlbee/DEBIAN/
61        cp debian/config debian/bitlbee/DEBIAN/
62
63        po2debconf debian/templates > debian/bitlbee/DEBIAN/templates
64        cp debian/conffiles debian/bitlbee/DEBIAN/
65       
66        if [ "$(DEBUG)" = "0" ]; then strip -R .comment -R .note debian/bitlbee/usr/sbin/bitlbee; fi
67
68        cd debian/bitlbee; \
69                find usr -type f -exec md5sum {} \; > DEBIAN/md5sums
70        dpkg-shlibdeps -Tdebian/bitlbee.substvars -dDepends debian/bitlbee/usr/sbin/bitlbee
71ifdef BITLBEE_FORCE_VERSION
72        dpkg-gencontrol -ldebian/changelog -isp -pbitlbee -Tdebian/bitlbee.substvars -Pdebian/bitlbee -v1:$(BITLBEE_VERSION)-0 -V'debconf-depends=debconf (>= 1.2.0) | debconf-2.0'
73else
74        dpkg-gencontrol -ldebian/changelog -isp -pbitlbee -Tdebian/bitlbee.substvars -Pdebian/bitlbee -V'debconf-depends=debconf (>= 1.2.0) | debconf-2.0'
75endif
76
77        dpkg --build debian/bitlbee ..
78
79debug-build:
80        BITLBEE_VERSION=\"`date +%Y%m%d`-`hostname`-debug\" debian/rules clean binary DEBUG=1
81
82binary: binary-arch
83build: build-arch
84install: install-arch
85
86.PHONY: build-arch build clean binary-arch binary install-arch install
Note: See TracBrowser for help on using the repository browser.