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
13 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
14 CFLAGS += -O0 -ggdb -rdynamic -D_GNU_SOURCE -MD -MP
17 # SERVER_LDFLAGS += -pg
18 EXTRA_ARGS = --with-profiling --with-backtrace
23 configure: configure-stamp
27 CFLAGS="$(CFLAGS)" ./configure \
28 --with-prefix=/var/lib/citadel \
29 --with-datadir=/var/lib/citadel \
30 --with-staticdatadir=/usr/share/citadel-server \
31 --with-spooldir=/var/spool/citadel \
32 --with-sysconfdir=/etc/citadel \
33 --with-rundir=/var/run/citadel \
34 --with-docdir=/usr/share/doc/citadel-doc/ \
35 --with-ssldir=/etc/ssl/citadel/ \
36 --with-utility-bindir=/usr/lib/citadel-server/ \
43 --enable-debug $(EXTRA_ARGS)
48 build: build-arch build-indep
50 build-arch: build-arch-stamp
51 build-arch-stamp: configure-stamp
56 build-indep: build-indep-stamp
57 build-indep-stamp: configure-stamp
64 rm -f build-arch-stamp build-indep-stamp configure-stamp
69 rm -f config.status config.log
71 install: install-indep install-arch
78 $(MAKE) DESTDIR=$(DEB_DESTDIR) install-doc-new
80 dh_install -i --sourcedir=debian/tmp
88 $(MAKE) DESTDIR=$(DEB_DESTDIR) install-exec-new install-data-new
90 install -D -p -m0755 database_cleanup.sh \
91 $(DEB_DESTDIR)/usr/share/doc/citadel-server/examples/database_cleanup.sh
93 install -D -p -m0644 docs/welcomemail.html \
94 $(DEB_DESTDIR)/usr/share/doc/citadel-server/welcomemail.html
96 install -D -p -m0644 docs/welcomemail.txt \
97 $(DEB_DESTDIR)/usr/share/doc/citadel-server/welcomemail.txt
99 dh_install -s --sourcedir=debian/tmp
107 dh_installinit --name=citadel
119 # Build architecture independant packages using the common target.
120 binary-indep: build-indep install-indep
121 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
123 # Build architecture dependant packages using the common target.
124 binary-arch: build-arch install-arch
125 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
127 binary: binary-arch binary-indep
128 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure