3 # (C) 2002-2011 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)))
27 build: build-arch build-indep
28 build-arch: build-stamp
29 build-indep: build-stamp
30 build-stamp: patch-stamp
35 env CFLAGS="$(OPTIMIZE) -g" \
36 ./configure --prefix=/usr --sysconfdir=/etc \
37 --mandir=/usr/share/man $(WITHDEBUG) \
38 --enable-zlib --enable-no-gifs \
39 --with-docbook=/usr/share/sgml/docbook/stylesheet/dsssl/modular
42 env -u LANG $(MAKE) man
51 rm -f build-stamp configure-stamp
53 [ ! -f GNUmakefile ] || $(MAKE) clean
54 [ ! -f GNUmakefile ] || $(MAKE) distclean
55 rm -f configure config.h GNUmakefile
59 rm -f ActivityConsole.jar
60 rm -f src/java/org/privoxy/activityconsole/*.class
62 rm -f doc/source/ldp.dsl
63 rm -rf doc/source/temp
65 dh_clean -Xrc.privoxy.orig
70 dh_clean -k -Xrc.privoxy.orig
73 install -m 0755 privoxy $(DEBDIR)/usr/sbin/privoxy
75 install -m 644 config $(DEBDIR)/etc/privoxy/config
76 install -m 0644 default.action $(DEBDIR)/etc/privoxy/default.action
77 install -m 0644 match-all.action $(DEBDIR)/etc/privoxy/match-all.action
78 install -m 0644 user.action $(DEBDIR)/etc/privoxy/user.action
79 install -m 0644 default.filter $(DEBDIR)/etc/privoxy/default.filter
80 install -m 0644 user.filter $(DEBDIR)/etc/privoxy/user.filter
81 install -m 0644 trust $(DEBDIR)/etc/privoxy/trust
83 install -m 0755 tools/privoxy-log-parser.pl \
84 $(DEBDIR)/usr/bin/privoxy-log-parser
85 pod2man tools/privoxy-log-parser.pl \
86 > $(DEBDIR)/usr/share/man/man1/privoxy-log-parser.1
88 cp -r templates $(DEBDIR)/etc/privoxy/
89 rm -f $(DEBDIR)/etc/privoxy/templates/*~
90 rm -rf $(DEBDIR)/etc/privoxy/templates/CVS
92 # Remove CVS tags and trailing spaces from config files:
93 find $(DEBDIR)/etc/privoxy -type f \
94 | xargs grep -l '\$$[A-Z][^$$]*:[^$$]*\$$' \
96 sed -e 's/\$$\(Id: [^$$]*,v\)[^$$]*\$$/\1/' \
97 -e 's/\$$\(Source: [^$$]*\)\$$/\1/' \
98 -e 's/\$$\(Log: [^$$]*\)\$$/\1/' \
99 -e 's/ *$$//' < $$f > $$f.new; \
103 # Build architecture-independent files here.
104 binary-indep: build-stamp install
105 # We have nothing to do by default.
107 # Build architecture-dependent files here.
108 binary-arch: build-stamp install
113 (cd $(DEBDIR)/usr/share/doc/privoxy/; \
114 mv privoxy-index.html index.html)
126 dh_installchangelogs ChangeLog
139 binary: binary-indep binary-arch
141 .PHONY: build clean binary-indep binary-arch binary install patch unpatch \