119 lines
3.6 KiB
RPMSpec
119 lines
3.6 KiB
RPMSpec
Name: squidclamav
|
|
Version: 7.2
|
|
Release: 1mamba
|
|
Summary: A dedicated ClamAV antivirus redirector for Squid
|
|
Group: Network/Security
|
|
Vendor: openmamba
|
|
Distribution: openmamba
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
URL: https://sourceforge.net/projects/squidclamav/
|
|
Source: http://downloads.sourceforge.net/project/squidclamav/squidclamav/%{version}/squidclamav-%{version}.tar.gz
|
|
Patch0: %{name}-6.2-cgi-it_IT.patch
|
|
Patch1: %{name}-7.2-config.patch
|
|
License: GPL
|
|
## AUTOBUILDREQ-BEGIN
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: libarchive-devel
|
|
BuildRequires: libbzip2-devel
|
|
BuildRequires: libz-devel
|
|
BuildRequires: perl-CGI
|
|
BuildRequires: perl-devel
|
|
## AUTOBUILDREQ-END
|
|
Requires(pre): squid
|
|
Requires: clamd
|
|
Requires: clamav
|
|
Requires(pre): c-icap
|
|
|
|
%description
|
|
SquidClamAv is a dedicated ClamAV antivirus redirector for Squid. It can run antivirus checks based on filename regex, content-type regex, and more. It is easy to install and works even with heavy Squid access.
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch 0 -p1
|
|
%patch 1 -p1
|
|
|
|
%build
|
|
%configure \
|
|
--libexecdir=/var/www/cgi-bin/
|
|
# --sysconfdir=%{_sysconfdir}/squid
|
|
|
|
%make
|
|
|
|
%install
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
%makeinstall
|
|
|
|
rm -f %{buildroot}%{_datadir}/squidclamav/README
|
|
|
|
%post
|
|
if [ $1 -ge 1 ]; then
|
|
# new install or upgrade
|
|
[ "`grep 1344/squidclamav %{_sysconfdir}/squid/squid.conf`" ] || {
|
|
cat >> %{_sysconfdir}/squid/squid.conf << _EOF
|
|
icap_enable on
|
|
icap_send_client_ip on
|
|
icap_send_client_username on
|
|
icap_client_username_encode off
|
|
icap_client_username_header X-Authenticated-User
|
|
icap_preview_enable on
|
|
icap_preview_size 1024
|
|
icap_service service_req reqmod_precache bypass=1 icap://127.0.0.1:1344/squidclamav
|
|
adaptation_access service_req allow all
|
|
icap_service service_resp respmod_precache bypass=1 icap://127.0.0.1:1344/squidclamav
|
|
adaptation_access service_resp allow all
|
|
_EOF
|
|
service squid reload
|
|
}
|
|
|
|
[ "`grep squidclamav.so %{_sysconfdir}/c-icap.conf`" ] || {
|
|
cat >> %{_sysconfdir}/c-icap.conf << _EOF
|
|
Service squidclamav squidclamav.so
|
|
_EOF
|
|
service c-icap reload
|
|
}
|
|
fi
|
|
:
|
|
|
|
%clean
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%{_sysconfdir}/c-icap/squidclamav.conf
|
|
%{_sysconfdir}/c-icap/squidclamav.conf.default
|
|
%{_libdir}/c_icap/squidclamav.so
|
|
%{_datadir}/c_icap/templates/squidclamav/en/MALWARE_FOUND
|
|
%attr(0755,root,root) /var/www/cgi-bin/squidclamav/clwarn.cgi*
|
|
%{_mandir}/man1/squidclamav.1*
|
|
%doc AUTHORS COPYING ChangeLog README
|
|
|
|
%changelog
|
|
* Tue Aug 08 2023 Automatic Build System <autodist@mambasoft.it> 7.2-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Sun Mar 23 2014 Automatic Build System <autodist@mambasoft.it> 6.11-1mamba
|
|
- automatic update by autodist
|
|
|
|
* Thu Mar 28 2013 Automatic Build System <autodist@mambasoft.it> 6.10-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Mon Jul 25 2011 Automatic Build System <autodist@mambasoft.it> 6.3-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Thu Apr 28 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 6.2-5mamba
|
|
- fixed user of cgi files
|
|
|
|
* Thu Apr 28 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 6.2-4mamba
|
|
- fixed italian cgi typo and permissions
|
|
|
|
* Wed Apr 27 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 6.2-3mamba
|
|
- added italian language cgi
|
|
- install cgi in default server directory
|
|
- fix default configuration for cgi and squidGuard paths
|
|
|
|
* Wed Apr 27 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 6.2-2mamba
|
|
- added post script configuration for squid and c-icap
|
|
|
|
* Wed Apr 13 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 6.2-1mamba
|
|
- package created by autospec
|