# 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
CFLAGS="$(CFLAGS)" ./configure \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
- --prefix=/etc/citadel/www/ \
- --with-localedir=/usr/share/locale \
- --with-sysconfdir=/etc/citadel \
- --with-spooldir=/var/spool/citadel \
- --with-datadir=/etc/citadel \
+ --prefix=/usr/sbin/ \
+ --with-wwwdir=/usr/share/citadel-webcit \
+ --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_testroot
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/
-# Add here commands to install the package into debian/webcit.
- $(MAKE) -C . install DESTDIR=$(DESTDIR)
-# there are debian tinymce packages arround, so we don't ship it another time.
- rm -rf $(DESTDIR)/etc/citadel/www/tiny_mce
-# we don't use the setup anymore, omit it.
- rm -f $(DESTDIR)/etc/citadel/www/setup
-# locale -> /usr/share/locale
- mkdir -p $(DESTDIR)/usr/share/
- mv $(DESTDIR)/etc/citadel/www/locale \
- $(DESTDIR)/usr/share/locale
-
- mkdir -p $(DESTDIR)/usr/sbin
- mv $(DESTDIR)/etc/citadel/www/webserver \
- $(DESTDIR)/usr/sbin/
# Build architecture-independent files here.
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