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