78df14
Name:           clamav-unofficial-sigs
78df14
Version:        3.7.1
0e7e66
Release:        4%{?dist}
78df14
Summary:        Scripts to download unoffical clamav signatures 
78df14
Group:          Applications/System
78df14
License:        BSD
78df14
URL:            http://www.inetmsg.com/pub/
78df14
Source0:        http://www.inetmsg.com/pub/clamav-unofficial-sigs-%{version}.tar.gz
78df14
BuildArch:      noarch
78df14
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
78df14
Requires:       clamav clamav-update rsync gnupg diffutils curl bind-utils
78df14
78df14
%description
78df14
This package contains scripts and configuration files
78df14
that provide the capability to download, test, and 
78df14
update the 3rd-party signature databases provide by 
78df14
Sanesecurity, SecuriteInfo, MalwarePatrol, OITC, 
78df14
INetMsg and ScamNailer.
78df14
78df14
%prep
78df14
%setup -q
78df14
iconv -f iso8859-1 -t utf-8 CHANGELOG > CHANGELOG.conv && mv -f CHANGELOG.conv CHANGELOG
78df14
sed -i 's:/usr/local/bin/:/usr/bin/:' clamav-unofficial-sigs-cron
78df14
sed -i 's:root:clamupdate:' clamav-unofficial-sigs-cron
78df14
sed -i 's:/usr/local/etc/clamav-unofficial-sigs.conf:/etc/clamav-unofficial-sigs/clamav-unofficial-sigs.conf \&>/dev/null:' clamav-unofficial-sigs-cron
78df14
sed -i 's:/var/log/clamav-unofficial-sigs.log:/var/log/clamav-unofficial-sigs/clamav-unofficial-sigs.log:' clamav-unofficial-sigs-logrotate
78df14
sed -i 's:/usr/unofficial-dbs:%{_localstatedir}/lib/%{name}:' clamav-unofficial-sigs.conf
78df14
sed -i 's:/var/log:%{_localstatedir}/log/%{name}:' clamav-unofficial-sigs.conf
78df14
sed -i 's:/path/to/ham-test/directory:%{_localstatedir}/lib/%{name}/ham-test:' clamav-unofficial-sigs.conf
78df14
sed -i 's:"clamav":"clamupdate":' clamav-unofficial-sigs.conf
78df14
sed -i 's:/var/run/clamd.pid:/var/run/clamd.scan/clamd.pid:' clamav-unofficial-sigs.conf
78df14
sed -i 's:user_configuration_complete="no":user_configuration_complete="yes":' clamav-unofficial-sigs.conf
78df14
sed -i 's:enable_logging="no":enable_logging="yes":' clamav-unofficial-sigs.conf
78df14
78df14
%build
78df14
#nothing to do here
78df14
78df14
%install
78df14
rm -rf $RPM_BUILD_ROOT
78df14
install -d -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
78df14
install -d -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
78df14
install -d -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
78df14
install -d -p $RPM_BUILD_ROOT%{_bindir}
78df14
install -d -p $RPM_BUILD_ROOT%{_mandir}/man8
78df14
install -d -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
78df14
install -d -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
78df14
install -d -p $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/ham-test
78df14
install -p -m0755 clamav-unofficial-sigs.sh $RPM_BUILD_ROOT%{_bindir}/clamav-unofficial-sigs.sh
78df14
install -p -m0755 clamd-status.sh $RPM_BUILD_ROOT%{_bindir}/clamd-status.sh
78df14
install -p -m0644 clamav-unofficial-sigs-cron $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/clamav-unofficial-sigs
78df14
install -p -m0644 clamav-unofficial-sigs-logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/clamav-unofficial-sigs
78df14
install -p -m0644 clamav-unofficial-sigs.8 $RPM_BUILD_ROOT%{_mandir}/man8/clamav-unofficial-sigs.8
78df14
pushd $RPM_BUILD_ROOT%{_mandir}/man8/
78df14
ln -s clamav-unofficial-sigs.8 clamav-unofficial-sigs.sh.8
78df14
popd
78df14
install -p -m0644 clamav-unofficial-sigs.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/clamav-unofficial-sigs.conf
78df14
78df14
%clean
78df14
rm -rf $RPM_BUILD_ROOT
78df14
78df14
%files
78df14
%defattr(-,root,root,-)
78df14
%doc README CHANGELOG LICENSE
78df14
%dir %{_sysconfdir}/%{name}
78df14
%config(noreplace) %{_sysconfdir}/%{name}/clamav-unofficial-sigs.conf
78df14
%config(noreplace) %{_sysconfdir}/cron.d/*
78df14
%config(noreplace) %{_sysconfdir}/logrotate.d/*
78df14
%{_bindir}/*
78df14
%{_mandir}/man8/*
78df14
%attr(0755,clamupdate,clamupdate) %dir %{_localstatedir}/log/%{name}
78df14
%attr(0755,clamupdate,clamupdate) %dir %{_localstatedir}/lib/%{name}
78df14
%attr(0755,clamupdate,clamupdate) %dir %{_localstatedir}/lib/%{name}/ham-test
78df14
78df14
%changelog
0e7e66
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.1-4
0e7e66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
0e7e66
78df14
* Sun Jan 02 2011 Andrew Colin Kissa <andrew@topdog.za.net> - 3.7.1-3
78df14
- Fixes requested by reviewer
78df14
78df14
* Thu Dec 23 2010 Andrew Colin Kissa <andrew@topdog.za.net> - 3.7.1-2
78df14
- Fixes requested by reviewer
78df14
78df14
* Tue Jul 20 2010 Andrew Colin Kissa <andrew@topdog.za.net> - 3.7.1-1
78df14
- upgraded to latest upstream
78df14
78df14
* Fri Apr 22 2010 Andrew Colin Kissa <andrew@topdog.za.net> - 3.7-3
78df14
- Fix sed error
78df14
78df14
* Mon Mar 15 2010 Andrew Colin Kissa <andrew@topdog.za.net> - 3.7-2
78df14
- Fix the cron entry
78df14
78df14
* Tue Mar 09 2010 Andrew Colin Kissa <andrew@topdog.za.net> - 3.7-1
78df14
- Initial packaging