wok-current view squidguardmgr/receipt @ rev 13906

Add lyx-locales, lyx-doc, lyx-examples
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Jan 23 13:18:40 2013 +0000 (2013-01-23)
parents 281fdcb451fe
children 95f8c1289048
line source
1 # SliTaz package receipt.
3 PACKAGE="squidguardmgr"
4 VERSION="1.6"
5 CATEGORY="system-tools"
6 SHORT_DESC="Web GUI for squidGuard and SquidClamav administration."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://squidguardmgr.sourceforge.net/"
10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
11 DEPENDS="squidguard squidclamav lighttpd"
12 BUILD_DEPENDS="perl squidguard squidclamav"
13 CONFIG_FILES="/etc/squidguardmgr.conf"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src
19 SQUIDUSR=99 SQUIDGRP=99 perl Makefile.PL << EOT &&
20 /etc/squidGuard/squidGuard.conf
21 nobody
22 EOT
23 mkdir -p $DESTDIR/var/www/squidguardmgr/ &&
24 make install
25 }
27 # Rules to gen a SliTaz package suitable for Tazpkg.
28 genpkg_rules()
29 {
30 mkdir -p $fs/usr/share $fs/etc $fs/var/lib/squidGuard/log $fs/var/lib/squidGuard/db
31 cp -a $_pkg/var/www/squidguardmgr $fs/usr/share
32 ( cd $fs ; patch -p0 ) < stuff/squidguardmgr.U
33 mv $fs/usr/share/squidguardmgr/squidguardmgr.conf $fs/etc
34 ln -s /etc/squidguardmgr.conf $fs/usr/share/squidguardmgr/squidguardmgr.conf
35 sed -i 's|/var/www/squidguardmgr|/usr/share/squidguardmgr|' \
36 $fs/etc/squidguardmgr.conf
37 }
39 post_install()
40 {
41 # squidguardmgr config
42 chown root.www $1/etc/squidGuard/squidGuard.conf
43 chmod 664 $1/etc/squidGuard/squidGuard.conf
44 chown nobody.nogroup $1/usr/share/squidguardmgr/lang/* \
45 $1/usr/share/squidguardmgr/lang $1/usr/share/squidguardmgr
46 # Configure lighttpd server
47 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
48 if ! grep -q /usr/share/squidguardmgr/ $1/etc/lighttpd/lighttpd.conf; then
49 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/squidguardmgr/" => "/usr/share/squidguardmgr/",|g' -i $1/etc/lighttpd/lighttpd.conf
50 if [ -z "$1" ]; then
51 # Start Web server.
52 /etc/init.d/lighttpd stop
53 /etc/init.d/lighttpd start
54 fi
55 fi
56 fi
57 # Configure apache server
58 if [ -f $1/etc/apache/httpd.conf ]; then
59 if [ ! -f $1/etc/apache/conf.d/squidguardmgr ]; then
60 cat > $1/etc/apache/conf.d/squidguardmgr <<EOT
61 <IfModule mod_alias.c>
62 Alias /squidguardmgr /usr/share/squidguardmgr
63 </IfModule>
64 <DirectoryMatch /usr/share/squidguardmgr/>
65 Options +ExecCGI
66 AddHandler cgi-script .cgi
67 DirectoryIndex squidguardmgr.cgi
68 Order allow,deny
69 Allow from all
70 </DirectoryMatch>
71 EOT
72 if [ -z "$1" ]; then
73 # Start Web server.
74 /etc/init.d/apache stop
75 /etc/init.d/apache start
76 fi
77 fi
78 fi
79 }