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 \
|
pascal@1253
|
20 --sysconfdir=/etc --with-sg-config=/etc/squid/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|' \
|
pascal@1253
|
27 -e 's|^configfile =.*|configfile = _pkg/etc/squid/squidGuard.conf|' \
|
pascal@1253
|
28 -e 's|^dbhomedir =.*|dbhomedir = _pkg/var/lib/squidGuard/db|' \
|
pascal@1253
|
29 -e 's|^SQUIDUSER =.*|SQUIDUSER = root|' \
|
pascal@1253
|
30 < Makefile > Makefile.slitaz-install
|
pascal@1253
|
31 mkdir -p _pkg/etc/squid
|
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 {
|
pascal@1253
|
44 chown -R nobody /var/lib/squidGuard/* /usr/squidGuard
|
pascal@1253
|
45 if ! grep ^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
|
pascal@1253
|
48 redirect_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf
|
pascal@1253
|
49 EOF
|
pascal@1253
|
50 fi
|
pascal@1253
|
51 }
|