wok-next annotate privoxy/receipt @ rev 15571

Up lxc (0.9.0) again
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Nov 26 09:03:33 2013 +0000 (2013-11-26)
parents b6a6aeb3f785
children 51823aded9b1
rev   line source
paul@2275 1 # SliTaz package receipt.
paul@2275 2
paul@2275 3 PACKAGE="privoxy"
paul@11618 4 VERSION="3.0.19-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
pascal@15375 13 DEPENDS="zlib pcre"
pascal@15375 14 BUILD_DEPENDS="zlib-dev autoconf perl m4 coreutils"
pascal@15375 15
paul@2275 16 # Rules to configure and make the package.
paul@2275 17 compile_rules()
paul@2275 18 {
paul@2275 19 # Have to create privoxy user/group to be able to compile
slaxemulator@8011 20 adduser -s /bin/false -H -D -u 42 privoxy
slaxemulator@9383 21 addgroup -g 42 privoxy
erjo@5885 22
paul@2275 23 cd $src
paul@2275 24
paul@2275 25 # Needs autoconf
paul@2275 26 autoheader
paul@2275 27 autoconf
paul@2275 28
paul@2275 29 ./configure \
paul@2275 30 --prefix=/usr \
paul@2275 31 --sysconfdir=/etc/privoxy \
paul@2275 32 --infodir=/usr/share/info \
paul@2275 33 --mandir=/usr/share/man \
pascal@4211 34 --localstatedir=/var \
pascal@2456 35 $CONFIGURE_ARGS &&
pascal@15375 36 make && make DESTDIR=$DESTDIR install
paul@2275 37 }
paul@2275 38
paul@2275 39 # Rules to gen a SliTaz package suitable for Tazpkg.
paul@2275 40 genpkg_rules()
paul@2275 41 {
paul@4836 42 mkdir -p $fs/etc/init.d $fs/usr
pascal@15375 43 cp -a $install/usr/sbin $fs/usr
pascal@15375 44 cp -a $install/var $fs
pascal@15375 45 cp -a $install/etc $fs
paul@2275 46
slaxemulator@9701 47 # Copy daemon from stuff
slaxemulator@9701 48 cp $stuff/daemon-privoxy $fs/etc/init.d/privoxy
paul@2275 49 }
paul@2275 50
paul@7279 51 post_install()
paul@2275 52 {
paul@7247 53 # adduser privoxy if needed
paul@7247 54 if ! grep -q privoxy $1/etc/passwd; then
paul@7247 55 echo -n "Adding user privoxy..."
slaxemulator@8011 56 chroot $1/ adduser -s /bin/false -H -D -u 42 privoxy
paul@7247 57 status
paul@7247 58 fi
paul@7279 59
slaxemulator@9383 60 if ! grep -q privoxy $1/etc/group; then
slaxemulator@9383 61 echo -n "Adding group privoxy..."
slaxemulator@9383 62 chroot $1/ addgroup -g 42 privoxy
slaxemulator@9383 63 status
slaxemulator@9383 64 fi
slaxemulator@9383 65
paul@7279 66 # and change file permissions
paul@7279 67 echo -n "Changing file permissions..."
slaxemulator@9383 68 chown -R privoxy.privoxy $1/etc/privoxy
paul@7279 69 chown -R root.root $1/etc/privoxy/templates
paul@7279 70 chown root.root $1/etc/privoxy
slaxemulator@9383 71 chown privoxy.privoxy $1/var/log/privoxy/logfile
paul@7279 72 status
paul@2275 73 }
paul@7247 74
paul@7247 75 # Del user privoxy when pkg is removed.
paul@7247 76 post_remove()
paul@7247 77 {
paul@7247 78 deluser privoxy
slaxemulator@9383 79 delgroup privoxy
paul@7247 80 }