wok diff squid/receipt @ rev 1253
Add squid & squidguard
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Aug 13 07:40:55 2008 +0000 (2008-08-13) |
parents | |
children | 3d99ecce2d4b |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/squid/receipt Wed Aug 13 07:40:55 2008 +0000 1.3 @@ -0,0 +1,78 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="squid" 1.7 +VERSION="3.0.STABLE8" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="Web/ftp proxy." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +TARBALL="$PACKAGE-$VERSION.tar.bz2" 1.12 +WEB_SITE="http://www.squid-cache.org/" 1.13 +WGET_URL="${WEB_SITE}Versions/v3/3.0/$TARBALL" 1.14 +CONFIG_FILES="/etc/squid" 1.15 +#DEPENDS="iptables" 1.16 + 1.17 +# Rules to configure and make the package. 1.18 +compile_rules() 1.19 +{ 1.20 + cd $src 1.21 + ./configure --prefix=/usr --infodir=/usr/share/info \ 1.22 + --sysconfdir=/etc/squid --localstatedir=/var \ 1.23 + --mandir=/usr/share/man $CONFIGURE_ARGS 1.24 + make 1.25 + make DESTDIR=$PWD/_pkg install 1.26 +} 1.27 + 1.28 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.29 +genpkg_rules() 1.30 +{ 1.31 + mkdir -p $fs/usr/share/errors $fs/var/cache/squid $fs/var/log/squid 1.32 + cp -a $_pkg/etc $fs 1.33 + rm -rf $fs/etc/squid/*.default 1.34 + cp -a stuff/etc $fs 1.35 + cp -a $_pkg/var $fs 1.36 + cp -a $_pkg/usr/bin $fs/usr 1.37 + cp -a $_pkg/usr/sbin $fs/usr 1.38 + cp -a $_pkg/usr/libexec $fs/usr 1.39 + cp -a $_pkg/usr/share/mib.txt $fs/usr/share 1.40 + cp -a $_pkg/usr/share/icons $fs/usr/share 1.41 + cp -a $_pkg/usr/share/errors/English $fs/usr/share/errors 1.42 + cp -a $_pkg/usr/share/errors/French $fs/usr/share/errors 1.43 + rm -f $fs/etc/*conf* 1.44 + sed -i -e 's/TAG: visible_hostname/TAG: visible_hostname\nvisible_hostname slitaz/' \ 1.45 + -e 's|^access_log /var/logs|access_log /var/log/squid|' \ 1.46 + -e 's|^# cache_store_log /var/logs|cache_store_log /var/cache/squid|' \ 1.47 + -e 's|^# cache_log /var/logs|cache_log /var/cache/squid|' \ 1.48 + -e 's|^# cache_dir ufs /var/cache|cache_dir ufs /var/cache/squid|' \ 1.49 + -e 's|^# pid_filename /var/logs|pid_filename /var/run|' \ 1.50 + -e 's|^coredump_dir /var/logs|coredump_dir /var/cache/squid|' \ 1.51 + $fs/etc/squid/squid.conf 1.52 + # Package all squid pkgs 1.53 + for i in $(cd $WOK; ls -d squid-*) 1.54 + do 1.55 + tazwok genpkg $i 1.56 + done 1.57 +} 1.58 + 1.59 +# Pre and post install commands for Tazpkg. 1.60 +post_install() 1.61 +{ 1.62 + ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \ 1.63 + $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT 1.64 +$(cd $1/ ; find etc/squid -type f) 1.65 +EOT 1.66 + chown nobody.nogroup /var/cache/squid /var/log/squid 1.67 + cat <<EOF 1.68 +---- 1.69 +To start $PACKAGE server you can run : 1.70 + 1.71 + /etc/init.d/$PACKAGE start 1.72 + 1.73 +Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf 1.74 +---- 1.75 +EOF 1.76 +} 1.77 + 1.78 +repack_cleanup() 1.79 +{ 1.80 + zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id ) 1.81 +}