wok-current annotate privoxy/receipt @ rev 24374

avrdude: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Feb 05 17:11:25 2022 +0000 (2022-02-05)
parents 970c5ec9a60a
children 080c1dff8494
rev   line source
paul@2275 1 # SliTaz package receipt.
paul@2275 2
paul@2275 3 PACKAGE="privoxy"
Hans-G?nter@21702 4 VERSION="3.0.28"
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"
psychomaniak@19974 16 CONFIG_FILES="/etc/privoxy/config"
psychomaniak@19974 17
paul@2275 18 # Rules to configure and make the package.
paul@2275 19 compile_rules()
paul@2275 20 {
paul@2275 21 # Have to create privoxy user/group to be able to compile
slaxemulator@8011 22 adduser -s /bin/false -H -D -u 42 privoxy
slaxemulator@9383 23 addgroup -g 42 privoxy
erjo@5885 24
paul@2275 25 # Needs autoconf
paul@2275 26 autoheader
paul@2275 27 autoconf
paul@2275 28
Hans-G?nter@21702 29 ./configure \
Hans-G?nter@21702 30 --prefix=/usr \
Hans-G?nter@21702 31 --sysconfdir=/etc/privoxy \
Hans-G?nter@21702 32 --infodir=/usr/share/info \
Hans-G?nter@21702 33 --mandir=/usr/share/man \
Hans-G?nter@21702 34 --localstatedir=/var \
pascal@2456 35 $CONFIGURE_ARGS &&
Hans-G?nter@21702 36 make &&
Hans-G?nter@21702 37 make DESTDIR=$DESTDIR install
paul@2275 38 }
paul@2275 39
paul@2275 40 # Rules to gen a SliTaz package suitable for Tazpkg.
paul@2275 41 genpkg_rules()
paul@2275 42 {
Hans-G?nter@21702 43 mkdir -p $fs/etc/init.d
Hans-G?nter@21702 44 mkdir -p $fs/usr
Hans-G?nter@21702 45
Hans-G?nter@21702 46 cp -a $install/usr/sbin $fs/usr
Hans-G?nter@21702 47 cp -a $install/var $fs
Hans-G?nter@21702 48 cp -a $install/etc $fs
paul@2275 49
slaxemulator@9701 50 # Copy daemon from stuff
slaxemulator@9701 51 cp $stuff/daemon-privoxy $fs/etc/init.d/privoxy
paul@2275 52 }
paul@2275 53
paul@7279 54 post_install()
paul@2275 55 {
paul@7247 56 # adduser privoxy if needed
pascal@18730 57 if ! grep -q privoxy "$1/etc/passwd"; then
pascal@20319 58 echo
paul@7247 59 echo -n "Adding user privoxy..."
pascal@18730 60 chroot "$1/" adduser -s /bin/false -H -D -u 42 privoxy
paul@7247 61 status
paul@7247 62 fi
paul@7279 63
pascal@18730 64 if ! grep -q privoxy "$1/etc/group"; then
pascal@20319 65 echo
slaxemulator@9383 66 echo -n "Adding group privoxy..."
pascal@18730 67 chroot "$1/" addgroup -g 42 privoxy
slaxemulator@9383 68 status
slaxemulator@9383 69 fi
slaxemulator@9383 70
paul@7279 71 # and change file permissions
pascal@20319 72 echo
paul@7279 73 echo -n "Changing file permissions..."
pascal@18730 74 chroot "$1/" chown -R privoxy.privoxy /etc/privoxy
pascal@18730 75 chown -R root.root "$1/etc/privoxy/templates"
pascal@18730 76 chown root.root "$1/etc/privoxy"
pascal@18730 77 chroot "$1/" chown privoxy.privoxy /var/log/privoxy/logfile
paul@7279 78 status
paul@2275 79 }
paul@7247 80
paul@7247 81 # Del user privoxy when pkg is removed.
paul@7247 82 post_remove()
paul@7247 83 {
paul@7247 84 deluser privoxy
slaxemulator@9383 85 delgroup privoxy
paul@7247 86 }