wok view squid/receipt @ rev 4084

Add: blender (3D creation suite)
author Christophe Lincoln <pankso@slitaz.org>
date Wed Sep 16 00:12:26 2009 +0200 (2009-09-16)
parents 1df2306e1874
children 909b7f4f078b
line source
1 # SliTaz package receipt.
3 PACKAGE="squid"
4 VERSION="3.0.STABLE18"
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 --disable-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 cp -a $_pkg/etc $fs
53 rm -rf $fs/etc/squid/*.default
54 cp -a stuff/etc $fs
55 cp -a $_pkg/var $fs
56 cp -a $_pkg/usr/bin $fs/usr
57 cp -a $_pkg/usr/sbin $fs/usr
58 cp -a $_pkg/usr/libexec $fs/usr
59 cp -a $_pkg/usr/share/squid/mib.txt $fs/usr/share/squid
60 cp -a $_pkg/usr/share/squid/icons $fs/usr/share/squid
61 cp -a $_pkg/usr/share/squid/errors/English $fs/usr/share/squid/errors
62 cp -a $_pkg/usr/share/squid/errors/French $fs/usr/share/squid/errors
63 rm -f $fs/etc/*conf*
64 sed -i -e 's/TAG: visible_hostname/TAG: visible_hostname\nvisible_hostname slitaz/' \
65 -e 's|^access_log /var/logs|access_log /var/log/squid|' \
66 -e 's|^# cache_store_log /var/logs|cache_store_log /var/cache/squid|' \
67 -e 's|^# cache_log /var/logs|cache_log /var/cache/squid|' \
68 -e 's|^# cache_dir ufs /var/cache|cache_dir ufs /var/cache/squid|' \
69 -e 's|^# pid_filename /var/logs|pid_filename /var/run|' \
70 -e 's|^coredump_dir /var/logs|coredump_dir /var/cache/squid|' \
71 -e 's|^# error_directory|error_directory /usr/share/squid/errors/French|' \
72 $fs/etc/squid/squid.conf
73 # Package all squid pkgs
74 for i in $(cd $WOK; ls -d squid-*)
75 do
76 tazwok genpkg $i
77 done
78 }
80 # Pre and post install commands for Tazpkg.
81 post_install()
82 {
83 local root
84 root=$1
85 chown nobody.nogroup $root/var/cache/squid $root/var/log/squid
86 cat <<EOF
87 ----
88 To start $PACKAGE server you can run :
90 /etc/init.d/$PACKAGE start
92 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
93 ----
94 EOF
95 }
97 post_remove()
98 {
99 echo "Removing stalled files..."
100 test -d /var/cache/squid && rm -rf /var/cache/squid
101 test -d /var/log/squid && rm -rf /var/log/squid
102 test -d /usr/share/squid && rm -rf /usr/share/squid
103 }