]> code.citadel.org Git - citadel.git/blobdiff - webcit/debian/rules
* remove more unneeded files from the sourcedist tgz
[citadel.git] / webcit / debian / rules
index d46918ae4169349a11fbacbe6a631708dde203f5..15846013d6c2529885dc65147d7c4ae4c70d29cb 100755 (executable)
@@ -9,16 +9,20 @@
 # 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 
+       LDFLAGS += -pg 
+       EXTRA_ARGS =  --with-backtrace
 else
-       CFLAGS += -O0 -ggdb
+       CFLAGS += -O2
 endif
 
 configure: configure-stamp
@@ -27,15 +31,17 @@ 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
 
@@ -66,21 +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.
-       $(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.
@@ -91,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