* When converting cid: URL's in to /webcit/mimepart... URL's, prefix the inserted...
[citadel.git] / libcitadel / debian / rules
blob10af4c02b02b9423f275b0b7ba8f50afc1f4b352
1 #!/usr/bin/make -f
2 # -*- mode: makefile; coding: utf-8 -*-
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
7 export DH_COMPAT = 5
9 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
10 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
12 CFLAGS = -Wall -g
13 LDFALGS =
14 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
15 CFLAGS += -O0 -ggdb -rdynamic -MD -MP -D DEBUG -D VALGRIND
16 EXTRA_ARGS = --with-backtrace
17 else
18 CFLAGS += -O2
19 endif
21 ifneq (,$(findstring profiling,$(DEB_BUILD_OPTIONS)))
22 CFLAGS += -pg
23 LDFLAGS += -pg
24 endif
26 build: build-stamp
27 build-stamp:
28 dh_testdir
30 CFLAGS="$(CFLAGS)"; LDFLAGS="$(LDFLAGS)"; ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
31 $(EXTRA_ARGS) \
32 --prefix=/usr
34 # Build libcitadel
35 $(MAKE)
37 touch build-stamp
39 clean:
40 dh_testdir
41 dh_testroot
42 rm -f build-stamp install*-stamp
44 [ ! -f Makefile ] || $(MAKE) distclean
46 dh_clean
48 install: install-stamp
49 install-stamp: build-stamp
50 dh_testdir
51 dh_testroot
52 dh_clean -k
53 dh_installdirs
55 $(MAKE) DESTDIR=`pwd`/debian/tmp install
57 touch install-stamp
59 # Build architecture-independent files here.
60 binary-indep: build install
61 # dh_testdir -i
62 dh_testroot -i
63 # dh_installdocs -i -A README
64 # dh_installchangelogs -i debian/no-upstream-changelog
65 # dh_install -i --sourcedir=debian/tmp
66 # dh_link -i
67 # dh_strip -i
68 # dh_compress -i
69 # dh_fixperms -i
70 # dh_installdeb -i
71 # dh_shlibdeps -i
72 # dh_gencontrol -i
73 # dh_md5sums -i
74 # dh_builddeb -i
76 # Build architecture-dependent files here.
77 binary-arch: build install
78 dh_testdir -a
79 dh_testroot -a
80 dh_installchangelogs -a -plibcitadel2
81 dh_installdocs -a
82 dh_install -a --sourcedir=debian/tmp
83 dh_link -a
84 dh_strip -a --dbg-package=libcitadel2-dbg
85 dh_compress -a
86 dh_fixperms -a
87 dh_makeshlibs -a -V
88 dh_installdeb -a
89 dh_shlibdeps -a
90 dh_gencontrol -a
91 dh_md5sums -a
92 dh_builddeb -a
94 source diff:
95 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
97 binary: binary-indep binary-arch
98 .PHONY: build clean binary-indep binary-arch binary install