wok-current annotate squidguard/receipt @ rev 13194
linux-source: add rdev
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Aug 05 00:27:09 2012 +0200 (2012-08-05) |
parents | 940b5937e496 |
children | 1040bd60b471 |
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@1253 | 8 SOURCE="squidGuard" |
pascal@1253 | 9 TARBALL="$SOURCE-$VERSION.tar.gz" |
pascal@1253 | 10 WEB_SITE="http://www.squidguard.org/" |
pascal@1253 | 11 WGET_URL="${WEB_SITE}Downloads/$TARBALL" |
pascal@1253 | 12 DEPENDS="squid libdb" |
pascal@1253 | 13 BUILD_DEPENDS="db-dev" |
pascal@1253 | 14 |
pascal@1253 | 15 # Rules to configure and make the package. |
pascal@1253 | 16 compile_rules() |
pascal@1253 | 17 { |
pascal@1253 | 18 cd $src |
erjo@4661 | 19 |
erjo@4661 | 20 # Security patches |
erjo@4661 | 21 while read patch_file; do |
erjo@4661 | 22 echo "Apply $patch_file" |
pascal@8974 | 23 tar xvzf $stuff/$patch_file || return 1 |
erjo@4661 | 24 cp -a $(basename $patch_file .tar.gz)/* src |
erjo@4661 | 25 done <<EOT |
erjo@4661 | 26 squidGuard-1.4-patch-20091015.tar.gz |
erjo@4661 | 27 squidGuard-1.4-patch-20091019.tar.gz |
erjo@4661 | 28 EOT |
pascal@1253 | 29 ./configure --prefix=/usr --infodir=/usr/share/info \ |
erjo@2334 | 30 --sysconfdir=/etc --with-sg-config=/etc/squidGuard/squidGuard.conf \ |
pascal@1253 | 31 --with-sg-logdir=/var/lib/squidGuard/log \ |
pascal@1253 | 32 --with-sg-dbhome=/var/lib/squidGuard/db \ |
pascal@1253 | 33 --mandir=/usr/share/man $CONFIGURE_ARGS |
erjo@4661 | 34 |
pascal@1253 | 35 make |
pascal@1253 | 36 sed -e 's|^prefix =.*|prefix = _pkg/usr|' \ |
pascal@1253 | 37 -e 's|^logdir =.*|logdir = _pkg/var/lib/squidGuard/log|' \ |
erjo@2334 | 38 -e 's|^configfile =.*|configfile = _pkg/etc/squidGuard/squidGuard.conf|' \ |
pascal@1253 | 39 -e 's|^dbhomedir =.*|dbhomedir = _pkg/var/lib/squidGuard/db|' \ |
erjo@2334 | 40 -e 's|^SQUIDUSER =.*|SQUIDUSER = nobody|' \ |
pascal@1253 | 41 < Makefile > Makefile.slitaz-install |
erjo@2334 | 42 mkdir -p _pkg/etc/squidGuard |
pascal@1253 | 43 make -f Makefile.slitaz-install install |
pascal@1253 | 44 } |
pascal@1253 | 45 |
pascal@1253 | 46 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1253 | 47 genpkg_rules() |
pascal@1253 | 48 { |
erjo@11916 | 49 mkdir -p $fs/etc/squid/conf.d |
erjo@11916 | 50 |
erjo@11916 | 51 cp -a $install/* $fs/ |
erjo@11916 | 52 cp -pa $stuff/squidguard.conf $fs/etc/squid/conf.d |
erjo@11916 | 53 |
erjo@11916 | 54 # Cleanup. |
pascal@3990 | 55 rmdir $fs/usr/squidGuard |
erjo@11916 | 56 |
pascal@1253 | 57 } |
pascal@1253 | 58 |
pascal@1253 | 59 # Pre and post install commands for Tazpkg. |
pascal@1253 | 60 post_install() |
pascal@1253 | 61 { |
pascal@3990 | 62 chown -R nobody $1/var/lib/squidGuard/* |
erjo@11916 | 63 # Recharge squid config |
erjo@11916 | 64 [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null |
pascal@1253 | 65 } |
erjo@2334 | 66 |
erjo@2334 | 67 post_remove() |
erjo@2334 | 68 { |
erjo@11916 | 69 # Recharge squid config |
erjo@11916 | 70 [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null |
erjo@2334 | 71 } |