wok annotate squidguard/receipt @ rev 15786
Up: OpenVPN PAM (2.3.2)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Jan 15 18:51:15 2014 +0100 (2014-01-15) |
parents | 1040bd60b471 |
children | 393ec0342e42 |
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@1253 | 11 WEB_SITE="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 { |
pascal@1253 | 19 cd $src |
erjo@4661 | 20 |
erjo@4661 | 21 # Security patches |
erjo@4661 | 22 while read patch_file; do |
erjo@4661 | 23 echo "Apply $patch_file" |
pascal@8974 | 24 tar xvzf $stuff/$patch_file || return 1 |
erjo@4661 | 25 cp -a $(basename $patch_file .tar.gz)/* src |
erjo@4661 | 26 done <<EOT |
erjo@4661 | 27 squidGuard-1.4-patch-20091015.tar.gz |
erjo@4661 | 28 squidGuard-1.4-patch-20091019.tar.gz |
erjo@4661 | 29 EOT |
pascal@1253 | 30 ./configure --prefix=/usr --infodir=/usr/share/info \ |
erjo@2334 | 31 --sysconfdir=/etc --with-sg-config=/etc/squidGuard/squidGuard.conf \ |
pascal@1253 | 32 --with-sg-logdir=/var/lib/squidGuard/log \ |
pascal@1253 | 33 --with-sg-dbhome=/var/lib/squidGuard/db \ |
pascal@1253 | 34 --mandir=/usr/share/man $CONFIGURE_ARGS |
erjo@4661 | 35 |
pascal@1253 | 36 make |
pascal@15603 | 37 sed -e "s|^prefix =.*|prefix = $DESTDIR/usr|" \ |
pascal@15603 | 38 -e "s|^logdir =.*|logdir = $DESTDIR/var/lib/squidGuard/log|" \ |
pascal@15603 | 39 -e "s|^configfile =.*|configfile = $DESTDIR/etc/squidGuard/squidGuard.conf|" \ |
pascal@15603 | 40 -e "s|^dbhomedir =.*|dbhomedir = $DESTDIR/var/lib/squidGuard/db|" \ |
pascal@15603 | 41 -e "s|^SQUIDUSER =.*|SQUIDUSER = nobody|" \ |
pascal@1253 | 42 < Makefile > Makefile.slitaz-install |
pascal@15603 | 43 mkdir -p $DESTDIR/etc/squidGuard |
pascal@1253 | 44 make -f Makefile.slitaz-install install |
pascal@1253 | 45 } |
pascal@1253 | 46 |
pascal@1253 | 47 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1253 | 48 genpkg_rules() |
pascal@1253 | 49 { |
erjo@11916 | 50 mkdir -p $fs/etc/squid/conf.d |
erjo@11916 | 51 |
erjo@11916 | 52 cp -a $install/* $fs/ |
erjo@11916 | 53 cp -pa $stuff/squidguard.conf $fs/etc/squid/conf.d |
erjo@11916 | 54 |
erjo@11916 | 55 # Cleanup. |
pascal@3990 | 56 rmdir $fs/usr/squidGuard |
erjo@11916 | 57 |
pascal@1253 | 58 } |
pascal@1253 | 59 |
pascal@1253 | 60 # Pre and post install commands for Tazpkg. |
pascal@1253 | 61 post_install() |
pascal@1253 | 62 { |
pascal@3990 | 63 chown -R nobody $1/var/lib/squidGuard/* |
erjo@11916 | 64 # Recharge squid config |
erjo@11916 | 65 [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null |
pascal@1253 | 66 } |
erjo@2334 | 67 |
erjo@2334 | 68 post_remove() |
erjo@2334 | 69 { |
erjo@11916 | 70 # Recharge squid config |
erjo@11916 | 71 [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null |
erjo@2334 | 72 } |