# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-DESTDIR=$(CURDIR)/debian/citadel-webcit/
+DESTDIR=$(CURDIR)/debian/citadel-webcit
-
-
-CFLAGS = -Wall -g -ggdb
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
+EXTRA_ARGS=
+PROFILE_ARGS=
+#to enable debugging: export DEB_BUILD_OPTIONS="debug profiling"
+ifneq (,$(findstring profiling,$(DEB_BUILD_OPTIONS)))
+ PROFILE_ARGS= --with-gprof
+endif
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0 -ggdb -rdynamic -MD -MP -D TECH_PREVIEW
+ LDFLAGS += -pg
+ EXTRA_ARGS = --with-backtrace
else
- CFLAGS += -O0 -ggdb
+ CFLAGS += -O2
endif
configure: configure-stamp
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr/sbin/ \
--with-wwwdir=/usr/share/citadel-webcit \
- --with-localedir=/usr/share/locale \
+ --with-localedir=/usr/share/ \
--with-editordir=/usr/share/tinymce/www \
--with-rundir=/var/run/citadel \
--with-ical --with-db --with-ldap \
+ --with-ssldir=/etc/ssl/webcit/ \
--with-zlib --with-ssl --with-libiconf \
- --with-newt --with-included-gettext
+ --with-newt --with-included-gettext \
+ --with-datadir=/var/run/citadel \
+ --enable-debug $(EXTRA_ARGS) $(PROFILE_ARGS)
touch configure-stamp
dh_clean -k
dh_installdirs
$(MAKE) install-bin install-locale install-wwwdata DESTDIR=$(DESTDIR)
+# mkdir -p $(DESTDIR)/etc/citadel; cp webcit.conf $(DESTDIR)/etc/citadel/
binary-arch: build install
dh_testdir
dh_testroot
-# dh_installchangelogs ChangeLog
+ dh_installchangelogs
dh_installdocs
dh_installexamples
-# dh_install
+ dh_install
# dh_installmenu
dh_installdebconf
# dh_installlogrotate