wok-current annotate privoxy/receipt @ rev 25425

updated xa (2.3.10 -> 2.3.13)
author Hans-G?nter Theisgen
date Thu Aug 18 16:31:57 2022 +0100 (2022-08-18)
parents 080c1dff8494
children
rev   line source
paul@2275 1 # SliTaz package receipt.
paul@2275 2
paul@2275 3 PACKAGE="privoxy"
Hans-G?nter@25148 4 VERSION="3.0.33"
paul@2275 5 CATEGORY="network"
paul@2275 6 SHORT_DESC="Non-caching web privacy proxy."
paul@2275 7 MAINTAINER="paul@slitaz.org"
pascal@15375 8 LICENSE="GPL2"
Hans-G?nter@21702 9 WEB_SITE="https://www.privoxy.org/"
paul@2275 10
Hans-G?nter@21702 11 TARBALL="$PACKAGE-$VERSION-stable-src.tar.gz"
Hans-G?nter@21702 12 WGET_URL="$SF_MIRROR/ijbswa/$TARBALL"
Hans-G?nter@21702 13
Hans-G?nter@21702 14 DEPENDS="pcre zlib"
Hans-G?nter@21702 15 BUILD_DEPENDS="autoconf coreutils m4 perl zlib-dev"
Hans-G?nter@25148 16
psychomaniak@19974 17 CONFIG_FILES="/etc/privoxy/config"
psychomaniak@19974 18
pascal@24396 19 # What is the latest version available today?
pascal@24396 20 current_version()
pascal@24396 21 {
pascal@24396 22 wget -O - https://sourceforge.net/projects/ijbswa/files/Sources/ 2>/dev/null | \
pascal@24396 23 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
pascal@24396 24 sed '/scope="row/!d;s|.*/Sources/||;s|%20.*/.*||;q'
pascal@24396 25 }
pascal@24396 26
paul@2275 27 # Rules to configure and make the package.
paul@2275 28 compile_rules()
paul@2275 29 {
paul@2275 30 # Have to create privoxy user/group to be able to compile
slaxemulator@8011 31 adduser -s /bin/false -H -D -u 42 privoxy
slaxemulator@9383 32 addgroup -g 42 privoxy
erjo@5885 33
paul@2275 34 # Needs autoconf
paul@2275 35 autoheader
paul@2275 36 autoconf
paul@2275 37
Hans-G?nter@21702 38 ./configure \
Hans-G?nter@21702 39 --prefix=/usr \
Hans-G?nter@21702 40 --sysconfdir=/etc/privoxy \
Hans-G?nter@21702 41 --infodir=/usr/share/info \
Hans-G?nter@21702 42 --mandir=/usr/share/man \
Hans-G?nter@21702 43 --localstatedir=/var \
pascal@2456 44 $CONFIGURE_ARGS &&
Hans-G?nter@21702 45 make &&
Hans-G?nter@21702 46 make DESTDIR=$DESTDIR install
paul@2275 47 }
paul@2275 48
paul@2275 49 # Rules to gen a SliTaz package suitable for Tazpkg.
paul@2275 50 genpkg_rules()
paul@2275 51 {
Hans-G?nter@21702 52 mkdir -p $fs/etc/init.d
Hans-G?nter@21702 53 mkdir -p $fs/usr
Hans-G?nter@21702 54
Hans-G?nter@25148 55 cook_copy_folders etc
Hans-G?nter@25148 56 cook_copy_folders sbin
Hans-G?nter@25148 57 cook_copy_folders var
paul@2275 58
slaxemulator@9701 59 # Copy daemon from stuff
Hans-G?nter@25148 60 cp $stuff/daemon-privoxy $fs/etc/init.d/privoxy
paul@2275 61 }
paul@2275 62
paul@7279 63 post_install()
paul@2275 64 {
paul@7247 65 # adduser privoxy if needed
Hans-G?nter@25148 66 if ! grep -q privoxy "$1/etc/passwd"
Hans-G?nter@25148 67 then
pascal@20319 68 echo
paul@7247 69 echo -n "Adding user privoxy..."
pascal@18730 70 chroot "$1/" adduser -s /bin/false -H -D -u 42 privoxy
paul@7247 71 status
paul@7247 72 fi
paul@7279 73
Hans-G?nter@25148 74 if ! grep -q privoxy "$1/etc/group"
Hans-G?nter@25148 75 then
pascal@20319 76 echo
slaxemulator@9383 77 echo -n "Adding group privoxy..."
pascal@18730 78 chroot "$1/" addgroup -g 42 privoxy
slaxemulator@9383 79 status
slaxemulator@9383 80 fi
slaxemulator@9383 81
paul@7279 82 # and change file permissions
pascal@20319 83 echo
paul@7279 84 echo -n "Changing file permissions..."
Hans-G?nter@25148 85 chroot "$1/" chown -R privoxy.privoxy /etc/privoxy
Hans-G?nter@25148 86 chown -R root.root "$1/etc/privoxy/templates"
Hans-G?nter@25148 87 chown root.root "$1/etc/privoxy"
Hans-G?nter@25148 88 chroot "$1/" chown privoxy.privoxy /var/log/privoxy/logfile
paul@7279 89 status
paul@2275 90 }
paul@7247 91
paul@7247 92 post_remove()
paul@7247 93 {
Hans-G?nter@25148 94 echo
Hans-G?nter@25148 95 echo -n "Removing user and group privoxy..."
Hans-G?nter@25148 96 deluser privoxy
Hans-G?nter@25148 97 status
paul@7247 98 }