wok-current view privoxy/receipt @ rev 24778
remove freeradius-dialupadmin
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Mar 19 17:24:39 2022 +0000 (2022-03-19) |
parents | 72d34faa7fd6 |
children | f48c0f9848e4 |
line source
1 # SliTaz package receipt.
3 PACKAGE="privoxy"
4 VERSION="3.0.28"
5 CATEGORY="network"
6 SHORT_DESC="Non-caching web privacy proxy."
7 MAINTAINER="paul@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://www.privoxy.org/"
11 TARBALL="$PACKAGE-$VERSION-stable-src.tar.gz"
12 WGET_URL="$SF_MIRROR/ijbswa/$TARBALL"
14 DEPENDS="pcre zlib"
15 BUILD_DEPENDS="autoconf coreutils m4 perl zlib-dev"
16 CONFIG_FILES="/etc/privoxy/config"
18 # What is the latest version available today?
19 current_version()
20 {
21 wget -O - https://sourceforge.net/projects/ijbswa/files/Sources/ 2>/dev/null | \
22 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
23 sed '/scope="row/!d;s|.*/Sources/||;s|%20.*/.*||;q'
24 }
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 # Have to create privoxy user/group to be able to compile
30 adduser -s /bin/false -H -D -u 42 privoxy
31 addgroup -g 42 privoxy
33 # Needs autoconf
34 autoheader
35 autoconf
37 ./configure \
38 --prefix=/usr \
39 --sysconfdir=/etc/privoxy \
40 --infodir=/usr/share/info \
41 --mandir=/usr/share/man \
42 --localstatedir=/var \
43 $CONFIGURE_ARGS &&
44 make &&
45 make DESTDIR=$DESTDIR install
46 }
48 # Rules to gen a SliTaz package suitable for Tazpkg.
49 genpkg_rules()
50 {
51 mkdir -p $fs/etc/init.d
52 mkdir -p $fs/usr
54 cp -a $install/usr/sbin $fs/usr
55 cp -a $install/var $fs
56 cp -a $install/etc $fs
58 # Copy daemon from stuff
59 cp $stuff/daemon-privoxy $fs/etc/init.d/privoxy
60 }
62 post_install()
63 {
64 # adduser privoxy if needed
65 if ! grep -q privoxy "$1/etc/passwd"; then
66 echo
67 echo -n "Adding user privoxy..."
68 chroot "$1/" adduser -s /bin/false -H -D -u 42 privoxy
69 status
70 fi
72 if ! grep -q privoxy "$1/etc/group"; then
73 echo
74 echo -n "Adding group privoxy..."
75 chroot "$1/" addgroup -g 42 privoxy
76 status
77 fi
79 # and change file permissions
80 echo
81 echo -n "Changing file permissions..."
82 chroot "$1/" chown -R privoxy.privoxy /etc/privoxy
83 chown -R root.root "$1/etc/privoxy/templates"
84 chown root.root "$1/etc/privoxy"
85 chroot "$1/" chown privoxy.privoxy /var/log/privoxy/logfile
86 status
87 }
89 # Del user privoxy when pkg is removed.
90 post_remove()
91 {
92 deluser privoxy
93 delgroup privoxy
94 }