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