1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
8 version = %{major_ver}.19
11 groups = Networking/Daemons
12 url = http://www.squid-cache.org/
14 summary = The Squid proxy caching server.
17 Squid is a high-performance proxy caching server for Web clients,
18 supporting FTP, gopher, and HTTP data objects. Unlike traditional
19 caching software, Squid handles all requests in a single,
20 non-blocking, I/O-driven process. Squid keeps meta data and especially
21 hot objects cached in RAM, caches DNS lookups, supports non-blocking
22 DNS lookups, and implements negative caching of failed requests.
25 source_dl = http://www.squid-cache.org/Versions/v3/%{major_ver}/
42 configure_options += \
43 --datadir=/usr/lib/squid \
44 --libexecdir=/usr/lib/squid \
45 --localstatedir=/var \
46 --sysconfdir=/etc/squid \
47 --with-logdir=/var/log/squid \
48 --enable-storeio="aufs,diskd,ufs" \
49 --enable-removal-policies="heap,lru" \
51 --enable-delay-pools \
53 --enable-icap-client \
54 --enable-useragent-log \
55 --enable-referrer-log \
58 --enable-kill-parent-hack \
61 --enable-ipf-transparent \
64 --enable-forw-via-db \
65 --disable-cache-digests \
70 --enable-http-violations \
71 --enable-linux-netfilter \
72 --disable-ident-lookups \
73 --enable-internal-dns \
74 --enable-auth=basic,ntlm \
75 --enable-basic-auth-helpers="LDAP,MSNT,multi-domain-NTLM,PAM,NCSA,SMB,squid_radius_auth" \
76 --enable-ntlm-auth-helpers="smb_lm,no_check,fakeauth" \
77 --enable-ntlm-fail-open \
78 --with-filedescriptors=16384 \
90 rm -vf %{BUILDROOT}/etc/squid/errors
92 mkdir -pv %{BUILDROOT}/var/log/cache %{BUILDROOT}/var/log/squid
93 touch %{BUILDROOT}/var/log/squid/access.log
94 touch %{BUILDROOT}/var/log/squid/cache.log
95 mkdir -pv %{BUILDROOT}/var/cache/squid
97 echo "visible_hostname %{DISTRO_NAME}" >> %{BUILDROOT}/etc/squid/squid.conf
98 echo "cache_effective_user squid" >> %{BUILDROOT}/etc/squid/squid.conf
99 echo "cache_effective_group squid" >> %{BUILDROOT}/etc/squid/squid.conf
101 chown -Rv squid:squid %{BUILDROOT}/var/log/squid %{BUILDROOT}/var/log/cache %{BUILDROOT}/var/cache/squid
102 chmod 600 %{BUILDROOT}/var/cache/squid
103 mkdir -pv %{BUILDROOT}/etc/sysconfig
104 cp -vf %{DIR_SOURCE}/squid.sysconfig %{BUILDROOT}/etc/sysconfig/squid
105 cp -vf %{DIR_SOURCE}/cache_swap.sh %{BUILDROOT}/usr/lib/squid/
106 chmod 755 %{BUILDROOT}/usr/lib/squid/cache_swap.sh
107 chown -Rv squid:squid %{BUILDROOT}/usr/lib/squid/cache_swap.sh
112 getent group squid >/dev/null || /usr/sbin/groupadd -r squid
113 getent passwd squid >/dev/null || /usr/sbin/useradd -r -g squid \
114 -d /var/cache/squid -s /sbin/nologin squid
134 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
138 /bin/systemctl --no-reload disable squid.service >/dev/null 2>&1 || :
139 /bin/systemctl stop squid.service >/dev/null 2>&1 || :
143 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
147 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
148 /bin/systemctl try-restart squid.service >/dev/null 2>&1 || :
151 requires = /usr/bin/smbclient
153 filter_requires = perl.Auth.*
156 package %{name}-debuginfo