wok annotate squidguard/receipt @ rev 3803

Add: icedtea6 (1.5)
author Matthew Sheets <rcx@zoominternet.net>
date Tue Aug 04 16:34:27 2009 +0000 (2009-08-04)
parents bd6010223726
children 07514ab2c2fc
rev   line source
pascal@1253 1 # SliTaz package receipt.
pascal@1253 2
pascal@1253 3 PACKAGE="squidguard"
pascal@1253 4 VERSION="1.3"
pascal@1253 5 CATEGORY="network"
pascal@1253 6 SHORT_DESC="Web filter."
pascal@1253 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@1253 8 SOURCE="squidGuard"
pascal@1253 9 TARBALL="$SOURCE-$VERSION.tar.gz"
pascal@1253 10 WEB_SITE="http://www.squidguard.org/"
pascal@1253 11 WGET_URL="${WEB_SITE}Downloads/$TARBALL"
pascal@1253 12 DEPENDS="squid libdb"
pascal@1253 13 BUILD_DEPENDS="db-dev"
pascal@1253 14
pascal@1253 15 # Rules to configure and make the package.
pascal@1253 16 compile_rules()
pascal@1253 17 {
pascal@1253 18 cd $src
pascal@1253 19 ./configure --prefix=/usr --infodir=/usr/share/info \
erjo@2334 20 --sysconfdir=/etc --with-sg-config=/etc/squidGuard/squidGuard.conf \
pascal@1253 21 --with-sg-logdir=/var/lib/squidGuard/log \
pascal@1253 22 --with-sg-dbhome=/var/lib/squidGuard/db \
pascal@1253 23 --mandir=/usr/share/man $CONFIGURE_ARGS
pascal@1253 24 make
pascal@1253 25 sed -e 's|^prefix =.*|prefix = _pkg/usr|' \
pascal@1253 26 -e 's|^logdir =.*|logdir = _pkg/var/lib/squidGuard/log|' \
erjo@2334 27 -e 's|^configfile =.*|configfile = _pkg/etc/squidGuard/squidGuard.conf|' \
pascal@1253 28 -e 's|^dbhomedir =.*|dbhomedir = _pkg/var/lib/squidGuard/db|' \
erjo@2334 29 -e 's|^SQUIDUSER =.*|SQUIDUSER = nobody|' \
pascal@1253 30 < Makefile > Makefile.slitaz-install
erjo@2334 31 mkdir -p _pkg/etc/squidGuard
pascal@1253 32 make -f Makefile.slitaz-install install
pascal@1253 33 }
pascal@1253 34
pascal@1253 35 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1253 36 genpkg_rules()
pascal@1253 37 {
pascal@1253 38 cp -a $_pkg/* $fs/
pascal@1253 39 }
pascal@1253 40
pascal@1253 41 # Pre and post install commands for Tazpkg.
pascal@1253 42 post_install()
pascal@1253 43 {
erjo@2334 44 chown -R nobody $1/var/lib/squidGuard/* $1/usr/squidGuard
erjo@2334 45 if ! grep -q ^redirect_program $1/etc/squid/squid.conf ; then
pascal@1253 46 echo "Updating /etc/squid/squid.conf"
pascal@1253 47 cat >> $1/etc/squid/squid.conf <<EOF
erjo@2334 48 redirect_program /usr/bin/squidGuard -c /etc/squidGuard/squidGuard.conf
pascal@1253 49 EOF
erjo@2334 50 # Restart squid if running
erjo@2334 51 $(which squid) -k reconfigure 2> /dev/null
pascal@1253 52 fi
pascal@1253 53 }
erjo@2334 54
erjo@2334 55 post_remove()
erjo@2334 56 {
erjo@2334 57 if grep -q "squidGuard" /etc/squid/squid.conf ; then
erjo@2334 58 echo "Updating /etc/squid/squid.conf"
erjo@2334 59 sed -i -e "s/.*squidGuard.*//" /etc/squid/squid.conf
erjo@2334 60 # Restart squid if running
erjo@2334 61 $(which squid) -k reconfigure 2> /dev/null
erjo@2334 62 fi
erjo@2334 63 }