1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
8 version = %{major_ver}.16
11 maintainer = Christian Schmidt <christian.schmidt@ipfire.org>
12 groups = Networking/Daemons
13 url = http://www.squid-cache.org/
15 summary = The Squid proxy caching server.
18 Squid is a high-performance proxy caching server for Web clients,
19 supporting FTP, gopher, and HTTP data objects. Unlike traditional
20 caching software, Squid handles all requests in a single,
21 non-blocking, I/O-driven process. Squid keeps meta data and especially
22 hot objects cached in RAM, caches DNS lookups, supports non-blocking
23 DNS lookups, and implements negative caching of failed requests.
26 source_dl = http://www.squid-cache.org/Versions/v3/%{major_ver}/
44 configure_options += \
45 --datadir=/usr/lib/squid \
46 --libexecdir=/usr/lib/squid \
47 --localstatedir=/var \
48 --sysconfdir=/etc/squid \
49 --with-logdir=/var/log/squid \
50 --enable-storeio="aufs,diskd,ufs" \
51 --enable-removal-policies="heap,lru" \
53 --enable-delay-pools \
55 --enable-icap-client \
56 --enable-useragent-log \
57 --enable-referrer-log \
60 --enable-kill-parent-hack \
63 --enable-ipf-transparent \
66 --enable-forw-via-db \
67 --disable-cache-digests \
72 --enable-http-violations \
73 --enable-linux-netfilter \
74 --disable-ident-lookups \
75 --enable-internal-dns \
76 --enable-auth=basic,ntlm \
77 --enable-basic-auth-helpers="LDAP,MSNT,multi-domain-NTLM,PAM,NCSA,SMB,squid_radius_auth" \
78 --enable-ntlm-auth-helpers="smb_lm,no_check,fakeauth" \
79 --enable-ntlm-fail-open \
80 --with-filedescriptors=16384 \
92 rm -vf %{BUILDROOT}/etc/squid/errors
94 mkdir -pv %{BUILDROOT}/var/log/cache %{BUILDROOT}/var/log/squid
95 touch %{BUILDROOT}/var/log/squid/access.log
96 touch %{BUILDROOT}/var/log/squid/cache.log
97 mkdir -pv %{BUILDROOT}/var/cache/squid
99 echo "visible_hostname %{DISTRO_NAME}" >> %{BUILDROOT}/etc/squid/squid.conf
100 echo "cache_effective_user squid" >> %{BUILDROOT}/etc/squid/squid.conf
101 echo "cache_effective_group squid" >> %{BUILDROOT}/etc/squid/squid.conf
103 chown -Rv squid:squid %{BUILDROOT}/var/log/squid %{BUILDROOT}/var/log/cache %{BUILDROOT}/var/cache/squid
104 chmod 600 %{BUILDROOT}/var/cache/squid
105 mkdir -pv %{BUILDROOT}/etc/sysconfig
106 cp -vf %{DIR_SOURCE}/squid.sysconfig %{BUILDROOT}/etc/sysconfig/squid
107 cp -vf %{DIR_SOURCE}/cache_swap.sh %{BUILDROOT}/usr/lib/squid/
108 chmod 755 %{BUILDROOT}/usr/lib/squid/cache_swap.sh
109 chown -Rv squid:squid %{BUILDROOT}/usr/lib/squid/cache_swap.sh
114 getent group squid >/dev/null || /usr/sbin/groupadd -r squid
115 getent passwd squid >/dev/null || /usr/sbin/useradd -r -g squid \
116 -d /var/cache/squid -s /sbin/nologin squid
136 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
140 /bin/systemctl --no-reload disable squid.service >/dev/null 2>&1 || :
141 /bin/systemctl stop squid.service >/dev/null 2>&1 || :
145 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
149 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
150 /bin/systemctl try-restart squid.service >/dev/null 2>&1 || :
153 requires = /usr/bin/smbclient
155 filter_requires = perl\(Authen::Smb\)
158 package %{name}-debuginfo