wok view squidguard/receipt @ rev 4649

Add openvas-scanner
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Dec 27 11:39:42 2009 +0100 (2009-12-27)
parents 07514ab2c2fc
children f3a7e7dd7e7c
line source
1 # SliTaz package receipt.
3 PACKAGE="squidguard"
4 VERSION="1.4"
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 rmdir $fs/usr/squidGuard
40 }
42 # Pre and post install commands for Tazpkg.
43 post_install()
44 {
45 chown -R nobody $1/var/lib/squidGuard/*
46 if ! grep -q ^redirect_program $1/etc/squid/squid.conf ; then
47 echo "Updating /etc/squid/squid.conf"
48 cat >> $1/etc/squid/squid.conf <<EOF
49 redirect_program /usr/bin/squidGuard -c /etc/squidGuard/squidGuard.conf
50 EOF
51 # Restart squid if running
52 $(which squid) -k reconfigure 2> /dev/null
53 fi
54 }
56 post_remove()
57 {
58 if grep -q "squidGuard" /etc/squid/squid.conf ; then
59 echo "Updating /etc/squid/squid.conf"
60 sed -i -e "s/.*squidGuard.*//" /etc/squid/squid.conf
61 # Restart squid if running
62 $(which squid) -k reconfigure 2> /dev/null
63 fi
64 }