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%{_sysconfdir}/rc.d/init.d/clamd
92 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/clamd
95 rm -rf $RPM_BUILD_ROOT
98 if [ -n "`getgid clamav`" ]; then
99 if [ "`getgid clamav`" != "43" ]; then
100 echo "Warning: group clamav doesn't have gid=43. Correct this before installing clamav" 1>&2
104 echo "adding group clamav GID=43"
105 /usr/sbin/groupadd -g 43 -r -f clamav
107 if [ -n "`id -u clamav 2>/dev/null`" ]; then
108 if [ "`id -u clamav`" != "43" ]; then
109 echo "Warning: user clamav doesn't have uid=43. Correct this before installing clamav" 1>&2
113 echo "Adding user clamav UID=43"
114 /usr/sbin/useradd -u 43 -r -d /tmp -s /bin/false -c "Clam Anti Virus Checker" -g clamav clamav 1>&2
118 if [ "$1" = "0" ]; then
119 echo "Removing user clamav"
120 /usr/sbin/userdel clamav
121 echo "Removing group clamav"
122 /usr/sbin/groupdel clamav
126 touch %{_var}/log/%{name}.log && chmod 640 %{_var}/log/%{name}.log && chown clamav %{_var}/log/%{name}.log
128 %post libs -p /sbin/ldconfig
129 %postun libs -p /sbin/ldconfig
132 %defattr(644,root,root,755)
133 %doc AUTHORS ChangeLog FAQ NEWS README TODO docs/html/
134 %attr(755,root,root) %{_bindir}/*
135 %attr(755,clamav,root) %dir %{_datadir}/%{name}
136 %attr(644,clamav,root) %verify(not md5 size mtime) %{_datadir}/%{name}/*.db*
137 %attr(640,clamav,root) %ghost %{_var}/log/%{name}.log
138 %attr(750,root,root) %{_sysconfdir}/cron.daily/%{name}
139 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/*.conf
140 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/clamd
141 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sysconfig/clamd
145 %defattr(644,root,root,755)
146 %attr(755,root,root) %{_libdir}/lib*.so.*
149 %defattr(644,root,root,755)
150 %attr(755,root,root) %{_libdir}/lib*.so
151 %attr(755,root,root) %{_libdir}/lib*.la
155 %defattr(644,root,root,755)