3 # (C) 2002-2006 Roland Rosenfeld <roland@debian.org>, based on
4 # Sample debian/rules that uses debhelper.
5 # This file is public domain software, originally written by Joey Hess.
7 # Uncomment this to turn on verbose mode.
10 # These are used for cross-compiling and for saving the configure script
11 # from having to guess our platform (since we know it already)
12 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
13 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
15 DEBDIR=`pwd`/debian/privoxy
18 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
25 build-stamp: patch-stamp
30 env CFLAGS="$(OPTIMIZE) -g" \
31 ./configure --prefix=/usr --sysconfdir=/etc \
32 --mandir=/usr/share/man $(WITHDEBUG) \
33 --with-docbook=/usr/share/sgml/docbook/stylesheet/dsssl/modular
35 # create missing doc/pdf directory if necessary:
36 [ -d doc/pdf ] || mkdir doc/pdf
39 env -u LANG $(MAKE) man
42 # remove trailing whitespaces:
43 for x in developer-manual user-manual faq; do \
44 sed -e 's/[ ]*$$//' < doc/text/$$x.txt > doc/text/$$x.nws;\
45 mv -f doc/text/$$x.nws doc/text/$$x.txt; \
54 rm -f build-stamp configure-stamp
58 rm -f configure config.h GNUmakefile
62 rm -f ActivityConsole.jar
63 rm -f src/java/org/privoxy/activityconsole/*.class
65 rm -f doc/source/ldp.dsl
66 rm -rf doc/source/temp
77 install -m 0755 privoxy $(DEBDIR)/usr/sbin/privoxy
79 install -m 644 config $(DEBDIR)/etc/privoxy/config
80 install -m 0644 default.action $(DEBDIR)/etc/privoxy/default.action
81 install -m 0644 standard.action $(DEBDIR)/etc/privoxy/standard.action
82 install -m 0644 user.action $(DEBDIR)/etc/privoxy/user.action
83 install -m 0644 default.filter $(DEBDIR)/etc/privoxy/default.filter
84 install -m 0644 trust $(DEBDIR)/etc/privoxy/trust
86 cp -r templates $(DEBDIR)/etc/privoxy/
87 rm -f $(DEBDIR)/etc/privoxy/templates/*~
88 rm -rf $(DEBDIR)/etc/privoxy/templates/CVS
90 # Remove CVS tags and trailing spaces from config files:
91 find $(DEBDIR)/etc/privoxy -type f \
92 | xargs grep -l '\$$[A-Z][^$$]*:[^$$]*\$$' \
94 sed -e 's/\$$\(Id: [^$$]*,v\)[^$$]*\$$/\1/' \
95 -e 's/\$$\(Source: [^$$]*\)\$$/\1/' \
96 -e 's/\$$\(Log: [^$$]*\)\$$/\1/' \
97 -e 's/ *$$//' < $$f > $$f.new; \
101 # Build architecture-independent files here.
102 binary-indep: build-stamp install
103 # We have nothing to do by default.
105 # Build architecture-dependent files here.
106 binary-arch: build-stamp install
111 (cd $(DEBDIR)/usr/share/doc/privoxy/; \
112 mv privoxy-index.html index.html)
124 dh_installchangelogs ChangeLog
141 #dpatch call-all -a=pkg-info >patch-stamp
145 rm -rf patch-stamp debian/patched
147 binary: binary-indep binary-arch
149 .PHONY: build clean binary-indep binary-arch binary install patch unpatch \