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