wok-6.x view squidguard/receipt @ rev 12431

ekiga: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Apr 21 17:25:54 2012 +0200 (2012-04-21)
parents 940b5937e496
children 1040bd60b471
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
20 # Security patches
21 while read patch_file; do
22 echo "Apply $patch_file"
23 tar xvzf $stuff/$patch_file || return 1
24 cp -a $(basename $patch_file .tar.gz)/* src
25 done <<EOT
26 squidGuard-1.4-patch-20091015.tar.gz
27 squidGuard-1.4-patch-20091019.tar.gz
28 EOT
29 ./configure --prefix=/usr --infodir=/usr/share/info \
30 --sysconfdir=/etc --with-sg-config=/etc/squidGuard/squidGuard.conf \
31 --with-sg-logdir=/var/lib/squidGuard/log \
32 --with-sg-dbhome=/var/lib/squidGuard/db \
33 --mandir=/usr/share/man $CONFIGURE_ARGS
35 make
36 sed -e 's|^prefix =.*|prefix = _pkg/usr|' \
37 -e 's|^logdir =.*|logdir = _pkg/var/lib/squidGuard/log|' \
38 -e 's|^configfile =.*|configfile = _pkg/etc/squidGuard/squidGuard.conf|' \
39 -e 's|^dbhomedir =.*|dbhomedir = _pkg/var/lib/squidGuard/db|' \
40 -e 's|^SQUIDUSER =.*|SQUIDUSER = nobody|' \
41 < Makefile > Makefile.slitaz-install
42 mkdir -p _pkg/etc/squidGuard
43 make -f Makefile.slitaz-install install
44 }
46 # Rules to gen a SliTaz package suitable for Tazpkg.
47 genpkg_rules()
48 {
49 mkdir -p $fs/etc/squid/conf.d
51 cp -a $install/* $fs/
52 cp -pa $stuff/squidguard.conf $fs/etc/squid/conf.d
54 # Cleanup.
55 rmdir $fs/usr/squidGuard
57 }
59 # Pre and post install commands for Tazpkg.
60 post_install()
61 {
62 chown -R nobody $1/var/lib/squidGuard/*
63 # Recharge squid config
64 [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null
65 }
67 post_remove()
68 {
69 # Recharge squid config
70 [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null
71 }