wok annotate squid/receipt @ rev 9467

Fix receipts that remove lines that removed .pyc and .pyo files. Tazwok does that now.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Apr 03 14:11:25 2011 +0000 (2011-04-03)
parents 8a50526671d5
children a4162d225859
rev   line source
pascal@1253 1 # SliTaz package receipt.
pascal@1253 2
pascal@1253 3 PACKAGE="squid"
slaxemulator@7184 4 VERSION="3.1.9"
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/"
slaxemulator@7184 10 WGET_URL="${WEB_SITE}Versions/v3/3.1/$TARBALL"
pascal@1253 11 CONFIG_FILES="/etc/squid"
erjo@8708 12 DEPENDS="libsasl libldap libssl"
erjo@2387 13 BUILD_DEPENDS="perl openssl-dev libldap openldap-dev cyrus-sasl cyrus-sasl-dev"
pascal@2440 14 SUGGESTED="iptables"
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@2387 20 ./configure --prefix=/usr \
erjo@2387 21 --infodir=/usr/share/info \
erjo@2387 22 --sysconfdir=/etc/squid \
erjo@2387 23 --datadir=/usr/share/squid \
pascal@3989 24 --libexecdir=/usr/lib/squid \
erjo@2387 25 --localstatedir=/var \
erjo@2387 26 --disable-poll \
erjo@2387 27 --disable-snmp \
erjo@2387 28 --disable-icmp \
erjo@5121 29 --enable-http-violations \
erjo@2387 30 --disable-ident-lookups \
erjo@2387 31 --enable-storeio="aufs,diskd,ufs" \
erjo@2387 32 --enable-ssl \
erjo@2387 33 --enable-underscores \
erjo@2387 34 --enable-ntlm-fail-open \
erjo@2387 35 --enable-removal-policies="heap,lru" \
erjo@2387 36 --enable-delay-pools \
erjo@2387 37 --enable-linux-netfilter \
slaxemulator@7184 38 --enable-basic-auth-helpers="NCSA,SMB,MSNT,LDAP" \
slaxemulator@7184 39 --enable-ntlm-auth-helpers="smb_lm,no_check,fakeauth" \
erjo@2387 40 --enable-useragent-log \
erjo@2387 41 --enable-referer-log \
erjo@2387 42 --with-pthreads ac_cv_header_linux_netfilter_ipv4_h="yes" \
pascal@1511 43 --mandir=/usr/share/man $CONFIGURE_ARGS &&
pascal@5777 44 make -j 4 &&
pascal@1253 45 make DESTDIR=$PWD/_pkg install
pascal@1253 46 }
pascal@1253 47
pascal@1253 48 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1253 49 genpkg_rules()
pascal@1253 50 {
erjo@4662 51 mkdir -p $fs/usr/share/squid/errors $fs/var/cache/squid $fs/var/log/squid \
erjo@4662 52 $fs/usr/lib/squid
erjo@4662 53
pascal@1253 54 cp -a $_pkg/etc $fs
pascal@1253 55 rm -rf $fs/etc/squid/*.default
pascal@1253 56 cp -a stuff/etc $fs
pascal@1253 57 cp -a $_pkg/var $fs
pascal@1253 58 cp -a $_pkg/usr/bin $fs/usr
pascal@1253 59 cp -a $_pkg/usr/sbin $fs/usr
erjo@4662 60 cp -a $_pkg/usr/lib/squid/*kd $fs/usr/lib/squid
erjo@4662 61 cp -a $_pkg/usr/lib/squid/*.cgi $fs/usr/lib/squid
erjo@2387 62 cp -a $_pkg/usr/share/squid/mib.txt $fs/usr/share/squid
erjo@2387 63 cp -a $_pkg/usr/share/squid/icons $fs/usr/share/squid
slaxemulator@7184 64 cp -a $_pkg/usr/share/squid/errors/en* $fs/usr/share/squid/errors
slaxemulator@7184 65 cp -a $_pkg/usr/share/squid/errors/fr* $fs/usr/share/squid/errors
pascal@1253 66 rm -f $fs/etc/*conf*
pascal@1253 67 sed -i -e 's/TAG: visible_hostname/TAG: visible_hostname\nvisible_hostname slitaz/' \
pascal@1253 68 -e 's|^access_log /var/logs|access_log /var/log/squid|' \
pascal@1253 69 -e 's|^# cache_store_log /var/logs|cache_store_log /var/cache/squid|' \
pascal@1253 70 -e 's|^# cache_log /var/logs|cache_log /var/cache/squid|' \
pascal@1253 71 -e 's|^# cache_dir ufs /var/cache|cache_dir ufs /var/cache/squid|' \
pascal@1253 72 -e 's|^# pid_filename /var/logs|pid_filename /var/run|' \
pascal@1253 73 -e 's|^coredump_dir /var/logs|coredump_dir /var/cache/squid|' \
erjo@2387 74 -e 's|^# error_directory|error_directory /usr/share/squid/errors/French|' \
pascal@1253 75 $fs/etc/squid/squid.conf
pascal@1253 76 }
pascal@1253 77
pascal@1253 78 # Pre and post install commands for Tazpkg.
pascal@1253 79 post_install()
pascal@1253 80 {
erjo@2530 81 local root
erjo@2530 82 root=$1
erjo@2530 83 chown nobody.nogroup $root/var/cache/squid $root/var/log/squid
pascal@1253 84 cat <<EOF
pascal@1253 85 ----
pascal@1253 86 To start $PACKAGE server you can run :
pascal@1253 87
pascal@1253 88 /etc/init.d/$PACKAGE start
pascal@1253 89
pascal@1253 90 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
pascal@1253 91 ----
pascal@1253 92 EOF
pascal@1253 93 }
erjo@2387 94
erjo@2387 95 post_remove()
erjo@2387 96 {
erjo@2387 97 echo "Removing stalled files..."
erjo@2387 98 test -d /var/cache/squid && rm -rf /var/cache/squid
erjo@2387 99 test -d /var/log/squid && rm -rf /var/log/squid
erjo@2387 100 test -d /usr/share/squid && rm -rf /usr/share/squid
erjo@2387 101 }