wok-next view squidguardmgr/receipt @ rev 21727
created recipe for vbindiff
author | Hans-G?nter Theisgen |
---|---|
date | Sat Nov 21 14:32:44 2020 +0100 (2020-11-21) |
parents | d5aab818505e |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="squidguardmgr"
4 VERSION="1.12"
5 CATEGORY="system-tools"
6 SHORT_DESC="Web GUI for squidGuard and SquidClamav administration"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="https://sourceforge.net/projects/squidguardmgr/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
14 BUILD_DEPENDS="perl squidguard"
16 compile_rules() {
17 SQUIDUSR=squid SQUIDGRP=squid perl Makefile.PL << EOT
18 /etc/squidGuard/squidGuard.conf
19 nobody
20 EOT
21 mkdir -p $install/var/www/squidguardmgr/
23 make install
24 }
26 genpkg_rules() {
27 mkdir -p $fs/usr/share $fs/etc $fs/var/lib/squidGuard/log $fs/var/lib/squidGuard/db
29 cp -a $install/var/www/squidguardmgr $fs/usr/share
30 ( cd $fs; patch -p0 ) < $stuff/squidguardmgr.U
31 mv $fs/usr/share/squidguardmgr/squidguardmgr.conf $fs/etc
32 ln -s /etc/squidguardmgr.conf $fs/usr/share/squidguardmgr/squidguardmgr.conf
34 sed -i -e 's|/var/www/squidguardmgr|/usr/share/squidguardmgr|' \
35 -e 's|SQUIDCLAMAV off|SQUIDCLAMAV on|' \
36 -e 's|SC_CONF_FILE|SC_CONF_FILE /etc/squidclamav.conf|' \
37 -e 's|C_ICAP_SOCKET|C_ICAP_SOCKET /var/run/c-icap/c-icap.ctl|' $fs/etc/squidguardmgr.conf
38 DEPENDS="squidguard squidclamav lighttpd"
39 CONFIG_FILES="/etc/squidguardmgr.conf"
40 }
42 post_install() {
43 # squidguardmgr config
44 chown root.www "$1/etc/squidGuard/squidGuard.conf"
45 chmod 664 "$1/etc/squidGuard/squidGuard.conf"
46 chown nobody.nogroup "$1"/usr/share/squidguardmgr/lang/* \
47 "$1/usr/share/squidguardmgr/lang" "$1/usr/share/squidguardmgr"
48 # Configure lighttpd server
49 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
50 if ! grep -q /usr/share/squidguardmgr/ "$1/etc/lighttpd/lighttpd.conf"; then
51 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/squidguardmgr/" => "/usr/share/squidguardmgr/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
52 if [ -z "$1" ]; then
53 # Start Web server.
54 /etc/init.d/lighttpd stop
55 /etc/init.d/lighttpd start
56 fi
57 fi
58 fi
59 # Configure apache server
60 if [ -f "$1/etc/apache/httpd.conf" ]; then
61 if [ ! -f "$1/etc/apache/conf.d/squidguardmgr" ]; then
62 cat > "$1/etc/apache/conf.d/squidguardmgr" <<EOT
63 <IfModule mod_alias.c>
64 Alias /squidguardmgr /usr/share/squidguardmgr
65 </IfModule>
66 <DirectoryMatch /usr/share/squidguardmgr/>
67 Options +ExecCGI
68 AddHandler cgi-script .cgi
69 DirectoryIndex squidguardmgr.cgi
70 Order allow,deny
71 Allow from all
72 </DirectoryMatch>
73 EOT
74 if [ -z "$1" ]; then
75 # Start Web server.
76 /etc/init.d/apache stop
77 /etc/init.d/apache start
78 fi
79 fi
80 fi
81 }