wok-current view squid/receipt @ rev 24722
updated libcaca and libcaca-dev (0.99.beta19 -> 0.99.beta20)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Mar 15 10:03:33 2022 +0100 (2022-03-15) |
parents | 46dcc80bef41 |
children | 6da7dbdbf74a |
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 current_version()
19 {
20 wget -O - $WEB_SITE/Versions 2>/dev/null | \
21 sed '1,/suitable for production use/d;/href/!d;s|.*[0-9]/">||;s|href.*||;s|.*[0-9]</td><td>||;s|<.*||;q'
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 ./configure \
28 --prefix=/usr \
29 --sysconfdir=/etc/squid \
30 --datadir=/usr/share/squid \
31 --libexecdir=/usr/lib/squid \
32 --localstatedir=/var \
33 --with-logdir=/var/log/squid \
34 --disable-poll \
35 --disable-snmp \
36 --disable-icmp \
37 --enable-http-violations \
38 --disable-ident-lookups \
39 --enable-storeio="aufs,diskd,ufs" \
40 --enable-ssl \
41 --enable-ssl-crtd \
42 --enable-underscores \
43 --enable-ntlm-fail-open \
44 --enable-removal-policies="heap,lru" \
45 --enable-delay-pools \
46 --enable-linux-netfilter \
47 --enable-basic-auth-helpers="NCSA,SMB,MSNT,LDAP" \
48 --enable-ntlm-auth-helpers="smb_lm,no_check,fakeauth" \
49 --enable-useragent-log \
50 --enable-referer-log \
51 --enable-icap-client \
52 --with-pthreads ac_cv_header_linux_netfilter_ipv4_h="yes" \
53 $CONFIGURE_ARGS &&
54 make $MAKEFLAGS && make install
55 }
57 # Rules to gen a SliTaz package suitable for Tazpkg.
58 genpkg_rules()
59 {
60 mkdir -p $fs/usr/share/squid/errors $fs/var/cache/squid $fs/var/log/squid \
61 $fs/usr/lib/squid $fs/etc/squid/conf.d
63 touch $fs/var/log/squid/cache.log
65 cp -a $install/etc $fs
66 rm -rf $fs/etc/squid/*.default
67 cp -a $stuff/etc $fs
69 cp -a $install/var $fs
70 cp -a $install/usr/bin $fs/usr
71 cp -a $install/usr/sbin $fs/usr
72 cp -a $install/usr/lib/squid/* $fs/usr/lib/squid
74 # Remove auth libs
75 rm -f $fs/usr/lib/squid/*_auth*
77 cp -a $install/usr/share/squid/mib.txt $fs/usr/share/squid
78 cp -a $install/usr/share/squid/icons $fs/usr/share/squid
79 cp -a $install/usr/share/squid/errors/templates $fs/usr/share/squid/errors
80 cp -a $install/usr/share/squid/errors/en* $fs/usr/share/squid/errors
81 cp -a $install/usr/share/squid/errors/fr* $fs/usr/share/squid/errors
83 sed -i \
84 -e 's/TAG: visible_hostname/TAG: visible_hostname\nvisible_hostname slitaz/' \
85 -e 's|^#cache_dir ufs /var/cache 100|cache_dir ufs /var/cache/squid 256|' \
86 -e 's|^#pid_filename /var/logs|pid_filename /var/run/squid.pid|' \
87 -e "s|^coredump_dir.*|coredump_dir /var/cache/squid|" \
88 -e 's|^# error_directory|error_directory /usr/share/squid/errors/French|' \
89 -e 's|^# error_directory|error_directory /usr/share/squid/errors/French|' \
90 $fs/etc/squid/squid.conf
92 cat <<EOF>>$fs/etc/squid/squid.conf
94 cache_effective_user squid
95 cache_effective_group squid
97 access_log /var/log/squid/access.log
98 cache_log /var/log/squid/cache.log
99 cache_store_log /var/log/squid/store.log
101 include /etc/squid/conf.d/*.conf
102 EOF
103 }
105 # Pre and post install commands for Tazpkg.
106 post_install()
107 {
108 local user
109 local group
111 user=squid
112 group=squid
114 if ! grep -q $user "$1/etc/passwd"; then
115 echo -n "Adding user/group $user..."
116 chroot "$1/" addgroup -S $group
117 chroot "$1/" adduser -S -D -H -G $group $user
118 status
119 fi
122 # Set perms for files and directories
123 chroot "$1/" chown -R ${user}.${group} /var/log/squid \
124 /var/cache/squid
126 cat <<EOF
127 ----
128 To start $PACKAGE server you can run :
130 /etc/init.d/$PACKAGE start
132 Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
133 ----
134 EOF
135 }
138 post_remove()
139 {
140 echo "Removing stalled files..."
141 test -d /var/cache/squid && rm -rf /var/cache/squid
142 test -d /var/log/squid && rm -rf /var/log/squid
143 test -d /usr/share/squid && rm -rf /usr/share/squid
145 echo "Removing user/group squid"
146 deluser squid
147 }