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