############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = squid major_ver = 5 minor_ver = 7 version = %{major_ver}.%{minor_ver} release = 2 groups = Networking/Daemons url = https://www.squid-cache.org/ license = GPLv2+ summary = The Squid proxy caching server description Squid is a high-performance proxy caching server for Web clients, supporting FTP, gopher, and HTTP data objects. Unlike traditional caching software, Squid handles all requests in a single, non-blocking, I/O-driven process. Squid keeps meta data and especially hot objects cached in RAM, caches DNS lookups, supports non-blocking DNS lookups, and implements negative caching of failed requests. end source_dl = http://www.squid-cache.org/Versions/v%{major_ver}/ build requires gcc-c++ libxcrypt-devel libxml2-devel openssl-devel openldap-devel samba-devel pam-devel libcap-devel shadow-utils systemd-devel end CFLAGS += -Wno-error configure_options += \ --datadir=/usr/lib/squid \ --libexecdir=/usr/lib/squid \ --localstatedir=/var \ --sysconfdir=/etc/squid \ --with-logdir=/var/log/squid \ --enable-storeio="aufs,diskd,ufs" \ --enable-removal-policies="heap,lru" \ --enable-icmp \ --enable-delay-pools \ --disable-esi \ --enable-icap-client \ --enable-useragent-log \ --enable-referrer-log \ --enable-wccp \ --enable-wccpv2 \ --enable-kill-parent-hack \ --enable-snmp \ --enable-arp-acl \ --enable-htcp \ --disable-ssl \ --enable-forw-via-db \ --disable-cache-digests \ --enable-poll \ --enable-select \ --disable-kqueue \ --enable-epoll \ --enable-http-violations \ --enable-linux-netfilter \ --disable-ident-lookups \ --enable-internal-dns \ --enable-auth \ --enable-basic-auth-helpers="LDAP,MSNT,multi-domain-NTLM,PAM,NCSA,SMB,squid_radius_auth" \ --enable-ntlm-auth-helpers="smb_lm,no_check,fakeauth" \ --enable-ntlm-fail-open \ --with-filedescriptors=16384 \ --enable-unlinkd \ --with-pthreads \ --with-aio \ --with-dl \ --with-large-files prepare_cmds %{create_user} end install_cmds rm -vf %{BUILDROOT}/etc/squid/errors mkdir -pv %{BUILDROOT}/var/log/cache %{BUILDROOT}/var/log/squid touch %{BUILDROOT}/var/log/squid/access.log touch %{BUILDROOT}/var/log/squid/cache.log mkdir -pv %{BUILDROOT}/var/cache/squid echo "visible_hostname %{DISTRO_NAME}" >> %{BUILDROOT}/etc/squid/squid.conf echo "cache_effective_user squid" >> %{BUILDROOT}/etc/squid/squid.conf echo "cache_effective_group squid" >> %{BUILDROOT}/etc/squid/squid.conf chown -Rv squid:squid %{BUILDROOT}/var/log/squid %{BUILDROOT}/var/log/cache %{BUILDROOT}/var/cache/squid chmod 600 %{BUILDROOT}/var/cache/squid mkdir -pv %{BUILDROOT}/etc/sysconfig cp -vf %{DIR_SOURCE}/squid.sysconfig %{BUILDROOT}/etc/sysconfig/squid cp -vf %{DIR_SOURCE}/cache_swap.sh %{BUILDROOT}/usr/lib/squid/ chmod 755 %{BUILDROOT}/usr/lib/squid/cache_swap.sh chown -Rv squid:squid %{BUILDROOT}/usr/lib/squid/cache_swap.sh # Drop /var/run rm -rvf %{BUILDROOT}%{localstatedir}/run end end create_user getent group squid >/dev/null || /usr/sbin/groupadd -r squid getent passwd squid >/dev/null || /usr/sbin/useradd -r -g squid \ -d /var/cache/squid -s /sbin/nologin squid end packages package %{name} prerequires shadow-utils systemd-units end configfiles /etc/squid.conf /etc/sysconfig/squid end script prein %{create_user} end script postin /bin/systemctl daemon-reload >/dev/null 2>&1 || : end script preun /bin/systemctl --no-reload disable squid.service >/dev/null 2>&1 || : /bin/systemctl stop squid.service >/dev/null 2>&1 || : end script postun /bin/systemctl daemon-reload >/dev/null 2>&1 || : end script postup /bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl try-restart squid.service >/dev/null 2>&1 || : end filter_requires = perl.Auth.* end package %{name}-debuginfo template DEBUGINFO end end