wok view privoxy/receipt @ rev 5885

privoxy: fix build.
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Wed Jul 21 16:00:54 2010 +0200 (2010-07-21)
parents a57f6141ce9e
children 8af11abf492a
line source
1 # SliTaz package receipt.
3 PACKAGE="privoxy"
4 VERSION="3.0.16-stable"
5 CATEGORY="network"
6 SHORT_DESC="Non-caching web privacy proxy."
7 MAINTAINER="paul@slitaz.org"
8 DEPENDS="zlib pcre"
9 BUILD_DEPENDS="zlib-dev autoconf perl m4 coreutils"
10 TARBALL="$PACKAGE-$VERSION-src.tar.gz"
11 WEB_SITE="http://www.privoxy.org/"
12 WGET_URL="http://downloads.sourceforge.net/ijbswa/$TARBALL"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 # Have to create privoxy user/group to be able to compile
18 # adduser privoxy -s /bin/false -H -D -S
20 cd $src
22 # Needs autoconf
23 autoheader
24 autoconf
26 ./configure \
27 --prefix=/usr \
28 --sysconfdir=/etc/privoxy \
29 --infodir=/usr/share/info \
30 --mandir=/usr/share/man \
31 --localstatedir=/var \
32 --with-user=nobody \
33 --with-group=nogroup \
34 $CONFIGURE_ARGS &&
35 make &&
36 make DESTDIR=$PWD/_pkg install
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 mkdir -p $fs/etc/init.d $fs/usr
43 cp -a $_pkg/usr/sbin $fs/usr
44 cp -a $_pkg/var $fs
45 cp -a $_pkg/etc $fs
47 # Copy daemon from /stuff
48 cp stuff/daemon-privoxy $fs/etc/init.d/privoxy
49 }
51 post_install()
52 {
53 # adduser privoxy if needed
54 if ! grep -q privoxy $1/etc/passwd; then
55 echo -n "Adding user privoxy..."
56 chroot $1/ adduser privoxy -s /bin/false -H -D -S
57 status
58 fi
60 # And change file permissions
61 echo -n "Changing file permissions..."
62 chown -R root.privoxy /etc/privoxy
63 chown -R root.root /etc/privoxy/templates
64 chown -R root.privoxy /var/log/privoxy
65 status
66 }
68 # Del user privoxy when pkg is removed.
69 post_remove()
70 {
71 deluser privoxy
72 }