3 # (C) 2002-2008 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
17 # Include dpatch stuff.
18 include /usr/share/dpatch/dpatch.make
21 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
28 build-stamp: patch-stamp
33 env CFLAGS="$(OPTIMIZE) -g" \
34 ./configure --prefix=/usr --sysconfdir=/etc \
35 --mandir=/usr/share/man $(WITHDEBUG) \
37 --with-docbook=/usr/share/sgml/docbook/stylesheet/dsssl/modular
40 env -u LANG $(MAKE) man
49 rm -f build-stamp configure-stamp
51 [ ! -f GNUmakefile ] || $(MAKE) clean
52 [ ! -f GNUmakefile ] || $(MAKE) distclean
53 rm -f configure config.h GNUmakefile
57 rm -f ActivityConsole.jar
58 rm -f src/java/org/privoxy/activityconsole/*.class
60 rm -f doc/source/ldp.dsl
61 rm -rf doc/source/temp
63 dh_clean -Xrc.privoxy.orig
68 dh_clean -k -Xrc.privoxy.orig
71 install -m 0755 privoxy $(DEBDIR)/usr/sbin/privoxy
73 install -m 644 config $(DEBDIR)/etc/privoxy/config
74 install -m 0644 default.action $(DEBDIR)/etc/privoxy/default.action
75 install -m 0644 match-all.action $(DEBDIR)/etc/privoxy/match-all.action
76 install -m 0644 user.action $(DEBDIR)/etc/privoxy/user.action
77 install -m 0644 default.filter $(DEBDIR)/etc/privoxy/default.filter
78 install -m 0644 trust $(DEBDIR)/etc/privoxy/trust
80 install -m 0755 tools/privoxy-log-parser.pl \
81 $(DEBDIR)/usr/bin/privoxy-log-parser
82 pod2man tools/privoxy-log-parser.pl \
83 > $(DEBDIR)/usr/share/man/man1/privoxy-log-parser.1
85 cp -r templates $(DEBDIR)/etc/privoxy/
86 rm -f $(DEBDIR)/etc/privoxy/templates/*~
87 rm -rf $(DEBDIR)/etc/privoxy/templates/CVS
89 # Remove CVS tags and trailing spaces from config files:
90 find $(DEBDIR)/etc/privoxy -type f \
91 | xargs grep -l '\$$[A-Z][^$$]*:[^$$]*\$$' \
93 sed -e 's/\$$\(Id: [^$$]*,v\)[^$$]*\$$/\1/' \
94 -e 's/\$$\(Source: [^$$]*\)\$$/\1/' \
95 -e 's/\$$\(Log: [^$$]*\)\$$/\1/' \
96 -e 's/ *$$//' < $$f > $$f.new; \
100 # Build architecture-independent files here.
101 binary-indep: build-stamp install
102 # We have nothing to do by default.
104 # Build architecture-dependent files here.
105 binary-arch: build-stamp install
110 (cd $(DEBDIR)/usr/share/doc/privoxy/; \
111 mv privoxy-index.html index.html)
123 dh_installchangelogs ChangeLog
136 binary: binary-indep binary-arch
138 .PHONY: build clean binary-indep binary-arch binary install patch unpatch \