wok view privoxy/receipt @ rev 25442

Update some wget_url
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Sep 02 16:30:36 2022 +0000 (2022-09-02)
parents 080c1dff8494
children 29df00e1e19d
line source
1 # SliTaz package receipt.
3 PACKAGE="privoxy"
4 VERSION="3.0.33"
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"
17 CONFIG_FILES="/etc/privoxy/config"
19 # What is the latest version available today?
20 current_version()
21 {
22 wget -O - https://sourceforge.net/projects/ijbswa/files/Sources/ 2>/dev/null | \
23 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
24 sed '/scope="row/!d;s|.*/Sources/||;s|%20.*/.*||;q'
25 }
27 # Rules to configure and make the package.
28 compile_rules()
29 {
30 # Have to create privoxy user/group to be able to compile
31 adduser -s /bin/false -H -D -u 42 privoxy
32 addgroup -g 42 privoxy
34 # Needs autoconf
35 autoheader
36 autoconf
38 ./configure \
39 --prefix=/usr \
40 --sysconfdir=/etc/privoxy \
41 --infodir=/usr/share/info \
42 --mandir=/usr/share/man \
43 --localstatedir=/var \
44 $CONFIGURE_ARGS &&
45 make &&
46 make DESTDIR=$DESTDIR install
47 }
49 # Rules to gen a SliTaz package suitable for Tazpkg.
50 genpkg_rules()
51 {
52 mkdir -p $fs/etc/init.d
53 mkdir -p $fs/usr
55 cook_copy_folders etc
56 cook_copy_folders sbin
57 cook_copy_folders var
59 # Copy daemon from stuff
60 cp $stuff/daemon-privoxy $fs/etc/init.d/privoxy
61 }
63 post_install()
64 {
65 # adduser privoxy if needed
66 if ! grep -q privoxy "$1/etc/passwd"
67 then
68 echo
69 echo -n "Adding user privoxy..."
70 chroot "$1/" adduser -s /bin/false -H -D -u 42 privoxy
71 status
72 fi
74 if ! grep -q privoxy "$1/etc/group"
75 then
76 echo
77 echo -n "Adding group privoxy..."
78 chroot "$1/" addgroup -g 42 privoxy
79 status
80 fi
82 # and change file permissions
83 echo
84 echo -n "Changing file permissions..."
85 chroot "$1/" chown -R privoxy.privoxy /etc/privoxy
86 chown -R root.root "$1/etc/privoxy/templates"
87 chown root.root "$1/etc/privoxy"
88 chroot "$1/" chown privoxy.privoxy /var/log/privoxy/logfile
89 status
90 }
92 post_remove()
93 {
94 echo
95 echo -n "Removing user and group privoxy..."
96 deluser privoxy
97 status
98 }