]> code.citadel.org Git - citadel.git/blobdiff - webcit/debian/rules
* tiny 'file'-extract, now we can detect the type of an image. and set the mimetype...
[citadel.git] / webcit / debian / rules
index 61bb40a95ebba8a177c0cddc9548ea7b179ac340..ca73ada2140c5c4a066ef8fca739ddf51168bcdb 100755 (executable)
@@ -9,15 +9,20 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+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
@@ -26,14 +31,17 @@ configure-stamp:
        CFLAGS="$(CFLAGS)" ./configure \
                --host=$(DEB_HOST_GNU_TYPE) \
                --build=$(DEB_BUILD_GNU_TYPE) \
-               --prefix=/var/lib/citadel/www/ \
-               --with-sysconfdir=/etc/citadel \
-               --with-spooldir=/var/spool/citadel \
-               --with-datadir=/var/lib/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
 
@@ -64,28 +72,9 @@ install: build
        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.
-       root=$(CURDIR)/debian/webcit/
-       mkdir -p $(CURDIR)/debian/webcit/var/lib/citadel/www/
-       export root=$(CURDIR)/debian/webcit; $(MAKE) install DESTDIR=$(CURDIR)/debian/webcit/
-       mkdir -p $(CURDIR)/debian/citadel-webcit/usr/share/doc/citadel-webcit/examples
-       mkdir -p $(CURDIR)/debian/citadel-webcit/usr/share/doc/citadel-webcit/contrib
-       mkdir -p $(CURDIR)/debian/citadel-webcit/usr/sbin
-       mkdir -p $(CURDIR)/debian/citadel-webcit/usr/lib/citadel-webcit/ 
-       mv $(CURDIR)/debian/webcit/var/lib/citadel/www/static \
-               $(CURDIR)/debian/citadel-webcit/usr/share/doc/citadel-webcit/examples/
-       mv $(CURDIR)/debian/webcit/var/lib/citadel/www/tiny_mce \
-               $(CURDIR)/debian/citadel-webcit/usr/share/doc/citadel-webcit/examples/
-# locale -> /usr/share/locale
-       mv $(CURDIR)/debian/webcit/var/lib/citadel/www/locale \
-               $(CURDIR)/debian/citadel-webcit/usr/share/locale
-       cd $(CURDIR)/debian/citadel-webcit/usr/share/doc/citadel-webcit/examples/; \
-                               md5sum `find -type f |grep -v md5sums `>md5sums; 
-# we don't use the setup anymore, omit it.
-       rm -f $(CURDIR)/debian/webcit/var/lib/citadel/www/setup
-       mv $(CURDIR)/debian/webcit/var/lib/citadel/www/webserver \
-               $(CURDIR)/debian/citadel-webcit/usr/sbin/
 
 
 # Build architecture-independent files here.
@@ -96,10 +85,10 @@ binary-indep: build install
 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