wok-next annotate squidguard/receipt @ rev 21357

updated gimp (2.10.14 -> 2.10.18)
author Hans-G?nter Theisgen
date Sat Apr 11 13:55:06 2020 +0100 (2020-04-11)
parents 757d032c55c7
children
rev   line source
al@20534 1 # SliTaz package receipt v2.
pascal@1253 2
pascal@1253 3 PACKAGE="squidguard"
erjo@3985 4 VERSION="1.4"
pascal@1253 5 CATEGORY="network"
al@20534 6 SHORT_DESC="Web filter"
pascal@1253 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15023 8 LICENSE="GPL"
pascal@1253 9 WEB_SITE="http://www.squidguard.org/"
al@20534 10
al@20534 11 TARBALL="squidGuard-$VERSION.tar.gz"
pascal@1253 12 WGET_URL="${WEB_SITE}Downloads/$TARBALL"
al@20534 13
pascal@1253 14 BUILD_DEPENDS="db-dev"
pascal@1253 15
al@20534 16 compile_rules() {
al@20534 17 # Security patches
erjo@4661 18 while read patch_file; do
erjo@4661 19 echo "Apply $patch_file"
pascal@8974 20 tar xvzf $stuff/$patch_file || return 1
erjo@4661 21 cp -a $(basename $patch_file .tar.gz)/* src
erjo@4661 22 done <<EOT
erjo@4661 23 squidGuard-1.4-patch-20091015.tar.gz
erjo@4661 24 squidGuard-1.4-patch-20091019.tar.gz
pascal@18170 25 squidGuard-1.4-patch-20150201.tar.gz
erjo@4661 26 EOT
erjo@16708 27 # Add support for squid 3.4
erjo@16708 28 patch -p1 < $stuff/squidGuard-1.4_upgrade.patch
erjo@16708 29 patch -p1 < $stuff/squidGuard-1.4-dnsbl.patch
al@20534 30
al@20534 31 ./configure \
al@20534 32 --with-sg-config=/etc/squidGuard/squidGuard.conf \
al@20534 33 --with-sg-logdir=/var/lib/squidGuard/log \
al@20534 34 --with-sg-dbhome=/var/lib/squidGuard/db \
al@20534 35 $CONFIGURE_ARGS &&
al@20534 36 make &&
al@21020 37 sed -e "s|^prefix =.*|prefix = $install/usr|" \
al@21020 38 -e "s|^logdir =.*|logdir = $install/var/lib/squidGuard/log|" \
al@21020 39 -e "s|^configfile =.*|configfile = $install/etc/squidGuard/squidGuard.conf|" \
al@21020 40 -e "s|^dbhomedir =.*|dbhomedir = $install/var/lib/squidGuard/db|" \
pascal@15603 41 -e "s|^SQUIDUSER =.*|SQUIDUSER = nobody|" \
pascal@1253 42 < Makefile > Makefile.slitaz-install
al@21020 43 mkdir -p $install/etc/squidGuard
pascal@1253 44 make -f Makefile.slitaz-install install
pascal@1253 45 }
pascal@1253 46
al@20534 47 genpkg_rules() {
erjo@11916 48 mkdir -p $fs/etc/squid/conf.d
al@21020 49
erjo@11916 50 cp -a $install/* $fs/
erjo@11916 51 cp -pa $stuff/squidguard.conf $fs/etc/squid/conf.d
al@21020 52
erjo@11916 53 # Cleanup.
pascal@3990 54 rmdir $fs/usr/squidGuard
al@21020 55
al@20534 56 DEPENDS="squid libdb"
pascal@1253 57 }
pascal@1253 58
al@20534 59 post_install() {
pascal@18730 60 chown -R nobody "$1"/var/lib/squidGuard/*
erjo@11916 61 # Recharge squid config
pascal@18732 62 [ "$1" ] || { [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null; }
pascal@1253 63 }
erjo@2334 64
al@20534 65 post_remove() {
erjo@11916 66 # Recharge squid config
pascal@18732 67 [ "$1" ] || { [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null; }
erjo@2334 68 }
pascal@18170 69
al@20534 70 check_config() {
pascal@18174 71 su -c 'echo "http://www.example.com 192.168.0.6/- - GET" | \
pascal@18174 72 squidGuard -c /etc/squidGuard/squidGuard.conf -d' nobody
pascal@18170 73 }