wok-stable annotate squid/receipt @ rev 3395
mitter & python-turbogears: update depends
author | Claudinei Pereira <claudinei@slitaz.org> |
---|---|
date | Fri Jun 12 00:19:56 2009 +0000 (2009-06-12) |
parents | 586332305ffe |
children | 1df2306e1874 |
rev | line source |
---|---|
pascal@1253 | 1 # SliTaz package receipt. |
pascal@1253 | 2 |
pascal@1253 | 3 PACKAGE="squid" |
erjo@2931 | 4 VERSION="3.0.STABLE15" |
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@2440 | 12 DEPENDS="cyrus-sasl libldap openssl" |
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 \ |
erjo@2387 | 24 --libexecdir=/usr/libexec/squid \ |
erjo@2387 | 25 --localstatedir=/var \ |
erjo@2387 | 26 --disable-poll \ |
erjo@2387 | 27 --disable-snmp \ |
erjo@2387 | 28 --disable-icmp \ |
erjo@2387 | 29 --disable-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 \ |
erjo@2387 | 38 --enable-basic-auth-helpers="NCSA,SMB,MSNT LDAP" \ |
erjo@2387 | 39 --enable-ntlm-auth-helpers="SMB" \ |
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@1511 | 44 make && |
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@2387 | 51 mkdir -p $fs/usr/share/squid/errors $fs/var/cache/squid $fs/var/log/squid |
pascal@1253 | 52 cp -a $_pkg/etc $fs |
pascal@1253 | 53 rm -rf $fs/etc/squid/*.default |
pascal@1253 | 54 cp -a stuff/etc $fs |
pascal@1253 | 55 cp -a $_pkg/var $fs |
pascal@1253 | 56 cp -a $_pkg/usr/bin $fs/usr |
pascal@1253 | 57 cp -a $_pkg/usr/sbin $fs/usr |
pascal@1253 | 58 cp -a $_pkg/usr/libexec $fs/usr |
erjo@2387 | 59 cp -a $_pkg/usr/share/squid/mib.txt $fs/usr/share/squid |
erjo@2387 | 60 cp -a $_pkg/usr/share/squid/icons $fs/usr/share/squid |
erjo@2387 | 61 cp -a $_pkg/usr/share/squid/errors/English $fs/usr/share/squid/errors |
erjo@2387 | 62 cp -a $_pkg/usr/share/squid/errors/French $fs/usr/share/squid/errors |
pascal@1253 | 63 rm -f $fs/etc/*conf* |
pascal@1253 | 64 sed -i -e 's/TAG: visible_hostname/TAG: visible_hostname\nvisible_hostname slitaz/' \ |
pascal@1253 | 65 -e 's|^access_log /var/logs|access_log /var/log/squid|' \ |
pascal@1253 | 66 -e 's|^# cache_store_log /var/logs|cache_store_log /var/cache/squid|' \ |
pascal@1253 | 67 -e 's|^# cache_log /var/logs|cache_log /var/cache/squid|' \ |
pascal@1253 | 68 -e 's|^# cache_dir ufs /var/cache|cache_dir ufs /var/cache/squid|' \ |
pascal@1253 | 69 -e 's|^# pid_filename /var/logs|pid_filename /var/run|' \ |
pascal@1253 | 70 -e 's|^coredump_dir /var/logs|coredump_dir /var/cache/squid|' \ |
erjo@2387 | 71 -e 's|^# error_directory|error_directory /usr/share/squid/errors/French|' \ |
pascal@1253 | 72 $fs/etc/squid/squid.conf |
pascal@1253 | 73 # Package all squid pkgs |
pascal@1253 | 74 for i in $(cd $WOK; ls -d squid-*) |
pascal@1253 | 75 do |
pascal@1253 | 76 tazwok genpkg $i |
pascal@1253 | 77 done |
pascal@1253 | 78 } |
pascal@1253 | 79 |
pascal@1253 | 80 # Pre and post install commands for Tazpkg. |
pascal@1253 | 81 post_install() |
pascal@1253 | 82 { |
erjo@2530 | 83 local root |
erjo@2530 | 84 root=$1 |
erjo@2530 | 85 chown nobody.nogroup $root/var/cache/squid $root/var/log/squid |
pascal@1253 | 86 cat <<EOF |
pascal@1253 | 87 ---- |
pascal@1253 | 88 To start $PACKAGE server you can run : |
pascal@1253 | 89 |
pascal@1253 | 90 /etc/init.d/$PACKAGE start |
pascal@1253 | 91 |
pascal@1253 | 92 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf |
pascal@1253 | 93 ---- |
pascal@1253 | 94 EOF |
pascal@1253 | 95 } |
erjo@2387 | 96 |
erjo@2387 | 97 post_remove() |
erjo@2387 | 98 { |
erjo@2387 | 99 echo "Removing stalled files..." |
erjo@2387 | 100 test -d /var/cache/squid && rm -rf /var/cache/squid |
erjo@2387 | 101 test -d /var/log/squid && rm -rf /var/log/squid |
erjo@2387 | 102 test -d /usr/share/squid && rm -rf /usr/share/squid |
erjo@2387 | 103 } |