wok annotate squid/receipt @ rev 2387
squid: Add auth support. Move squid stuff to /usr/share/squid
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Mon Mar 09 23:58:18 2009 +0100 (2009-03-09) |
parents | 0e9145fbcce7 |
children | 8c4a70e18847 |
rev | line source |
---|---|
pascal@1253 | 1 # SliTaz package receipt. |
pascal@1253 | 2 |
pascal@1253 | 3 PACKAGE="squid" |
erjo@2385 | 4 VERSION="3.0.STABLE13" |
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" |
erjo@2387 | 13 BUILD_DEPENDS="perl openssl-dev libldap openldap-dev cyrus-sasl cyrus-sasl-dev" |
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 |
erjo@2387 | 19 ./configure --prefix=/usr \ |
erjo@2387 | 20 --infodir=/usr/share/info \ |
erjo@2387 | 21 --sysconfdir=/etc/squid \ |
erjo@2387 | 22 --datadir=/usr/share/squid \ |
erjo@2387 | 23 --libexecdir=/usr/libexec/squid \ |
erjo@2387 | 24 --localstatedir=/var \ |
erjo@2387 | 25 --disable-poll \ |
erjo@2387 | 26 --disable-snmp \ |
erjo@2387 | 27 --disable-icmp \ |
erjo@2387 | 28 --disable-http-violations \ |
erjo@2387 | 29 --disable-ident-lookups \ |
erjo@2387 | 30 --enable-storeio="aufs,diskd,ufs" \ |
erjo@2387 | 31 --enable-ssl \ |
erjo@2387 | 32 --enable-underscores \ |
erjo@2387 | 33 --enable-ntlm-fail-open \ |
erjo@2387 | 34 --enable-removal-policies="heap,lru" \ |
erjo@2387 | 35 --enable-delay-pools \ |
erjo@2387 | 36 --enable-linux-netfilter \ |
erjo@2387 | 37 --enable-basic-auth-helpers="NCSA,SMB,MSNT LDAP" \ |
erjo@2387 | 38 --enable-ntlm-auth-helpers="SMB" \ |
erjo@2387 | 39 --enable-useragent-log \ |
erjo@2387 | 40 --enable-referer-log \ |
erjo@2387 | 41 --with-pthreads ac_cv_header_linux_netfilter_ipv4_h="yes" \ |
pascal@1511 | 42 --mandir=/usr/share/man $CONFIGURE_ARGS && |
pascal@1511 | 43 make && |
pascal@1253 | 44 make DESTDIR=$PWD/_pkg install |
pascal@1253 | 45 } |
pascal@1253 | 46 |
pascal@1253 | 47 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1253 | 48 genpkg_rules() |
pascal@1253 | 49 { |
erjo@2387 | 50 mkdir -p $fs/usr/share/squid/errors $fs/var/cache/squid $fs/var/log/squid |
pascal@1253 | 51 cp -a $_pkg/etc $fs |
pascal@1253 | 52 rm -rf $fs/etc/squid/*.default |
pascal@1253 | 53 cp -a stuff/etc $fs |
pascal@1253 | 54 cp -a $_pkg/var $fs |
pascal@1253 | 55 cp -a $_pkg/usr/bin $fs/usr |
pascal@1253 | 56 cp -a $_pkg/usr/sbin $fs/usr |
pascal@1253 | 57 cp -a $_pkg/usr/libexec $fs/usr |
erjo@2387 | 58 cp -a $_pkg/usr/share/squid/mib.txt $fs/usr/share/squid |
erjo@2387 | 59 cp -a $_pkg/usr/share/squid/icons $fs/usr/share/squid |
erjo@2387 | 60 cp -a $_pkg/usr/share/squid/errors/English $fs/usr/share/squid/errors |
erjo@2387 | 61 cp -a $_pkg/usr/share/squid/errors/French $fs/usr/share/squid/errors |
pascal@1253 | 62 rm -f $fs/etc/*conf* |
pascal@1253 | 63 sed -i -e 's/TAG: visible_hostname/TAG: visible_hostname\nvisible_hostname slitaz/' \ |
pascal@1253 | 64 -e 's|^access_log /var/logs|access_log /var/log/squid|' \ |
pascal@1253 | 65 -e 's|^# cache_store_log /var/logs|cache_store_log /var/cache/squid|' \ |
pascal@1253 | 66 -e 's|^# cache_log /var/logs|cache_log /var/cache/squid|' \ |
pascal@1253 | 67 -e 's|^# cache_dir ufs /var/cache|cache_dir ufs /var/cache/squid|' \ |
pascal@1253 | 68 -e 's|^# pid_filename /var/logs|pid_filename /var/run|' \ |
pascal@1253 | 69 -e 's|^coredump_dir /var/logs|coredump_dir /var/cache/squid|' \ |
erjo@2387 | 70 -e 's|^# error_directory|error_directory /usr/share/squid/errors/French|' \ |
pascal@1253 | 71 $fs/etc/squid/squid.conf |
pascal@1253 | 72 # Package all squid pkgs |
pascal@1253 | 73 for i in $(cd $WOK; ls -d squid-*) |
pascal@1253 | 74 do |
pascal@1253 | 75 tazwok genpkg $i |
pascal@1253 | 76 done |
pascal@1253 | 77 } |
pascal@1253 | 78 |
pascal@1253 | 79 # Pre and post install commands for Tazpkg. |
pascal@1253 | 80 post_install() |
pascal@1253 | 81 { |
pascal@1253 | 82 chown nobody.nogroup /var/cache/squid /var/log/squid |
pascal@1253 | 83 cat <<EOF |
pascal@1253 | 84 ---- |
pascal@1253 | 85 To start $PACKAGE server you can run : |
pascal@1253 | 86 |
pascal@1253 | 87 /etc/init.d/$PACKAGE start |
pascal@1253 | 88 |
pascal@1253 | 89 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf |
pascal@1253 | 90 ---- |
pascal@1253 | 91 EOF |
pascal@1253 | 92 } |
erjo@2387 | 93 |
erjo@2387 | 94 post_remove() |
erjo@2387 | 95 { |
erjo@2387 | 96 echo "Removing stalled files..." |
erjo@2387 | 97 test -d /var/cache/squid && rm -rf /var/cache/squid |
erjo@2387 | 98 test -d /var/log/squid && rm -rf /var/log/squid |
erjo@2387 | 99 test -d /usr/share/squid && rm -rf /usr/share/squid |
erjo@2387 | 100 } |