wok-next view squid/receipt @ rev 21469

updated tinc (1.0.25 -> 1.0.36)
author Hans-G?nter Theisgen
date Wed May 13 07:41:00 2020 +0100 (2020-05-13)
parents d5aab818505e
children
line source
1 # SliTaz package receipt v2.
3 PACKAGE="squid"
4 VERSION="4.11"
5 CATEGORY="network"
6 SHORT_DESC="Web/FTP proxy"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://www.squid-cache.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.bz2"
12 WGET_URL="${WEB_SITE}Versions/v${VERSION%.*}/$TARBALL"
14 BUILD_DEPENDS="cyrus-sasl-dev libcap-dev openldap-dev openssl-dev perl"
15 SPLIT="$PACKAGE-auth-helpers $PACKAGE-langpack"
17 compile_rules()
18 {
19 touch scripts/boilerplate.h
21 ./configure \
22 --sysconfdir=/etc/squid \
23 --datadir=/usr/share/squid \
24 --libexecdir=/usr/lib/squid \
25 --enable-basic-auth-helpers="NCSA,SMB,MSNT,LDAP" \
26 --enable-delay-pools \
27 --enable-http-violations \
28 --enable-icap-client \
29 --disable-icmp \
30 --disable-ident-lookups \
31 --enable-linux-netfilter \
32 --enable-ntlm-auth-helpers="smb_lm,no_check,fakeauth" \
33 --enable-ntlm-fail-open \
34 --disable-poll \
35 --enable-referer-log \
36 --enable-removal-policies="heap,lru" \
37 --disable-snmp \
38 --enable-ssl \
39 --enable-ssl-crtd \
40 --enable-storeio="aufs,diskd,ufs" \
41 --enable-underscores \
42 --enable-useragent-log \
43 --with-logdir=/var/log/squid \
44 --with-openssl \
45 --with-pthreads ac_cv_header_linux_netfilter_ipv4_h="yes" \
46 $CONFIGURE_ARGS &&
47 fix libtool &&
48 make $MAKEFLAGS &&
49 make install
50 }
52 genpkg_rules()
53 {
54 case $PACKAGE in
55 squid)
56 CONFIG_FILES="/etc/squid"
57 DEPENDS="libldap libltdl libsasl openssl"
58 SUGGESTED="iptables"
59 mkdir -p $fs/usr/share/squid/errors
60 mkdir -p $fs/var/cache/squid
61 mkdir -p $fs/var/log/squid
62 mkdir -p $fs/usr/lib/squid
63 mkdir -p $fs/etc/squid/conf.d
65 touch $fs/var/log/squid/cache.log
67 cp -a $install/etc $fs
68 rm -rf $fs/etc/squid/*.default
69 cp -a $stuff/etc $fs
71 cp -a $install/var $fs
72 cp -a $install/usr/bin $fs/usr
73 cp -a $install/usr/sbin $fs/usr
74 cp -a $install/usr/lib/squid/* $fs/usr/lib/squid
76 # Remove auth libs
77 rm -f $fs/usr/lib/squid/*_auth*
79 cp -a $install/usr/share/squid/mib.txt $fs/usr/share/squid
80 cp -a $install/usr/share/squid/icons $fs/usr/share/squid
81 cp -a $install/usr/share/squid/errors/templates $fs/usr/share/squid/errors
82 cp -a $install/usr/share/squid/errors/en* $fs/usr/share/squid/errors
83 cp -a $install/usr/share/squid/errors/fr* $fs/usr/share/squid/errors
85 sed \
86 -e 's/TAG: visible_hostname/TAG: visible_hostname\nvisible_hostname slitaz/' \
87 -e 's|^#cache_dir ufs /var/cache 100|cache_dir ufs /var/cache/squid 256|' \
88 -e 's|^#pid_filename /var/logs|pid_filename /var/run/squid.pid|' \
89 -e "s|^coredump_dir.*|coredump_dir /var/cache/squid|" \
90 -e 's|^# error_directory|error_directory /usr/share/squid/errors/French|' \
91 -e 's|^# error_directory|error_directory /usr/share/squid/errors/French|' \
92 -i $fs/etc/squid/squid.conf
94 cat >>$fs/etc/squid/squid.conf <<EOF
96 cache_effective_user squid
97 cache_effective_group squid
99 access_log /var/log/squid/access.log
100 cache_log /var/log/squid/cache.log
101 cache_store_log /var/log/squid/store.log
103 include /etc/squid/conf.d/*.conf
104 EOF
105 ;;
106 squid-auth-helpers)
107 CAT="network|auth helpers"
108 DEPENDS="libcomerr3 libldap libsasl libkrb5 openssl squid"
109 mkdir -p $fs/usr/lib/squid
110 cp -a $install/usr/lib/squid/*_auth* $fs/usr/lib/squid
111 ;;
112 squid-langpack)
113 CAT="network|language pack"
114 DEPENDS="squid"
115 mkdir -p $fs/usr/share
116 cp -a $install/usr/share/squid/errors $fs/usr/share
117 rm -rf $fs/usr/share/squid/errors/en*
118 rm -rf $fs/usr/share/squid/errors/fr*
119 ;;
120 esac
121 }
123 post_install_squid()
124 {
125 local user=squid group=squid
127 if ! grep -q $user "$1/etc/passwd"
128 then
129 chroot "$1/" addgroup -S $group
130 chroot "$1/" adduser -S -D -H -G $group $user
131 fi
133 # Set permissions for files and directories
134 chroot "$1/" chown -R $user:$group /var/log/squid /var/cache/squid
136 [ -n "$quiet" ] || cat <<EOF
138 .----------------------------------------------.
139 | To start squid server you can run: |
140 | /etc/init.d/squid start |
141 | |
142 | Or add squid to RUN_DAEMONS in /etc/rcS.conf |
143 '----------------------------------------------'
144 EOF
145 }
147 post_remove_squid()
148 {
149 # Removing stalled files...
150 test -d /var/cache/squid && rm -rf /var/cache/squid
151 test -d /var/log/squid && rm -rf /var/log/squid
152 test -d /usr/share/squid && rm -rf /usr/share/squid
154 # Removing user/group squid
155 deluser squid
156 }