wok-6.x view squid/receipt @ rev 9277

Fixed freedom path for wads.
author Christopher Rogers <slaxemulator@gmail.com>
date Tue Mar 15 21:03:13 2011 +0000 (2011-03-15)
parents 8a50526671d5
children a4162d225859
line source
1 # SliTaz package receipt.
3 PACKAGE="squid"
4 VERSION="3.1.9"
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.1/$TARBALL"
11 CONFIG_FILES="/etc/squid"
12 DEPENDS="libsasl libldap libssl"
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_lm,no_check,fakeauth" \
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 -j 4 &&
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/en* $fs/usr/share/squid/errors
65 cp -a $_pkg/usr/share/squid/errors/fr* $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 }
78 # Pre and post install commands for Tazpkg.
79 post_install()
80 {
81 local root
82 root=$1
83 chown nobody.nogroup $root/var/cache/squid $root/var/log/squid
84 cat <<EOF
85 ----
86 To start $PACKAGE server you can run :
88 /etc/init.d/$PACKAGE start
90 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
91 ----
92 EOF
93 }
95 post_remove()
96 {
97 echo "Removing stalled files..."
98 test -d /var/cache/squid && rm -rf /var/cache/squid
99 test -d /var/log/squid && rm -rf /var/log/squid
100 test -d /usr/share/squid && rm -rf /usr/share/squid
101 }