wok-4.x view squid/receipt @ rev 11251
libwebkit: fix genpkg_rules
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Nov 07 12:07:17 2011 +0100 (2011-11-07) |
parents | a4162d225859 |
children | 8e4c74abdf74 |
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 libltdl"
13 BUILD_DEPENDS="perl openssl-dev openldap-dev cyrus-sasl-dev"
14 SUGGESTED="iptables"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 ./configure \
21 --prefix=/usr \
22 --sysconfdir=/etc/squid \
23 --datadir=/usr/share/squid \
24 --libexecdir=/usr/lib/squid \
25 --localstatedir=/var \
26 --with-logdir=/var/log/squid \
27 --disable-poll \
28 --disable-snmp \
29 --disable-icmp \
30 --enable-http-violations \
31 --disable-ident-lookups \
32 --enable-storeio="aufs,diskd,ufs" \
33 --enable-ssl \
34 --enable-underscores \
35 --enable-ntlm-fail-open \
36 --enable-removal-policies="heap,lru" \
37 --enable-delay-pools \
38 --enable-linux-netfilter \
39 --enable-basic-auth-helpers="NCSA,SMB,MSNT,LDAP" \
40 --enable-ntlm-auth-helpers="smb_lm,no_check,fakeauth" \
41 --enable-useragent-log \
42 --enable-referer-log \
43 --with-pthreads ac_cv_header_linux_netfilter_ipv4_h="yes" \
44 $CONFIGURE_ARGS &&
45 make -j 4 && make 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 touch $fs/var/log/squid/cache.log
56 cp -a $_pkg/etc $fs
57 rm -rf $fs/etc/squid/*.default
58 cp -a $stuff/etc $fs
60 cp -a $_pkg/var $fs
61 cp -a $_pkg/usr/bin $fs/usr
62 cp -a $_pkg/usr/sbin $fs/usr
63 cp -a $_pkg/usr/lib/squid/*kd $fs/usr/lib/squid
64 cp -a $_pkg/usr/lib/squid/*.cgi $fs/usr/lib/squid
66 cp -a $_pkg/usr/share/squid/mib.txt $fs/usr/share/squid
67 cp -a $_pkg/usr/share/squid/icons $fs/usr/share/squid
68 cp -a $_pkg/usr/share/squid/errors/templates $fs/usr/share/squid/errors
69 cp -a $_pkg/usr/share/squid/errors/en* $fs/usr/share/squid/errors
70 cp -a $_pkg/usr/share/squid/errors/fr* $fs/usr/share/squid/errors
72 sed -i \
73 -e 's/TAG: visible_hostname/TAG: visible_hostname\nvisible_hostname slitaz/' \
74 -e 's|^access_log /var/logs|access_log /var/log/squid|' \
75 -e 's|^# cache_store_log /var/logs|cache_store_log /var/cache/squid|' \
76 -e 's|^# cache_log /var/logs|cache_log /var/cache/squid|' \
77 -e 's|^# cache_dir ufs /var/cache|cache_dir ufs /var/cache/squid|' \
78 -e 's|^# pid_filename /var/logs|pid_filename /var/run|' \
79 -e 's|^coredump_dir /var/logs|coredump_dir /var/cache/squid|' \
80 -e 's|^# error_directory|error_directory /usr/share/squid/errors/French|' \
81 $fs/etc/squid/squid.conf
82 }
84 # Pre and post install commands for Tazpkg.
85 post_install()
86 {
87 local root
88 root=$1
89 chown -R nobody.nogroup $root/var/cache/squid $root/var/log/squid
90 cat <<EOF
91 ----
92 To start $PACKAGE server you can run :
94 /etc/init.d/$PACKAGE start
96 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
97 ----
98 EOF
99 }
101 post_remove()
102 {
103 echo "Removing stalled files..."
104 test -d /var/cache/squid && rm -rf /var/cache/squid
105 test -d /var/log/squid && rm -rf /var/log/squid
106 test -d /usr/share/squid && rm -rf /usr/share/squid
107 }