1 Summary: An anti-virus utility for Unix
2 Summary(pl): Antywirusowe narzêdzie dla Unixów
8 Source0: http://clamav.elektrapro.com/stable/%{name}-%{version}.tar.gz
10 Source2: %{name}.sysconfig
11 URL: http://clamav.elektrapro.com/
12 BuildRequires: autoconf
13 BuildRequires: automake
14 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 Clam Antivirus is a powerful anti-virus scanner for Unix. It supports
18 AMaViS, compressed files, uses the virus database from
19 OpenAntivirus.org, and includes a program for auto-updating. The
20 scanner is multithreaded, written in C, and POSIX compliant.
23 Clam Antivirus jest potê¿nym skanerem antywirusowym dla systemów
24 uniksowych. Wspiera on AMaViSa, skompresowane pliki, u¿ywa bazy
25 wirusów z OpenAntivirus.org, i posiada system automatycznej
26 aktualizacji. Skaner jest wielow±tkowy, napisany w C i zgodny z
30 Summary: Shared libraries for clamav
31 Summary(pl): Biblioteki dzielone clamav
35 Shared libraries for clamav.
37 %description libs -l pl
38 Biblioteki dzielone clamav.
41 Summary: clamav - Development header files and libraries
42 Summary(pl): clamav - Pliki nag³ówkowe i biblioteki dla programistów
43 Group: Development/Libraries
44 Requires: %{name}-libs = %{version}
47 This package contains the development header files and libraries
48 necessary to develop clamav client applications.
50 %description devel -l pl
51 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
55 Summary: clamav staic libraris
56 Summary(pl): Biblioteki statyczne clamav
57 Group: Development/Libraries
58 Requires: %{name}-devel = %{version}
61 clamav static libraris.
63 %description static -l pl
64 Biblioteki statyczne clamav.
79 rm -rf $RPM_BUILD_ROOT
80 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rc.d/init.d,sysconfig}
81 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/cron.daily,%{_var}/log}
84 DESTDIR=$RPM_BUILD_ROOT
86 echo -e '#!/bin/sh\n%{_bindir}/freshclam --quiet -l %{_var}/log/%{name}.log --daemon-notify' \
87 > $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name}
89 touch $RPM_BUILD_ROOT%{_var}/log/%{name}.log
91 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/clamd
92 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/clamd
93 install etc/clamav.conf $RPM_BUILD_ROOT%{_sysconfdir}/
96 rm -rf $RPM_BUILD_ROOT
99 if [ -n "`getgid clamav`" ]; then
100 if [ "`getgid clamav`" != "43" ]; then
101 echo "Warning: group clamav doesn't have gid=43. Correct this before installing clamav" 1>&2
105 echo "adding group clamav GID=43"
106 /usr/sbin/groupadd -g 43 -r -f clamav
108 if [ -n "`id -u clamav 2>/dev/null`" ]; then
109 if [ "`id -u clamav`" != "43" ]; then
110 echo "Warning: user clamav doesn't have uid=43. Correct this before installing clamav" 1>&2
114 echo "Adding user clamav UID=43"
115 /usr/sbin/useradd -u 43 -r -d /tmp -s /bin/false -c "Clam Anti Virus Checker" -g clamav clamav 1>&2
119 if [ "$1" = "0" ]; then
120 echo "Removing user clamav"
121 /usr/sbin/userdel clamav
122 echo "Removing group clamav"
123 /usr/sbin/groupdel clamav
127 touch %{_var}/log/%{name}.log && chmod 640 %{_var}/log/%{name}.log && chown clamav %{_var}/log/%{name}.log
129 %post libs -p /sbin/ldconfig
130 %postun libs -p /sbin/ldconfig
133 %defattr(644,root,root,755)
134 %doc AUTHORS ChangeLog FAQ NEWS README TODO docs/html/
135 %attr(755,root,root) %{_bindir}/*
136 %attr(755,root,root) %{_sbindir}/*
137 %attr(755,clamav,root) %dir %{_datadir}/%{name}
138 %attr(644,clamav,root) %verify(not md5 size mtime) %{_datadir}/%{name}/*.db*
139 %attr(640,clamav,root) %ghost %{_var}/log/%{name}.log
140 %attr(750,root,root) %{_sysconfdir}/cron.daily/%{name}
141 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/*.conf
142 %attr(754,root,root) /etc/rc.d/init.d/clamd
143 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/clamd
147 %defattr(644,root,root,755)
148 %attr(755,root,root) %{_libdir}/lib*.so.*
151 %defattr(644,root,root,755)
152 %attr(755,root,root) %{_libdir}/lib*.so
157 %defattr(644,root,root,755)