wok-current annotate privoxy/receipt @ rev 19974

Up: tor (0.3.0.8), privoxy (3.0.26-stable),
get-palemoon (27.3.0)
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Thu Jun 08 21:57:08 2017 +0200 (2017-06-08)
parents 9e01bc6321ea
children 970c5ec9a60a
rev   line source
paul@2275 1 # SliTaz package receipt.
paul@2275 2
paul@2275 3 PACKAGE="privoxy"
psychomaniak@19974 4 VERSION="3.0.26-stable"
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"
paul@2275 9 TARBALL="$PACKAGE-$VERSION-src.tar.gz"
paul@2275 10 WEB_SITE="http://www.privoxy.org/"
paul@2275 11 WGET_URL="http://downloads.sourceforge.net/ijbswa/$TARBALL"
paul@2275 12
psychomaniak@19974 13 CONFIG_FILES="/etc/privoxy/config"
psychomaniak@19974 14
pascal@15375 15 DEPENDS="zlib pcre"
pascal@15375 16 BUILD_DEPENDS="zlib-dev autoconf perl m4 coreutils"
pascal@15375 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 cd $src
paul@2275 26
paul@2275 27 # Needs autoconf
paul@2275 28 autoheader
paul@2275 29 autoconf
paul@2275 30
paul@2275 31 ./configure \
paul@2275 32 --prefix=/usr \
paul@2275 33 --sysconfdir=/etc/privoxy \
paul@2275 34 --infodir=/usr/share/info \
paul@2275 35 --mandir=/usr/share/man \
pascal@4211 36 --localstatedir=/var \
pascal@2456 37 $CONFIGURE_ARGS &&
pascal@15375 38 make && make DESTDIR=$DESTDIR install
paul@2275 39 }
paul@2275 40
paul@2275 41 # Rules to gen a SliTaz package suitable for Tazpkg.
paul@2275 42 genpkg_rules()
paul@2275 43 {
paul@4836 44 mkdir -p $fs/etc/init.d $fs/usr
pascal@15375 45 cp -a $install/usr/sbin $fs/usr
pascal@15375 46 cp -a $install/var $fs
pascal@15375 47 cp -a $install/etc $fs
paul@2275 48
slaxemulator@9701 49 # Copy daemon from stuff
slaxemulator@9701 50 cp $stuff/daemon-privoxy $fs/etc/init.d/privoxy
paul@2275 51 }
paul@2275 52
paul@7279 53 post_install()
paul@2275 54 {
paul@7247 55 # adduser privoxy if needed
pascal@18730 56 if ! grep -q privoxy "$1/etc/passwd"; then
paul@7247 57 echo -n "Adding user privoxy..."
pascal@18730 58 chroot "$1/" adduser -s /bin/false -H -D -u 42 privoxy
paul@7247 59 status
paul@7247 60 fi
paul@7279 61
pascal@18730 62 if ! grep -q privoxy "$1/etc/group"; then
slaxemulator@9383 63 echo -n "Adding group privoxy..."
pascal@18730 64 chroot "$1/" addgroup -g 42 privoxy
slaxemulator@9383 65 status
slaxemulator@9383 66 fi
slaxemulator@9383 67
paul@7279 68 # and change file permissions
paul@7279 69 echo -n "Changing file permissions..."
pascal@18730 70 chroot "$1/" chown -R privoxy.privoxy /etc/privoxy
pascal@18730 71 chown -R root.root "$1/etc/privoxy/templates"
pascal@18730 72 chown root.root "$1/etc/privoxy"
pascal@18730 73 chroot "$1/" chown privoxy.privoxy /var/log/privoxy/logfile
paul@7279 74 status
paul@2275 75 }
paul@7247 76
paul@7247 77 # Del user privoxy when pkg is removed.
paul@7247 78 post_remove()
paul@7247 79 {
paul@7247 80 deluser privoxy
slaxemulator@9383 81 delgroup privoxy
paul@7247 82 }