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
20 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
22 WITHDEBUG="--with-debug"
25 configure: configure-stamp
31 env CFLAGS=$(CFLAGS) WDUMP=w3m \
32 ./configure --prefix=/usr --sysconfdir=/etc \
33 --mandir=/usr/share/man $(WITHDEBUG) \
34 --with-docbook=/usr/share/sgml/docbook/stylesheet/dsssl/modular
38 build-stamp: configure-stamp
47 rm -f build-stamp configure-stamp
52 rm -f configure config.h GNUmakefile
53 rm -f doc/source/ldp.dsl
63 install -m 0755 privoxy $(DEBDIR)/usr/sbin/privoxy
65 sed -e 's/^\(\(trust\|proxy\)-info-url\|admin-address\)/#\1/' \
66 -e 's/^\(enable-\(edit-actions\|remote-toggle\)\)/#\1/' \
67 -e 's#^confdir \.#confdir /etc/privoxy#' \
68 -e 's#^logdir \.#logdir /var/log/privoxy#' \
69 < config > $(DEBDIR)/etc/privoxy/config
70 install -m 0644 default.action $(DEBDIR)/etc/privoxy/default.action
71 install -m 0644 standard.action $(DEBDIR)/etc/privoxy/standard.action
72 install -m 0644 user.action $(DEBDIR)/etc/privoxy/user.action
73 install -m 0644 default.filter $(DEBDIR)/etc/privoxy/default.filter
74 install -m 0644 trust $(DEBDIR)/etc/privoxy/trust
76 cp -r templates $(DEBDIR)/etc/privoxy/
77 rm -f $(DEBDIR)/etc/privoxy/templates/*~
78 rm -rf $(DEBDIR)/etc/privoxy/templates/CVS
81 # Build architecture-independent files here.
82 binary-indep: build install
83 # We have nothing to do by default.
85 # Build architecture-dependent files here.
86 binary-arch: build install
102 dh_installchangelogs ChangeLog
115 # Use this target on Debian because we need to make sure configure
116 # was run with docbook's correct path (see configure-stamp above)
117 debian-dok: configure-stamp
120 binary: binary-indep binary-arch
121 .PHONY: build clean binary-indep binary-arch binary install configure