Create HTML and ASCII versions of the documentation using docbook now.
[privoxy.git] / debian / rules
index 6fecafd..be5438e 100755 (executable)
@@ -15,6 +15,9 @@ DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
 DEBDIR=`pwd`/debian/privoxy
 
+DB2HTML=jw -f docbook -b html -d `pwd`/ldpOK.dsl\#html
+
+
 CFLAGS="-O2"
 WITHDEBUG=""
 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
@@ -30,18 +33,27 @@ configure-stamp:
        autoconf
        env CFLAGS=$(CFLAGS) \
                ./configure --prefix=/usr --sysconfdir=/etc \
-                       --mandir=/usr/share/man --with-docbook=no \
-                       $(WITHDEBUG)
+               --mandir=/usr/share/man $(WITHDEBUG) \
+               --with-docbook=/usr/share/sgml/docbook/stylesheet/dsssl/modular
 
        touch configure-stamp
 
 build: build-stamp
-
 build-stamp: configure-stamp 
        dh_testdir
 
        $(MAKE)
 
+#      And now we create the documentation (manually):
+       $(MAKE) doc/source/ldpOK.dsl
+       (cd doc/source; \
+        $(DB2HTML) -o faq faq.sgml; \
+        $(DB2HTML) -o user-manual user-manual.sgml; \
+        $(DB2HTML) -o developer-manual developer-manual.sgml; \
+        docbook2txt faq.sgml; \
+        docbook2txt user-manual.sgml; \
+        docbook2txt developer-manual.sgml)
+
        touch build-stamp
 
 clean:
@@ -49,10 +61,13 @@ clean:
        dh_testroot
        rm -f build-stamp configure-stamp
 
-       -$(MAKE) clean
+       -$(MAKE) clobber
        rm -f privoxy 
-       rm -f configure config.h config.h.in config.log config.cache \
-               config.status GNUmakefile
+       rm -f configure config.h GNUmakefile 
+       rm -f doc/source/ldpOK.dsl
+       rm -rf doc/source/faq doc/source/user-manual \
+               doc/source/developer-manual
+       rm -f doc/source/*.txt
 
        dh_clean
 
@@ -76,10 +91,6 @@ install: build
        rm -f $(DEBDIR)/etc/privoxy/templates/*~
        rm -rf $(DEBDIR)/etc/privoxy/templates/CVS
 
-       cp -r doc/webserver/user-manual $(DEBDIR)/usr/share/doc/privoxy/
-       cp -r doc/webserver/faq $(DEBDIR)/usr/share/doc/privoxy/
-       cp -r doc/webserver/developer-manual $(DEBDIR)/usr/share/doc/privoxy/
-
 
 # Build architecture-independent files here.
 binary-indep: build install