1 %define database_version 20030117
2 Summary: An anti-virus utility for Unix
3 Summary(pl): Antywirusowe narzêdzie dla Unixów
9 Source0: http://clamav.elektrapro.com/stable/%{name}-%{version}.tar.gz
11 Source2: %{name}.sysconfig
12 # gziped from http://clamav.elektrapro.com/database/:
13 Source3: %{name}-database-%{database_version}.tar.gz
14 URL: http://clamav.elektrapro.com/
15 Requires: %{name}-database
16 BuildRequires: autoconf
17 BuildRequires: automake
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 Clam Antivirus is a powerful anti-virus scanner for Unix. It supports
22 AMaViS, compressed files, uses the virus database from
23 OpenAntivirus.org, and includes a program for auto-updating. The
24 scanner is multithreaded, written in C, and POSIX compliant.
27 Clam Antivirus jest potê¿nym skanerem antywirusowym dla systemów
28 uniksowych. Wspiera on AMaViSa, skompresowane pliki, u¿ywa bazy
29 wirusów z OpenAntivirus.org, i posiada system automatycznej
30 aktualizacji. Skaner jest wielow±tkowy, napisany w C i zgodny z
34 Summary: Shared libraries for clamav
35 Summary(pl): Biblioteki dzielone clamav
39 Shared libraries for clamav.
41 %description libs -l pl
42 Biblioteki dzielone clamav.
45 Summary: clamav - Development header files and libraries
46 Summary(pl): clamav - Pliki nag³ówkowe i biblioteki dla programistów
47 Group: Development/Libraries
48 Requires: %{name}-libs = %{version}
51 This package contains the development header files and libraries
52 necessary to develop clamav client applications.
54 %description devel -l pl
55 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
59 Summary: clamav staic libraris
60 Summary(pl): Biblioteki statyczne clamav
61 Group: Development/Libraries
62 Requires: %{name}-devel = %{version}
65 clamav static libraris.
67 %description static -l pl
68 Biblioteki statyczne clamav.
71 Summary: Virus database for clamav
72 Summary(pl): Bazy wirusów dla clamav
74 Version: %{version}.%{database_version}
77 Virus database for clamav
79 %description database -l pl
80 Bazy wirusów dla clamav
84 %setup -q -n clamav-0.54 -a 3
96 rm -rf $RPM_BUILD_ROOT
97 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rc.d/init.d,sysconfig}
98 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/cron.daily,%{_var}/log}
101 DESTDIR=$RPM_BUILD_ROOT
103 echo -e '#!/bin/sh\n%{_bindir}/freshclam --quiet -l %{_var}/log/%{name}.log --daemon-notify' \
104 > $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name}
106 touch $RPM_BUILD_ROOT%{_var}/log/%{name}.log
108 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/clamd
109 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/clamd
110 install etc/clamav.conf $RPM_BUILD_ROOT%{_sysconfdir}/
113 rm -rf $RPM_BUILD_ROOT
116 if [ -n "`getgid clamav`" ]; then
117 if [ "`getgid clamav`" != "43" ]; then
118 echo "Warning: group clamav doesn't have gid=43. Correct this before installing clamav" 1>&2
122 echo "Adding group clamav GID=43"
123 /usr/sbin/groupadd -g 43 -r -f clamav
125 if [ -n "`id -u clamav 2>/dev/null`" ]; then
126 if [ "`id -u clamav`" != "43" ]; then
127 echo "Warning: user clamav doesn't have uid=43. Correct this before installing clamav" 1>&2
131 echo "Adding user clamav UID=43"
132 /usr/sbin/useradd -u 43 -r -d /tmp -s /bin/false -c "Clam Anti Virus Checker" -g clamav clamav 1>&2
136 if [ "$1" = "0" ]; then
137 echo "Removing user clamav"
138 /usr/sbin/userdel clamav
139 echo "Removing group clamav"
140 /usr/sbin/groupdel clamav
144 touch %{_var}/log/%{name}.log && chmod 640 %{_var}/log/%{name}.log && chown clamav %{_var}/log/%{name}.log
146 %post libs -p /sbin/ldconfig
147 %postun libs -p /sbin/ldconfig
150 %defattr(644,root,root,755)
151 %doc AUTHORS ChangeLog FAQ NEWS README TODO docs/html/
152 %attr(755,root,root) %{_bindir}/*
153 %attr(755,root,root) %{_sbindir}/*
154 %attr(755,clamav,root) %dir %{_datadir}/%{name}
155 %attr(640,clamav,root) %ghost %{_var}/log/%{name}.log
156 %attr(750,root,root) %{_sysconfdir}/cron.daily/%{name}
157 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/*.conf
158 %attr(754,root,root) /etc/rc.d/init.d/clamd
159 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/clamd
163 %defattr(644,root,root,755)
164 %attr(755,root,root) %{_libdir}/lib*.so.*
167 %defattr(644,root,root,755)
168 %attr(755,root,root) %{_libdir}/lib*.so
173 %defattr(644,root,root,755)
177 %defattr(644,root,root,755)
178 %attr(644,clamav,root) %verify(not md5 size mtime) %{_datadir}/%{name}/*.db*