-# remove trailing whitespaces:
- for x in developer-manual user-manual faq; do \
- sed -e 's/[ ]*$$//' < doc/text/$$x.txt > doc/text/$$x.nws;\
- mv -f doc/text/$$x.nws doc/text/$$x.txt; \
- done
-
- touch build-stamp
-
-clean: clean1 unpatch
-clean1:
- dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp
-
- -$(MAKE) clean
- -$(MAKE) distclean
+override_dh_auto_build:
+ $(MAKE)
+# 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