]> code.citadel.org Git - citadel.git/blobdiff - webcit/debian/rules
* first of the three sorts uses URLescputs, the second and third mustn't
[citadel.git] / webcit / debian / rules
index ac144d8107c7115b53290a9c654a8545ef2e8c47..1e658c779c39b0c7813d3d970696155be8cbf1f1 100755 (executable)
@@ -9,16 +9,27 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-DESTDIR=$(CURDIR)/debian/citadel-webcit/
+DESTDIR=$(CURDIR)/debian/citadel-webcit
 
+EXTRA_ARGS=
+PROFILE_ARGS=
+#to enable debugging: export DEB_BUILD_OPTIONS="debug profiling compression"
 
 
-CFLAGS = -Wall -g -ggdb
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-       CFLAGS += -O0
+ifneq (,$(findstring compression,$(DEB_BUILD_OPTIONS)))
+       ZLIB_ARGS=--without-zlib
+else
+       ZLIB_ARGS=--with-zlib
+endif
+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
@@ -29,12 +40,15 @@ 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-zlib --with-ssl --with-libiconf \
-               --with-newt --with-included-gettext
+                --with-ssldir=/etc/ssl/webcit/ \
+               $(ZLIB_ARGS) --with-ssl --with-libiconf \
+               --with-newt --with-included-gettext \
+               --with-datadir=/var/run/citadel \
+               --enable-debug $(EXTRA_ARGS) $(PROFILE_ARGS)
 
        touch configure-stamp
 
@@ -78,7 +92,7 @@ binary-indep: build install
 binary-arch: build install
        dh_testdir
        dh_testroot
-#      dh_installchangelogs ChangeLog
+       dh_installchangelogs
        dh_installdocs
        dh_installexamples
        dh_install