2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
5 # Uncomment this to turn on verbose mode.
8 # This is the debhelper compatibility version to use.
11 # These are used for cross-compiling and for saving the configure script
12 # from having to guess our platform (since we know it already)
13 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
14 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16 DEBDIR=`pwd`/debian/privoxy
18 DB2HTML=jw -f docbook -b html -d `pwd`/ldpOK.dsl\#html
23 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
25 WITHDEBUG="--with-debug"
28 configure: configure-stamp
34 env CFLAGS=$(CFLAGS) \
35 ./configure --prefix=/usr --sysconfdir=/etc \
36 --mandir=/usr/share/man $(WITHDEBUG) \
37 --with-docbook=/usr/share/sgml/docbook/stylesheet/dsssl/modular
42 build-stamp: configure-stamp
47 # And now we create the documentation (manually):
48 $(MAKE) doc/source/ldpOK.dsl
50 $(DB2HTML) -o faq faq.sgml; \
51 $(DB2HTML) -o user-manual user-manual.sgml; \
52 $(DB2HTML) -o developer-manual developer-manual.sgml; \
53 docbook2txt faq.sgml; \
54 docbook2txt user-manual.sgml; \
55 docbook2txt developer-manual.sgml)
62 rm -f build-stamp configure-stamp
66 rm -f configure config.h GNUmakefile
67 rm -f doc/source/ldpOK.dsl
68 rm -rf doc/source/faq doc/source/user-manual \
69 doc/source/developer-manual
70 rm -f doc/source/*.txt
80 install -m 0755 privoxy $(DEBDIR)/usr/sbin/privoxy
82 sed -e 's/^\(\(trust\|proxy\)-info-url\|admin-address\)/#\1/' \
83 -e 's#^confdir \.#confdir /etc/privoxy#' \
84 -e 's#^logdir \.#logdir /var/log/privoxy#' \
85 < config > $(DEBDIR)/etc/privoxy/config
86 install -m 0644 default.action $(DEBDIR)/etc/privoxy/default.action
87 install -m 0644 default.filter $(DEBDIR)/etc/privoxy/default.filter
88 install -m 0644 trust $(DEBDIR)/etc/privoxy/trust
90 cp -r templates $(DEBDIR)/etc/privoxy/
91 rm -f $(DEBDIR)/etc/privoxy/templates/*~
92 rm -rf $(DEBDIR)/etc/privoxy/templates/CVS
95 # Build architecture-independent files here.
96 binary-indep: build install
97 # We have nothing to do by default.
99 # Build architecture-dependent files here.
100 binary-arch: build install
116 dh_installchangelogs ChangeLog
129 binary: binary-indep binary-arch
130 .PHONY: build clean binary-indep binary-arch binary install configure