wok-current view squid/receipt @ rev 5693
Up: xfce4-taskmanager (1.0.0)
author | Alexander Medvedev <devl547@gmail.com> |
---|---|
date | Wed Jun 16 19:47:46 2010 +0000 (2010-06-16) |
parents | 909b7f4f078b |
children | 666fd56c3a0e |
line source
1 # SliTaz package receipt.
3 PACKAGE="squid"
4 VERSION="3.0.STABLE25"
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="cyrus-sasl libldap openssl"
13 BUILD_DEPENDS="perl openssl-dev libldap openldap-dev cyrus-sasl cyrus-sasl-dev"
14 SUGGESTED="iptables"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 ./configure --prefix=/usr \
21 --infodir=/usr/share/info \
22 --sysconfdir=/etc/squid \
23 --datadir=/usr/share/squid \
24 --libexecdir=/usr/lib/squid \
25 --localstatedir=/var \
26 --disable-poll \
27 --disable-snmp \
28 --disable-icmp \
29 --enable-http-violations \
30 --disable-ident-lookups \
31 --enable-storeio="aufs,diskd,ufs" \
32 --enable-ssl \
33 --enable-underscores \
34 --enable-ntlm-fail-open \
35 --enable-removal-policies="heap,lru" \
36 --enable-delay-pools \
37 --enable-linux-netfilter \
38 --enable-basic-auth-helpers="NCSA,SMB,MSNT LDAP" \
39 --enable-ntlm-auth-helpers="SMB" \
40 --enable-useragent-log \
41 --enable-referer-log \
42 --with-pthreads ac_cv_header_linux_netfilter_ipv4_h="yes" \
43 --mandir=/usr/share/man $CONFIGURE_ARGS &&
44 make &&
45 make DESTDIR=$PWD/_pkg install
46 }
48 # Rules to gen a SliTaz package suitable for Tazpkg.
49 genpkg_rules()
50 {
51 mkdir -p $fs/usr/share/squid/errors $fs/var/cache/squid $fs/var/log/squid \
52 $fs/usr/lib/squid
54 cp -a $_pkg/etc $fs
55 rm -rf $fs/etc/squid/*.default
56 cp -a stuff/etc $fs
57 cp -a $_pkg/var $fs
58 cp -a $_pkg/usr/bin $fs/usr
59 cp -a $_pkg/usr/sbin $fs/usr
60 cp -a $_pkg/usr/lib/squid/*kd $fs/usr/lib/squid
61 cp -a $_pkg/usr/lib/squid/*.cgi $fs/usr/lib/squid
62 cp -a $_pkg/usr/share/squid/mib.txt $fs/usr/share/squid
63 cp -a $_pkg/usr/share/squid/icons $fs/usr/share/squid
64 cp -a $_pkg/usr/share/squid/errors/English $fs/usr/share/squid/errors
65 cp -a $_pkg/usr/share/squid/errors/French $fs/usr/share/squid/errors
66 rm -f $fs/etc/*conf*
67 sed -i -e 's/TAG: visible_hostname/TAG: visible_hostname\nvisible_hostname slitaz/' \
68 -e 's|^access_log /var/logs|access_log /var/log/squid|' \
69 -e 's|^# cache_store_log /var/logs|cache_store_log /var/cache/squid|' \
70 -e 's|^# cache_log /var/logs|cache_log /var/cache/squid|' \
71 -e 's|^# cache_dir ufs /var/cache|cache_dir ufs /var/cache/squid|' \
72 -e 's|^# pid_filename /var/logs|pid_filename /var/run|' \
73 -e 's|^coredump_dir /var/logs|coredump_dir /var/cache/squid|' \
74 -e 's|^# error_directory|error_directory /usr/share/squid/errors/French|' \
75 $fs/etc/squid/squid.conf
76 # Package all squid pkgs
77 for i in $(cd $WOK; ls -d squid-*)
78 do
79 tazwok genpkg $i
80 done
81 }
83 # Pre and post install commands for Tazpkg.
84 post_install()
85 {
86 local root
87 root=$1
88 chown nobody.nogroup $root/var/cache/squid $root/var/log/squid
89 cat <<EOF
90 ----
91 To start $PACKAGE server you can run :
93 /etc/init.d/$PACKAGE start
95 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
96 ----
97 EOF
98 }
100 post_remove()
101 {
102 echo "Removing stalled files..."
103 test -d /var/cache/squid && rm -rf /var/cache/squid
104 test -d /var/log/squid && rm -rf /var/log/squid
105 test -d /usr/share/squid && rm -rf /usr/share/squid
106 }