]> code.citadel.org Git - citadel.git/blobdiff - webcit/debian/rules
* resynced some functionality with pkg-citadel
[citadel.git] / webcit / debian / rules
index 992fd5296718ed565c8c48dc4919fbaa3e248d6d..d4109e17e9d39f50df0c5cca831a01d0e130cbf4 100755 (executable)
@@ -9,32 +9,39 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+include /usr/share/quilt/quilt.make
+
+upstreamversion := $(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p')
+
 DESTDIR=$(CURDIR)/debian/citadel-webcit
 
 EXTRA_ARGS=
 PROFILE_ARGS=
-#to enable debugging: export DEB_BUILD_OPTIONS="debug profiling compression"
+#to enable debugging: export DEB_BUILD_OPTIONS="debug profiling compression urldebug"
 
-
-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
+       CFLAGS += -O0 -ggdb -rdynamic -MD -MP -D TECH_PREVIEW -pedantic
        LDFLAGS += -pg 
        EXTRA_ARGS =  --with-backtrace
 else
        CFLAGS += -O2
 endif
+ifneq (,$(findstring urldebug,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -D DEBUG_URLSTRINGS
+endif
 
-configure: configure-stamp
+configure: patch configure-stamp
 configure-stamp:
        dh_testdir
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+       cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+       cp -f /usr/share/misc/config.guess config.guess
+endif
        CFLAGS="$(CFLAGS)" ./configure \
                --host=$(DEB_HOST_GNU_TYPE) \
                --build=$(DEB_BUILD_GNU_TYPE) \
@@ -45,7 +52,7 @@ configure-stamp:
                --with-rundir=/var/run/citadel \
                --with-ical --with-db --with-ldap \
                 --with-ssldir=/etc/ssl/webcit/ \
-               $(ZLIB_ARGS) --with-ssl --with-libiconf \
+               --with-ssl --with-libiconf \
                --with-newt --with-included-gettext \
                --with-datadir=/var/run/citadel \
                --enable-debug $(EXTRA_ARGS) $(PROFILE_ARGS)
@@ -55,12 +62,11 @@ configure-stamp:
 
 build: build-stamp
 
-build-stamp: configure-stamp 
+build-stamp: configure
        dh_testdir
 
 # Add here commands to compile the package.
        $(MAKE)
-#docbook-to-man debian/webcit.sgml > webcit.1
 
        touch build-stamp
 
@@ -70,7 +76,8 @@ clean:
        rm -f build-stamp configure-stamp
 
 # Add here commands to clean up after the build process.
-       -$(MAKE) clean
+       [ ! -f Makefile ] || $(MAKE) clean
+       debconf-updatepo
 
        dh_clean 
 
@@ -97,23 +104,13 @@ binary-arch: build install
        dh_installdocs
        dh_installexamples
        dh_install
-#      dh_installmenu
        dh_installdebconf       
-#      dh_installlogrotate
-#      dh_installemacsen
-#      dh_installpam
-#      dh_installmime
        dh_installinit --name=webcit
-#      dh_installcron
-#      dh_installinfo
        dh_installman
        dh_link
        dh_strip
        dh_compress
        dh_fixperms
-#      dh_perl
-#      dh_python
-#      dh_makeshlibs
        dh_installdeb
        dh_shlibdeps
        dh_gencontrol