1 Summary: An anti-virus utility for Unix
2 Summary(pl): Antywirusowe narzêdzie dla Unixów
7 Group: Applications/Mail
8 Source0: http://clamav.elektrapro.com/stable/%{name}-%{version}.tar.gz
9 URL: http://clamav.elektrapro.com/
10 BuildRequires: autoconf
11 BuildRequires: automake
12 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
15 Clam Antivirus is a powerful anti-virus scanner for Unix. It supports
16 AMaViS, compressed files, uses the virus database from
17 OpenAntivirus.org, and includes a program for auto-updating. The
18 scanner is multithreaded, written in C, and POSIX compliant.
21 Clam Antivirus jest potê¿nym skanerem antywirusowym dla systemów
22 uniksowych. Wspiera on AMaViSa, skompresowane pliki, u¿ywa bazy
23 wirusów z OpenAntivirus.org, i posiada system automatycznej
24 aktualizacji. Skaner jest wielow±tkowy, napisany w C i zgodny z
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/cron.daily,%{_var}/log}
44 DESTDIR=$RPM_BUILD_ROOT
46 echo -e '#!/bin/sh\n%{_bindir}/freshclam --quiet -l %{_var}/log/%{name}.log' \
47 > $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name}
49 touch $RPM_BUILD_ROOT%{_var}/log/%{name}.log
52 rm -rf $RPM_BUILD_ROOT
55 if [ -n "`getgid clamav`" ]; then
56 if [ "`getgid clamav`" != "43" ]; then
57 echo "Warning: group clamav doesn't have gid=43. Correct this before installing clamav" 1>&2
61 echo "adding group clamav GID=43"
62 /usr/sbin/groupadd -g 43 -r -f clamav
64 if [ -n "`id -u clamav 2>/dev/null`" ]; then
65 if [ "`id -u clamav`" != "43" ]; then
66 echo "Warning: user clamav doesn't have uid=43. Correct this before installing clamav" 1>&2
70 echo "Adding user clamav UID=43"
71 /usr/sbin/useradd -u 43 -r -d /tmp -s /bin/false -c "Clam Anti Virus Checker" -g clamav clamav 1>&2
75 if [ "$1" = "0" ]; then
76 echo "Removing user clamav"
77 /usr/sbin/userdel clamav
78 echo "Removing group clamav"
79 /usr/sbin/groupdel clamav
83 touch %{_var}/log/%{name}.log && chmod 640 %{_var}/log/%{name}.log && chown clamav %{_var}/log/%{name}.log
86 %defattr(644,root,root,755)
87 %doc AUTHORS ChangeLog FAQ NEWS README TODO docs/*.pdf
88 %attr(755,root,root) %{_bindir}/*
89 %attr(755,clamav,root) %dir %{_datadir}/%{name}
90 %attr(644,clamav,root) %verify(not md5 size mtime) %{_datadir}/%{name}/*.db
91 %attr(640,clamav,root) %ghost %{_var}/log/%{name}.log
92 %attr(750,root,root) %{_sysconfdir}/cron.daily/%{name}