Merge changes from Debian revision 3.0.6-4.
[privoxy.git] / debian / rules
index ecaec43..a842236 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
 #
-# (C) 2002-2006 Roland Rosenfeld <roland@debian.org>, based on
+# (C) 2002-2007 Roland Rosenfeld <roland@debian.org>, based on
 # Sample debian/rules that uses debhelper.
 # This file is public domain software, originally written by Joey Hess. 
 
@@ -14,6 +14,9 @@ DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
 DEBDIR=`pwd`/debian/privoxy
 
+# Include dpatch stuff.
+include /usr/share/dpatch/dpatch.make
+
 OPTIMIZE=
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
         OPTIMIZE=-O0
@@ -30,6 +33,7 @@ build-stamp: patch-stamp
        env CFLAGS="$(OPTIMIZE) -g" \
                ./configure --prefix=/usr --sysconfdir=/etc \
                --mandir=/usr/share/man $(WITHDEBUG) \
+               --enable-zlib \
                --with-docbook=/usr/share/sgml/docbook/stylesheet/dsssl/modular
        $(MAKE)
 #       create missing doc/pdf directory if necessary:
@@ -53,8 +57,8 @@ clean1:
        dh_testroot
        rm -f build-stamp configure-stamp
 
-       -$(MAKE) clean
-       -$(MAKE) distclean
+       [ ! -f GNUmakefile ] || $(MAKE) clean
+       [ ! -f GNUmakefile ] || $(MAKE) distclean
        rm -f configure config.h GNUmakefile
        rm -f privoxy.8
 
@@ -64,20 +68,21 @@ clean1:
 
        rm -f doc/source/ldp.dsl
        rm -rf doc/source/temp
-       rm -rf doc/pdf
+#      rm -rf doc/pdf
 
        dh_clean -Xrc.privoxy.orig
 
 install: build-stamp
        dh_testdir
        dh_testroot
-       dh_clean -k
+       dh_clean -k -Xrc.privoxy.orig
        dh_installdirs
 
        install -m 0755 privoxy $(DEBDIR)/usr/sbin/privoxy
 
        install -m 644 config $(DEBDIR)/etc/privoxy/config
        install -m 0644 default.action $(DEBDIR)/etc/privoxy/default.action
+       install -m 0644 global.action $(DEBDIR)/etc/privoxy/global.action
        install -m 0644 standard.action $(DEBDIR)/etc/privoxy/standard.action
        install -m 0644 user.action $(DEBDIR)/etc/privoxy/user.action
        install -m 0644 default.filter $(DEBDIR)/etc/privoxy/default.filter
@@ -134,16 +139,6 @@ binary-arch: build-stamp install
        dh_md5sums
        dh_builddeb
 
-patch: patch-stamp
-patch-stamp:
-       dpatch apply-all
-       touch patch-stamp
-       #dpatch call-all -a=pkg-info >patch-stamp
-
-unpatch:
-       dpatch deapply-all
-       rm -rf patch-stamp debian/patched
-
 binary: binary-indep binary-arch
 
 .PHONY: build clean binary-indep binary-arch binary install patch unpatch \