wok-current diff squidanalyzer/receipt @ rev 23122
updated libxfconf and libxfconf-dev (4.13.6 -> 4.14.1)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Mar 13 09:28:19 2020 +0100 (2020-03-13) |
parents | |
children | 5ea0ce1cecc0 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/squidanalyzer/receipt Fri Mar 13 09:28:19 2020 +0100 1.3 @@ -0,0 +1,81 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="squidanalyzer" 1.7 +VERSION="6.6" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="Squid proxy native log analyser and reports generator" 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +LICENSE="GPL3" 1.12 +TARBALL="$PACKAGE-$VERSION.tar.gz" 1.13 +WEB_SITE="http://squidanalyzer.darold.net/" 1.14 +WGET_URL="https://github.com/darold/squidanalyzer/archive/v$VERSION.tar.gz" 1.15 +CONFIG_FILES="/etc/squidanalyzer" 1.16 +TAGS="logs" 1.17 + 1.18 +DEPENDS="perl squid" 1.19 +BUILD_DEPENDS="perl" 1.20 +SUGGESTED="logrotate" 1.21 + 1.22 +# Rules to configure and make the package. 1.23 +compile_rules() 1.24 +{ 1.25 + perl Makefile.PL INSTALLDIRS=site 1.26 + make && 1.27 + make DESTDIR=$DESTDIR install 1.28 +} 1.29 + 1.30 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.31 +genpkg_rules() 1.32 +{ 1.33 + mkdir -p $fs/usr 1.34 + cp -a $install/usr/bin $fs/usr 1.35 + cp -a $install/usr/lib $fs/usr 1.36 + cp -a $install/var $fs 1.37 + chown -R 80.80 $fs/var/www/squidanalyzer 1.38 + cp -a $install/etc $fs 1.39 + mkdir $fs/etc/initcron.d 1.40 + cat > $fs/etc/initcron.d/squidanalyzer <<EOT 1.41 + 1.42 +# SquidAnalyzer log reporting daily 1.43 +0 2 * * * /usr/bin/squid-analyzer > /dev/null 2>&1 1.44 +EOT 1.45 + chmod +x $fs/etc/initcron.d/squidanalyzer 1.46 +} 1.47 + 1.48 +# Pre and post install commands for Tazpkg. 1.49 +pre_remove() 1.50 +{ 1.51 + if [ -z "$1" ]; then 1.52 + crontab -l 2> /dev/null | grep -q squidanalyzer || crontab - << EOT 1.53 +$(crontab -l 2> /dev/null | sed '/SquidAnalyzer/d;/squid-analyzer/d') 1.54 +EOT 1.55 + fi 1.56 +} 1.57 + 1.58 +post_install() 1.59 +{ 1.60 + if [ -z "$1" ]; then 1.61 + crontab -l 2> /dev/null | grep -q squidanalyzer || crontab - << EOT 1.62 +$(crontab -l 2> /dev/null) 1.63 +$(cat /etc/initcron.d/squidanalyzer) 1.64 +EOT 1.65 + chmod -x /etc/initcron.d/squidanalyzer 1.66 + fi 1.67 + if [ -d $1/etc/logrotate.d -a 1.68 + -z "$(ls $1/etc/logrotate.d | grep squid)" ]; then 1.69 + cat > $1/etc/logrotate.d/squidanalyzer <<EOT 1.70 +/var/log/proxy/squid-access.log { 1.71 + daily 1.72 + compress 1.73 + rotate 730 1.74 + missingok 1.75 + nocreate 1.76 + sharedscripts 1.77 + postrotate 1.78 + test ! -e /var/run/squid.pid || /usr/sbin/squid -k rotate 1.79 + /usr/bin/squid-analyzer -d -l /var/log/proxy/squid-access.log.1 1.80 + endscript 1.81 +} 1.82 +EOT 1.83 + fi 1.84 +}