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