wok-current view privoxy/receipt @ rev 20294
get-dropbox: fix LD_LIBRARY_PATH
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Apr 23 09:42:28 2018 +0200 (2018-04-23) |
parents | 9e01bc6321ea |
children | 970c5ec9a60a |
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 -n "Adding user privoxy..."
58 chroot "$1/" adduser -s /bin/false -H -D -u 42 privoxy
59 status
60 fi
62 if ! grep -q privoxy "$1/etc/group"; then
63 echo -n "Adding group privoxy..."
64 chroot "$1/" addgroup -g 42 privoxy
65 status
66 fi
68 # and change file permissions
69 echo -n "Changing file permissions..."
70 chroot "$1/" chown -R privoxy.privoxy /etc/privoxy
71 chown -R root.root "$1/etc/privoxy/templates"
72 chown root.root "$1/etc/privoxy"
73 chroot "$1/" chown privoxy.privoxy /var/log/privoxy/logfile
74 status
75 }
77 # Del user privoxy when pkg is removed.
78 post_remove()
79 {
80 deluser privoxy
81 delgroup privoxy
82 }