1 %define database_version 20030621
2 Summary: An anti-virus utility for Unix
3 Summary(pl): Antywirusowe narzêdzie dla Unixów
9 Source0: http://dl.sourceforge.net/clamav/%{name}-%{version}.tar.gz
10 # Source0-md5: eddeba4e1f399f65bc71aa2b3e901543
12 Source2: %{name}.sysconfig
13 # gziped from http://clamav.elektrapro.com/database/:
14 Source3: %{name}-database-%{database_version}.tar.gz
15 # Source3-md5: 26ba23c5a6e6131e1a8efb397e4be9f2
16 URL: http://www.clamav.net/
17 Requires: %{name}-database
18 BuildRequires: autoconf
19 BuildRequires: automake
20 BuildRequires: zlib-devel
21 Requires(post,preun): /sbin/chkconfig
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 Clam Antivirus is a powerful anti-virus scanner for Unix. It supports
26 AMaViS, compressed files, uses the virus database from
27 OpenAntivirus.org, and includes a program for auto-updating. The
28 scanner is multithreaded, written in C, and POSIX compliant.
31 Clam Antivirus jest potê¿nym skanerem antywirusowym dla systemów
32 uniksowych. Wspiera on AMaViSa, skompresowane pliki, u¿ywa bazy
33 wirusów z OpenAntivirus.org, i posiada system automatycznej
34 aktualizacji. Skaner jest wielow±tkowy, napisany w C i zgodny z
38 Summary: Shared libraries for clamav
39 Summary(pl): Biblioteki dzielone clamav
43 Shared libraries for clamav.
45 %description libs -l pl
46 Biblioteki dzielone clamav.
49 Summary: clamav - Development header files and libraries
50 Summary(pl): clamav - Pliki nag³ówkowe i biblioteki dla programistów
51 Group: Development/Libraries
52 Requires: %{name}-libs = %{version}
55 This package contains the development header files and libraries
56 necessary to develop clamav client applications.
58 %description devel -l pl
59 Pliki nag³ówkowe i biblioteki konieczne do kompilacji aplikacji
63 Summary: clamav staic libraris
64 Summary(pl): Biblioteki statyczne clamav
65 Group: Development/Libraries
66 Requires: %{name}-devel = %{version}
69 clamav static libraris.
71 %description static -l pl
72 Biblioteki statyczne clamav.
75 Summary: Virus database for clamav
76 Summary(pl): Bazy wirusów dla clamav
78 Version: %{version}.%{database_version}
82 Virus database for clamav (updated %{database_version})
84 %description database -l pl
85 Bazy wirusów dla clamav (aktualizowana %{database_version})
97 --with-dbdir=/var/lib/%{name}
101 rm -rf $RPM_BUILD_ROOT
102 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{rc.d/init.d,sysconfig}
103 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/cron.daily,%{_var}/log}
106 DESTDIR=$RPM_BUILD_ROOT
108 cat <<EOF >$RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name}
111 %{_bindir}/freshclam --quiet -l %{_var}/log/%{name}.log --daemon-notify
114 touch $RPM_BUILD_ROOT%{_var}/log/%{name}.log
116 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/clamd
117 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/clamd
118 install etc/clamav.conf $RPM_BUILD_ROOT%{_sysconfdir}/
121 rm -rf $RPM_BUILD_ROOT
124 if [ -n "`getgid clamav`" ]; then
125 if [ "`getgid clamav`" != "43" ]; then
126 echo "Warning: group clamav doesn't have gid=43. Correct this before installing clamav" 1>&2
130 echo "Adding group clamav GID=43"
131 /usr/sbin/groupadd -g 43 -r -f clamav
133 if [ -n "`id -u clamav 2>/dev/null`" ]; then
134 if [ "`id -u clamav`" != "43" ]; then
135 echo "Warning: user clamav doesn't have uid=43. Correct this before installing clamav" 1>&2
139 echo "Adding user clamav UID=43"
140 /usr/sbin/useradd -u 43 -r -d /tmp -s /bin/false -c "Clam Anti Virus Checker" -g clamav clamav 1>&2
144 touch %{_var}/log/%{name}.log && chmod 640 %{_var}/log/%{name}.log && chown clamav %{_var}/log/%{name}.log
145 /sbin/chkconfig --add clamd
146 if [ -f /var/lock/subsys/clamd ]; then
147 /etc/rc.d/init.d/clamd restart >&2
149 echo "Run \"/etc/rc.d/init.d/clamd start\" to start Clam Antivirus daemon." >&2
153 if [ "$1" = "0" ]; then
154 if [ -f /var/lock/subsys/clamd ]; then
155 /etc/rc.d/init.d/clamd stop
157 /sbin/chkconfig --del clamd
161 if [ "$1" = "0" ]; then
162 echo "Removing user clamav"
163 /usr/sbin/userdel clamav
164 echo "Removing group clamav"
165 /usr/sbin/groupdel clamav
168 %post libs -p /sbin/ldconfig
169 %postun libs -p /sbin/ldconfig
172 %defattr(644,root,root,755)
173 %doc AUTHORS ChangeLog FAQ NEWS README TODO docs/html/
174 %attr(755,root,root) %{_bindir}/*
175 %attr(755,root,root) %{_sbindir}/*
176 %attr(755,clamav,root) %dir /var/lib/%{name}
177 %attr(640,clamav,root) %ghost %{_var}/log/%{name}.log
178 %attr(750,root,root) %{_sysconfdir}/cron.daily/%{name}
179 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/*.conf
180 %attr(754,root,root) /etc/rc.d/init.d/clamd
181 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/clamd
185 %defattr(644,root,root,755)
186 %attr(755,root,root) %{_libdir}/lib*.so.*.*
189 %defattr(644,root,root,755)
190 %attr(755,root,root) %{_libdir}/lib*.so
195 %defattr(644,root,root,755)
199 %defattr(644,root,root,755)
200 %attr(644,clamav,root) %verify(not md5 size mtime) /var/lib/%{name}/*.db*
201 %attr(644,clamav,root) %verify(not md5 size mtime) /var/lib/%{name}/mirrors.txt