wok 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 | 9e3903881e37 |
children | f71d35f894e0 |
files | squid/receipt |
line diff
1.1 --- a/squid/receipt Mon Mar 09 22:39:44 2009 +0100 1.2 +++ b/squid/receipt Mon Mar 09 23:58:18 2009 +0100 1.3 @@ -10,14 +10,35 @@ 1.4 WGET_URL="${WEB_SITE}Versions/v3/3.0/$TARBALL" 1.5 CONFIG_FILES="/etc/squid" 1.6 #DEPENDS="iptables" 1.7 -BUILD_DEPENDS="perl" 1.8 +BUILD_DEPENDS="perl openssl-dev libldap openldap-dev cyrus-sasl cyrus-sasl-dev" 1.9 1.10 # Rules to configure and make the package. 1.11 compile_rules() 1.12 { 1.13 cd $src 1.14 - ./configure --prefix=/usr --infodir=/usr/share/info \ 1.15 - --sysconfdir=/etc/squid --localstatedir=/var \ 1.16 + ./configure --prefix=/usr \ 1.17 + --infodir=/usr/share/info \ 1.18 + --sysconfdir=/etc/squid \ 1.19 + --datadir=/usr/share/squid \ 1.20 + --libexecdir=/usr/libexec/squid \ 1.21 + --localstatedir=/var \ 1.22 + --disable-poll \ 1.23 + --disable-snmp \ 1.24 + --disable-icmp \ 1.25 + --disable-http-violations \ 1.26 + --disable-ident-lookups \ 1.27 + --enable-storeio="aufs,diskd,ufs" \ 1.28 + --enable-ssl \ 1.29 + --enable-underscores \ 1.30 + --enable-ntlm-fail-open \ 1.31 + --enable-removal-policies="heap,lru" \ 1.32 + --enable-delay-pools \ 1.33 + --enable-linux-netfilter \ 1.34 + --enable-basic-auth-helpers="NCSA,SMB,MSNT LDAP" \ 1.35 + --enable-ntlm-auth-helpers="SMB" \ 1.36 + --enable-useragent-log \ 1.37 + --enable-referer-log \ 1.38 + --with-pthreads ac_cv_header_linux_netfilter_ipv4_h="yes" \ 1.39 --mandir=/usr/share/man $CONFIGURE_ARGS && 1.40 make && 1.41 make DESTDIR=$PWD/_pkg install 1.42 @@ -26,7 +47,7 @@ 1.43 # Rules to gen a SliTaz package suitable for Tazpkg. 1.44 genpkg_rules() 1.45 { 1.46 - mkdir -p $fs/usr/share/errors $fs/var/cache/squid $fs/var/log/squid 1.47 + mkdir -p $fs/usr/share/squid/errors $fs/var/cache/squid $fs/var/log/squid 1.48 cp -a $_pkg/etc $fs 1.49 rm -rf $fs/etc/squid/*.default 1.50 cp -a stuff/etc $fs 1.51 @@ -34,10 +55,10 @@ 1.52 cp -a $_pkg/usr/bin $fs/usr 1.53 cp -a $_pkg/usr/sbin $fs/usr 1.54 cp -a $_pkg/usr/libexec $fs/usr 1.55 - cp -a $_pkg/usr/share/mib.txt $fs/usr/share 1.56 - cp -a $_pkg/usr/share/icons $fs/usr/share 1.57 - cp -a $_pkg/usr/share/errors/English $fs/usr/share/errors 1.58 - cp -a $_pkg/usr/share/errors/French $fs/usr/share/errors 1.59 + cp -a $_pkg/usr/share/squid/mib.txt $fs/usr/share/squid 1.60 + cp -a $_pkg/usr/share/squid/icons $fs/usr/share/squid 1.61 + cp -a $_pkg/usr/share/squid/errors/English $fs/usr/share/squid/errors 1.62 + cp -a $_pkg/usr/share/squid/errors/French $fs/usr/share/squid/errors 1.63 rm -f $fs/etc/*conf* 1.64 sed -i -e 's/TAG: visible_hostname/TAG: visible_hostname\nvisible_hostname slitaz/' \ 1.65 -e 's|^access_log /var/logs|access_log /var/log/squid|' \ 1.66 @@ -46,6 +67,7 @@ 1.67 -e 's|^# cache_dir ufs /var/cache|cache_dir ufs /var/cache/squid|' \ 1.68 -e 's|^# pid_filename /var/logs|pid_filename /var/run|' \ 1.69 -e 's|^coredump_dir /var/logs|coredump_dir /var/cache/squid|' \ 1.70 + -e 's|^# error_directory|error_directory /usr/share/squid/errors/French|' \ 1.71 $fs/etc/squid/squid.conf 1.72 # Package all squid pkgs 1.73 for i in $(cd $WOK; ls -d squid-*) 1.74 @@ -68,3 +90,11 @@ 1.75 ---- 1.76 EOF 1.77 } 1.78 + 1.79 +post_remove() 1.80 +{ 1.81 + echo "Removing stalled files..." 1.82 + test -d /var/cache/squid && rm -rf /var/cache/squid 1.83 + test -d /var/log/squid && rm -rf /var/log/squid 1.84 + test -d /usr/share/squid && rm -rf /usr/share/squid 1.85 +}