3 # Uncomment this to turn on verbose mode.
6 # This has to be exported to make some magic below work.
9 DEB_DESTDIR = $(CURDIR)/debian/tmp
16 #to enable debugging: export DEB_BUILD_OPTIONS="debug profiling"
17 ifneq (,$(findstring profiling,$(DEB_BUILD_OPTIONS)))
18 PROFILE_ARGS= --with-gprof
20 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
21 CFLAGS += -O0 -ggdb -rdynamic -D_GNU_SOURCE -MD -MP
22 EXTRA_ARGS = --with-backtrace
27 configure: configure-stamp
31 CFLAGS="$(CFLAGS)" ./configure \
32 --with-prefix=/var/lib/citadel \
33 --with-datadir=/var/lib/citadel \
34 --with-staticdatadir=/usr/share/citadel-server \
35 --with-spooldir=/var/spool/citadel \
36 --with-sysconfdir=/etc/citadel \
37 --with-rundir=/var/run/citadel \
38 --with-docdir=/usr/share/doc/citadel-doc/ \
39 --with-ssldir=/etc/ssl/citadel/ \
40 --with-utility-bindir=/usr/lib/citadel-server/ \
47 --enable-debug $(EXTRA_ARGS) $(PROFILE_ARGS)
52 build: build-arch build-indep
54 build-arch: build-arch-stamp
55 build-arch-stamp: configure-stamp
60 build-indep: build-indep-stamp
61 build-indep-stamp: configure-stamp
68 rm -f build-arch-stamp build-indep-stamp configure-stamp
73 rm -f config.status config.log
75 install: install-indep install-arch
82 $(MAKE) DESTDIR=$(DEB_DESTDIR) install-doc-new
84 dh_install -i --sourcedir=debian/tmp
92 $(MAKE) DESTDIR=$(DEB_DESTDIR) install-exec-new install-data-new
94 install -D -p -m0755 database_cleanup.sh \
95 $(DEB_DESTDIR)/usr/share/doc/citadel-server/examples/database_cleanup.sh
97 install -D -p -m0644 docs/welcomemail.html \
98 $(DEB_DESTDIR)/usr/share/doc/citadel-server/welcomemail.html
100 install -D -p -m0644 docs/welcomemail.txt \
101 $(DEB_DESTDIR)/usr/share/doc/citadel-server/welcomemail.txt
103 dh_install -s --sourcedir=debian/tmp
111 dh_installinit --name=citadel
123 # Build architecture independant packages using the common target.
124 binary-indep: build-indep install-indep
125 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
127 # Build architecture dependant packages using the common target.
128 binary-arch: build-arch install-arch
129 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
131 binary: binary-arch binary-indep
132 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure