wok annotate squid/receipt @ rev 5777
Speedup some builds
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jul 09 17:03:10 2010 +0200 (2010-07-09) |
parents | be08eefa15da |
children | 8a50526671d5 |
rev | line source |
---|---|
pascal@1253 | 1 # SliTaz package receipt. |
pascal@1253 | 2 |
pascal@1253 | 3 PACKAGE="squid" |
erjo@5121 | 4 VERSION="3.0.STABLE25" |
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 \ |
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 \ |
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@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 |
erjo@2387 | 64 cp -a $_pkg/usr/share/squid/errors/English $fs/usr/share/squid/errors |
erjo@2387 | 65 cp -a $_pkg/usr/share/squid/errors/French $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 # Package all squid pkgs |
pascal@1253 | 77 for i in $(cd $WOK; ls -d squid-*) |
pascal@1253 | 78 do |
pascal@1253 | 79 tazwok genpkg $i |
pascal@1253 | 80 done |
pascal@1253 | 81 } |
pascal@1253 | 82 |
pascal@1253 | 83 # Pre and post install commands for Tazpkg. |
pascal@1253 | 84 post_install() |
pascal@1253 | 85 { |
erjo@2530 | 86 local root |
erjo@2530 | 87 root=$1 |
erjo@2530 | 88 chown nobody.nogroup $root/var/cache/squid $root/var/log/squid |
pascal@1253 | 89 cat <<EOF |
pascal@1253 | 90 ---- |
pascal@1253 | 91 To start $PACKAGE server you can run : |
pascal@1253 | 92 |
pascal@1253 | 93 /etc/init.d/$PACKAGE start |
pascal@1253 | 94 |
pascal@1253 | 95 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf |
pascal@1253 | 96 ---- |
pascal@1253 | 97 EOF |
pascal@1253 | 98 } |
erjo@2387 | 99 |
erjo@2387 | 100 post_remove() |
erjo@2387 | 101 { |
erjo@2387 | 102 echo "Removing stalled files..." |
erjo@2387 | 103 test -d /var/cache/squid && rm -rf /var/cache/squid |
erjo@2387 | 104 test -d /var/log/squid && rm -rf /var/log/squid |
erjo@2387 | 105 test -d /usr/share/squid && rm -rf /usr/share/squid |
erjo@2387 | 106 } |