wok view privoxy/receipt @ rev 20319
Up tazlito (501)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun May 20 13:28:18 2018 +0200 (2018-05-20) |
parents | 80f0897ed3d3 |
children | 72d34faa7fd6 |
line source
1 # SliTaz package receipt.
3 PACKAGE="privoxy"
4 VERSION="3.0.26-stable"
5 CATEGORY="network"
6 SHORT_DESC="Non-caching web privacy proxy."
7 MAINTAINER="paul@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION-src.tar.gz"
10 WEB_SITE="http://www.privoxy.org/"
11 WGET_URL="http://downloads.sourceforge.net/ijbswa/$TARBALL"
13 CONFIG_FILES="/etc/privoxy/config"
15 DEPENDS="zlib pcre"
16 BUILD_DEPENDS="zlib-dev autoconf perl m4 coreutils"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 # Have to create privoxy user/group to be able to compile
22 adduser -s /bin/false -H -D -u 42 privoxy
23 addgroup -g 42 privoxy
25 cd $src
27 # Needs autoconf
28 autoheader
29 autoconf
31 ./configure \
32 --prefix=/usr \
33 --sysconfdir=/etc/privoxy \
34 --infodir=/usr/share/info \
35 --mandir=/usr/share/man \
36 --localstatedir=/var \
37 $CONFIGURE_ARGS &&
38 make && make DESTDIR=$DESTDIR install
39 }
41 # Rules to gen a SliTaz package suitable for Tazpkg.
42 genpkg_rules()
43 {
44 mkdir -p $fs/etc/init.d $fs/usr
45 cp -a $install/usr/sbin $fs/usr
46 cp -a $install/var $fs
47 cp -a $install/etc $fs
49 # Copy daemon from stuff
50 cp $stuff/daemon-privoxy $fs/etc/init.d/privoxy
51 }
53 post_install()
54 {
55 # adduser privoxy if needed
56 if ! grep -q privoxy "$1/etc/passwd"; then
57 echo
58 echo -n "Adding user privoxy..."
59 chroot "$1/" adduser -s /bin/false -H -D -u 42 privoxy
60 status
61 fi
63 if ! grep -q privoxy "$1/etc/group"; then
64 echo
65 echo -n "Adding group privoxy..."
66 chroot "$1/" addgroup -g 42 privoxy
67 status
68 fi
70 # and change file permissions
71 echo
72 echo -n "Changing file permissions..."
73 chroot "$1/" chown -R privoxy.privoxy /etc/privoxy
74 chown -R root.root "$1/etc/privoxy/templates"
75 chown root.root "$1/etc/privoxy"
76 chroot "$1/" chown privoxy.privoxy /var/log/privoxy/logfile
77 status
78 }
80 # Del user privoxy when pkg is removed.
81 post_remove()
82 {
83 deluser privoxy
84 delgroup privoxy
85 }