115 lines
3.5 KiB
RPMSpec
115 lines
3.5 KiB
RPMSpec
|
Name: squidclamav
|
||
|
Version: 6.11
|
||
|
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: http://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}-6.10-config.patch
|
||
|
License: GPL
|
||
|
## AUTOBUILDREQ-BEGIN
|
||
|
BuildRequires: c-icap-devel
|
||
|
BuildRequires: glibc-devel
|
||
|
BuildRequires: perl-devel
|
||
|
## AUTOBUILDREQ-END
|
||
|
Requires(pre): squid
|
||
|
Requires: clamd
|
||
|
Requires: clamav
|
||
|
Requires(pre): c-icap
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||
|
|
||
|
%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
|
||
|
%patch0 -p1
|
||
|
%patch1 -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)
|
||
|
%config(noreplace) %{_sysconfdir}/squidclamav.conf
|
||
|
%{_sysconfdir}/squidclamav.conf.default
|
||
|
%{_libdir}/c_icap/squidclamav.la
|
||
|
%{_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
|
||
|
* 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
|