wok view squidguard/receipt @ rev 16404

Up: slitaz-tools, slitaz-tools-boxes (5.7.2) bugfix
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Apr 16 15:34:54 2014 +0300 (2014-04-16)
parents 1040bd60b471
children 393ec0342e42
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 LICENSE="GPL"
9 SOURCE="squidGuard"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WEB_SITE="http://www.squidguard.org/"
12 WGET_URL="${WEB_SITE}Downloads/$TARBALL"
13 DEPENDS="squid libdb"
14 BUILD_DEPENDS="db-dev"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
21 # Security patches
22 while read patch_file; do
23 echo "Apply $patch_file"
24 tar xvzf $stuff/$patch_file || return 1
25 cp -a $(basename $patch_file .tar.gz)/* src
26 done <<EOT
27 squidGuard-1.4-patch-20091015.tar.gz
28 squidGuard-1.4-patch-20091019.tar.gz
29 EOT
30 ./configure --prefix=/usr --infodir=/usr/share/info \
31 --sysconfdir=/etc --with-sg-config=/etc/squidGuard/squidGuard.conf \
32 --with-sg-logdir=/var/lib/squidGuard/log \
33 --with-sg-dbhome=/var/lib/squidGuard/db \
34 --mandir=/usr/share/man $CONFIGURE_ARGS
36 make
37 sed -e "s|^prefix =.*|prefix = $DESTDIR/usr|" \
38 -e "s|^logdir =.*|logdir = $DESTDIR/var/lib/squidGuard/log|" \
39 -e "s|^configfile =.*|configfile = $DESTDIR/etc/squidGuard/squidGuard.conf|" \
40 -e "s|^dbhomedir =.*|dbhomedir = $DESTDIR/var/lib/squidGuard/db|" \
41 -e "s|^SQUIDUSER =.*|SQUIDUSER = nobody|" \
42 < Makefile > Makefile.slitaz-install
43 mkdir -p $DESTDIR/etc/squidGuard
44 make -f Makefile.slitaz-install install
45 }
47 # Rules to gen a SliTaz package suitable for Tazpkg.
48 genpkg_rules()
49 {
50 mkdir -p $fs/etc/squid/conf.d
52 cp -a $install/* $fs/
53 cp -pa $stuff/squidguard.conf $fs/etc/squid/conf.d
55 # Cleanup.
56 rmdir $fs/usr/squidGuard
58 }
60 # Pre and post install commands for Tazpkg.
61 post_install()
62 {
63 chown -R nobody $1/var/lib/squidGuard/*
64 # Recharge squid config
65 [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null
66 }
68 post_remove()
69 {
70 # Recharge squid config
71 [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null
72 }