wok view squid/receipt @ rev 22651
updated docbook-xsl (1.79.1 -> 1.79.2)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Jan 14 14:40:03 2020 +0100 (2020-01-14) |
parents | 9e01bc6321ea |
children | 46dcc80bef41 |
line source
1 # SliTaz package receipt.
3 PACKAGE="squid"
4 VERSION="3.4.2"
5 CATEGORY="network"
6 SHORT_DESC="Web/ftp proxy."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://www.squid-cache.org/"
11 WGET_URL="${WEB_SITE}Versions/v3/${VERSION%.*}/$TARBALL"
12 CONFIG_FILES="/etc/squid"
14 DEPENDS="libsasl libldap libssl libltdl"
15 BUILD_DEPENDS="perl openssl-dev openldap-dev cyrus-sasl-dev libcap-dev libdb"
16 SUGGESTED="iptables"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 ./configure \
22 --prefix=/usr \
23 --sysconfdir=/etc/squid \
24 --datadir=/usr/share/squid \
25 --libexecdir=/usr/lib/squid \
26 --localstatedir=/var \
27 --with-logdir=/var/log/squid \
28 --disable-poll \
29 --disable-snmp \
30 --disable-icmp \
31 --enable-http-violations \
32 --disable-ident-lookups \
33 --enable-storeio="aufs,diskd,ufs" \
34 --enable-ssl \
35 --enable-ssl-crtd \
36 --enable-underscores \
37 --enable-ntlm-fail-open \
38 --enable-removal-policies="heap,lru" \
39 --enable-delay-pools \
40 --enable-linux-netfilter \
41 --enable-basic-auth-helpers="NCSA,SMB,MSNT,LDAP" \
42 --enable-ntlm-auth-helpers="smb_lm,no_check,fakeauth" \
43 --enable-useragent-log \
44 --enable-referer-log \
45 --enable-icap-client \
46 --with-pthreads ac_cv_header_linux_netfilter_ipv4_h="yes" \
47 $CONFIGURE_ARGS &&
48 make $MAKEFLAGS && make install
49 }
51 # Rules to gen a SliTaz package suitable for Tazpkg.
52 genpkg_rules()
53 {
54 mkdir -p $fs/usr/share/squid/errors $fs/var/cache/squid $fs/var/log/squid \
55 $fs/usr/lib/squid $fs/etc/squid/conf.d
57 touch $fs/var/log/squid/cache.log
59 cp -a $install/etc $fs
60 rm -rf $fs/etc/squid/*.default
61 cp -a $stuff/etc $fs
63 cp -a $install/var $fs
64 cp -a $install/usr/bin $fs/usr
65 cp -a $install/usr/sbin $fs/usr
66 cp -a $install/usr/lib/squid/* $fs/usr/lib/squid
68 # Remove auth libs
69 rm -f $fs/usr/lib/squid/*_auth*
71 cp -a $install/usr/share/squid/mib.txt $fs/usr/share/squid
72 cp -a $install/usr/share/squid/icons $fs/usr/share/squid
73 cp -a $install/usr/share/squid/errors/templates $fs/usr/share/squid/errors
74 cp -a $install/usr/share/squid/errors/en* $fs/usr/share/squid/errors
75 cp -a $install/usr/share/squid/errors/fr* $fs/usr/share/squid/errors
77 sed -i \
78 -e 's/TAG: visible_hostname/TAG: visible_hostname\nvisible_hostname slitaz/' \
79 -e 's|^#cache_dir ufs /var/cache 100|cache_dir ufs /var/cache/squid 256|' \
80 -e 's|^#pid_filename /var/logs|pid_filename /var/run/squid.pid|' \
81 -e "s|^coredump_dir.*|coredump_dir /var/cache/squid|" \
82 -e 's|^# error_directory|error_directory /usr/share/squid/errors/French|' \
83 -e 's|^# error_directory|error_directory /usr/share/squid/errors/French|' \
84 $fs/etc/squid/squid.conf
86 cat <<EOF>>$fs/etc/squid/squid.conf
88 cache_effective_user squid
89 cache_effective_group squid
91 access_log /var/log/squid/access.log
92 cache_log /var/log/squid/cache.log
93 cache_store_log /var/log/squid/store.log
95 include /etc/squid/conf.d/*.conf
96 EOF
97 }
99 # Pre and post install commands for Tazpkg.
100 post_install()
101 {
102 local user
103 local group
105 user=squid
106 group=squid
108 if ! grep -q $user "$1/etc/passwd"; then
109 echo -n "Adding user/group $user..."
110 chroot "$1/" addgroup -S $group
111 chroot "$1/" adduser -S -D -H -G $group $user
112 status
113 fi
116 # Set perms for files and directories
117 chroot "$1/" chown -R ${user}.${group} /var/log/squid \
118 /var/cache/squid
120 cat <<EOF
121 ----
122 To start $PACKAGE server you can run :
124 /etc/init.d/$PACKAGE start
126 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
127 ----
128 EOF
129 }
132 post_remove()
133 {
134 echo "Removing stalled files..."
135 test -d /var/cache/squid && rm -rf /var/cache/squid
136 test -d /var/log/squid && rm -rf /var/log/squid
137 test -d /usr/share/squid && rm -rf /usr/share/squid
139 echo "Removing user/group squid"
140 deluser squid
141 }