wok-next diff squidguard/receipt @ rev 20879
mate-session-manager: update bdeps; ntop: up (5.0.1); sslh: normalize receipt
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Jul 07 16:28:22 2018 +0300 (2018-07-07) |
parents | ed8073aa8cf0 |
children | d5aab818505e |
line diff
1.1 --- a/squidguard/receipt Mon Dec 21 00:07:14 2015 +0100 1.2 +++ b/squidguard/receipt Sat Jul 07 16:28:22 2018 +0300 1.3 @@ -1,24 +1,20 @@ 1.4 -# SliTaz package receipt. 1.5 +# SliTaz package receipt v2. 1.6 1.7 PACKAGE="squidguard" 1.8 VERSION="1.4" 1.9 CATEGORY="network" 1.10 -SHORT_DESC="Web filter." 1.11 +SHORT_DESC="Web filter" 1.12 MAINTAINER="pascal.bellard@slitaz.org" 1.13 LICENSE="GPL" 1.14 -SOURCE="squidGuard" 1.15 -TARBALL="$SOURCE-$VERSION.tar.gz" 1.16 WEB_SITE="http://www.squidguard.org/" 1.17 + 1.18 +TARBALL="squidGuard-$VERSION.tar.gz" 1.19 WGET_URL="${WEB_SITE}Downloads/$TARBALL" 1.20 -DEPENDS="squid libdb" 1.21 + 1.22 BUILD_DEPENDS="db-dev" 1.23 1.24 -# Rules to configure and make the package. 1.25 -compile_rules() 1.26 -{ 1.27 - cd $src 1.28 - 1.29 - # Security patches 1.30 +compile_rules() { 1.31 + # Security patches 1.32 while read patch_file; do 1.33 echo "Apply $patch_file" 1.34 tar xvzf $stuff/$patch_file || return 1 1.35 @@ -31,14 +27,13 @@ 1.36 # Add support for squid 3.4 1.37 patch -p1 < $stuff/squidGuard-1.4_upgrade.patch 1.38 patch -p1 < $stuff/squidGuard-1.4-dnsbl.patch 1.39 - 1.40 - ./configure --prefix=/usr --infodir=/usr/share/info \ 1.41 - --sysconfdir=/etc --with-sg-config=/etc/squidGuard/squidGuard.conf \ 1.42 - --with-sg-logdir=/var/lib/squidGuard/log \ 1.43 - --with-sg-dbhome=/var/lib/squidGuard/db \ 1.44 - --mandir=/usr/share/man $CONFIGURE_ARGS 1.45 - 1.46 - make 1.47 + 1.48 + ./configure \ 1.49 + --with-sg-config=/etc/squidGuard/squidGuard.conf \ 1.50 + --with-sg-logdir=/var/lib/squidGuard/log \ 1.51 + --with-sg-dbhome=/var/lib/squidGuard/db \ 1.52 + $CONFIGURE_ARGS && 1.53 + make && 1.54 sed -e "s|^prefix =.*|prefix = $DESTDIR/usr|" \ 1.55 -e "s|^logdir =.*|logdir = $DESTDIR/var/lib/squidGuard/log|" \ 1.56 -e "s|^configfile =.*|configfile = $DESTDIR/etc/squidGuard/squidGuard.conf|" \ 1.57 @@ -49,9 +44,7 @@ 1.58 make -f Makefile.slitaz-install install 1.59 } 1.60 1.61 -# Rules to gen a SliTaz package suitable for Tazpkg. 1.62 -genpkg_rules() 1.63 -{ 1.64 +genpkg_rules() { 1.65 mkdir -p $fs/etc/squid/conf.d 1.66 1.67 cp -a $install/* $fs/ 1.68 @@ -60,24 +53,21 @@ 1.69 # Cleanup. 1.70 rmdir $fs/usr/squidGuard 1.71 1.72 + DEPENDS="squid libdb" 1.73 } 1.74 1.75 -# Pre and post install commands for Tazpkg. 1.76 -post_install() 1.77 -{ 1.78 +post_install() { 1.79 chown -R nobody "$1"/var/lib/squidGuard/* 1.80 # Recharge squid config 1.81 [ "$1" ] || { [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null; } 1.82 } 1.83 1.84 -post_remove() 1.85 -{ 1.86 +post_remove() { 1.87 # Recharge squid config 1.88 [ "$1" ] || { [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null; } 1.89 } 1.90 1.91 -check_config() 1.92 -{ 1.93 +check_config() { 1.94 su -c 'echo "http://www.example.com 192.168.0.6/- - GET" | \ 1.95 squidGuard -c /etc/squidGuard/squidGuard.conf -d' nobody 1.96 }