-
- touch build-stamp
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp
-
- -$(MAKE) clean
- rm -f privoxy
- rm -f configure config.h config.h.in config.log config.cache \
- config.status GNUmakefile
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
+# preserve auto build documentation from source package:
+ tar cf debian/doc.tar README INSTALL AUTHORS doc/source doc/webserver
+ env -u LANG LC_ALL=C.UTF-8 $(MAKE) dok
+ rm -f doc/webserver/user-manual/*.bak
+ env -u LANG LC_ALL=C.UTF-8 $(MAKE) man
+ env -u LANG LC_ALL=C.UTF-8 $(MAKE) man2html
+
+override_dh_auto_clean:
+# restore auto build documentation from source package:
+ [ ! -f debian/doc.tar ] || tar xf debian/doc.tar
+ rm -f debian/doc.tar
+ find doc/source -name \*.html | xargs -r rm -f
+ [ ! -f GNUmakefile ] || $(MAKE) clean
+ [ ! -f GNUmakefile ] || $(MAKE) distclean
+ rm -f configure config.h GNUmakefile
+ rm -f privoxy.8
+ rm -rf obj
+ rm -f ActivityConsole.jar
+ rm -f src/java/org/privoxy/activityconsole/*.class
+ rm -f doc/source/ldp.dsl
+ rm -rf doc/source/temp
+ dh_clean -Xrc.privoxy.orig
+
+override_dh_auto_install: