wok annotate squid/receipt @ rev 2371

Add mmx-emu
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Mar 06 16:29:09 2009 +0000 (2009-03-06)
parents 3d99ecce2d4b
children 0e9145fbcce7
rev   line source
pascal@1253 1 # SliTaz package receipt.
pascal@1253 2
pascal@1253 3 PACKAGE="squid"
pascal@1253 4 VERSION="3.0.STABLE8"
pascal@1253 5 CATEGORY="network"
pascal@1253 6 SHORT_DESC="Web/ftp proxy."
pascal@1253 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@1253 8 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pascal@1253 9 WEB_SITE="http://www.squid-cache.org/"
pascal@1253 10 WGET_URL="${WEB_SITE}Versions/v3/3.0/$TARBALL"
pascal@1253 11 CONFIG_FILES="/etc/squid"
pascal@1253 12 #DEPENDS="iptables"
pascal@1511 13 BUILD_DEPENDS="perl"
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
pascal@1253 19 ./configure --prefix=/usr --infodir=/usr/share/info \
pascal@1253 20 --sysconfdir=/etc/squid --localstatedir=/var \
pascal@1511 21 --mandir=/usr/share/man $CONFIGURE_ARGS &&
pascal@1511 22 make &&
pascal@1253 23 make DESTDIR=$PWD/_pkg install
pascal@1253 24 }
pascal@1253 25
pascal@1253 26 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1253 27 genpkg_rules()
pascal@1253 28 {
pascal@1253 29 mkdir -p $fs/usr/share/errors $fs/var/cache/squid $fs/var/log/squid
pascal@1253 30 cp -a $_pkg/etc $fs
pascal@1253 31 rm -rf $fs/etc/squid/*.default
pascal@1253 32 cp -a stuff/etc $fs
pascal@1253 33 cp -a $_pkg/var $fs
pascal@1253 34 cp -a $_pkg/usr/bin $fs/usr
pascal@1253 35 cp -a $_pkg/usr/sbin $fs/usr
pascal@1253 36 cp -a $_pkg/usr/libexec $fs/usr
pascal@1253 37 cp -a $_pkg/usr/share/mib.txt $fs/usr/share
pascal@1253 38 cp -a $_pkg/usr/share/icons $fs/usr/share
pascal@1253 39 cp -a $_pkg/usr/share/errors/English $fs/usr/share/errors
pascal@1253 40 cp -a $_pkg/usr/share/errors/French $fs/usr/share/errors
pascal@1253 41 rm -f $fs/etc/*conf*
pascal@1253 42 sed -i -e 's/TAG: visible_hostname/TAG: visible_hostname\nvisible_hostname slitaz/' \
pascal@1253 43 -e 's|^access_log /var/logs|access_log /var/log/squid|' \
pascal@1253 44 -e 's|^# cache_store_log /var/logs|cache_store_log /var/cache/squid|' \
pascal@1253 45 -e 's|^# cache_log /var/logs|cache_log /var/cache/squid|' \
pascal@1253 46 -e 's|^# cache_dir ufs /var/cache|cache_dir ufs /var/cache/squid|' \
pascal@1253 47 -e 's|^# pid_filename /var/logs|pid_filename /var/run|' \
pascal@1253 48 -e 's|^coredump_dir /var/logs|coredump_dir /var/cache/squid|' \
pascal@1253 49 $fs/etc/squid/squid.conf
pascal@1253 50 # Package all squid pkgs
pascal@1253 51 for i in $(cd $WOK; ls -d squid-*)
pascal@1253 52 do
pascal@1253 53 tazwok genpkg $i
pascal@1253 54 done
pascal@1253 55 }
pascal@1253 56
pascal@1253 57 # Pre and post install commands for Tazpkg.
pascal@1253 58 post_install()
pascal@1253 59 {
pascal@1253 60 chown nobody.nogroup /var/cache/squid /var/log/squid
pascal@1253 61 cat <<EOF
pascal@1253 62 ----
pascal@1253 63 To start $PACKAGE server you can run :
pascal@1253 64
pascal@1253 65 /etc/init.d/$PACKAGE start
pascal@1253 66
pascal@1253 67 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
pascal@1253 68 ----
pascal@1253 69 EOF
pascal@1253 70 }