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