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 noopt,$(DEB_BUILD_OPTIONS)))
14 CFLAGS += -O0 -ggdb -rdynamic -D_GNU_SOURCE -MD -MP
17 # SERVER_LDFLAGS += -pg
22 configure: configure-stamp
26 CFLAGS="$(CFLAGS)" ./configure \
27 --with-prefix=/var/lib/citadel \
28 --with-datadir=/var/lib/citadel \
29 --with-staticdatadir=/usr/share/citadel-server \
30 --with-spooldir=/var/spool/citadel \
31 --with-sysconfdir=/etc/citadel \
32 --with-rundir=/var/run/citadel \
33 --with-docdir=/usr/share/doc/citadel-doc/ \
34 --with-ssldir=/etc/ssl/citadel/ \
35 --with-utility-bindir=/usr/lib/citadel-server/ \
47 build: build-arch build-indep
49 build-arch: build-arch-stamp
50 build-arch-stamp: configure-stamp
55 build-indep: build-indep-stamp
56 build-indep-stamp: configure-stamp
63 rm -f build-arch-stamp build-indep-stamp configure-stamp
68 rm -f config.status config.log
70 install: install-indep install-arch
77 $(MAKE) DESTDIR=$(DEB_DESTDIR) install-doc-new
79 dh_install -i --sourcedir=debian/tmp
87 $(MAKE) DESTDIR=$(DEB_DESTDIR) install-exec-new install-data-new
89 install -D -p -m0755 database_cleanup.sh \
90 $(DEB_DESTDIR)/usr/share/doc/citadel-server/examples/database_cleanup.sh
92 install -D -p -m0644 docs/welcomemail.html \
93 $(DEB_DESTDIR)/usr/share/doc/citadel-server/welcomemail.html
95 install -D -p -m0644 docs/welcomemail.txt \
96 $(DEB_DESTDIR)/usr/share/doc/citadel-server/welcomemail.txt
98 dh_install -s --sourcedir=debian/tmp
106 dh_installinit --name=citadel
118 # Build architecture independant packages using the common target.
119 binary-indep: build-indep install-indep
120 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
122 # Build architecture dependant packages using the common target.
123 binary-arch: build-arch install-arch
124 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
126 binary: binary-arch binary-indep
127 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure