# Make freshclam (script and daemon)
#
# Conditional build:
-%bcond_with milter # without milter subpackage
+%bcond_without milter # build without milter subpackage
+%bcond_with curl # enable curl support
#
Summary: An anti-virus utility for Unix
Summary(pl): Antywirusowe narzêdzie dla Uniksów
Name: clamav
-Version: 0.80rc4
-Release: 1
+Version: 0.80
+Release: 4
License: GPL
Group: Applications
-Source0: http://dl.sourceforge.net/clamav/%{name}-%{version}.tar.gz
-# Source0-md5: 5c02d52c361f04098a9956478f8654a0
+Source0: http://heanet.dl.sourceforge.net/clamav/%{name}-%{version}.tar.gz
+# Source0-md5: 59bf21e169a35d7e9c27a34435f9b870
# Source0-size: 2668125
Source1: %{name}.init
Source2: %{name}.sysconfig
Source4: %{name}-cron-updatedb
Source5: %{name}.logrotate
# Remember to update date after databases upgrade
-%define database_version 20041016
+%define database_version 20041019
Source6: http://db.local.clamav.net/daily.cvd
-# Source6-md5: 0407cabd808a894c5fdc6b4e79dff265
+# Source6-md5: cee37166f11f509143d61b0e9d3cfeff
# Source6-size: 100250
Source7: http://db.local.clamav.net/main.cvd
# Source7-md5: f006a1f55722c2ff9d50e61cfb938bc7
Patch0: %{name}-pld_config.patch
Patch1: %{name}-no_auto_libwrap.patch
Patch2: %{name}-nolibs.patch
+Patch3: %{name}-clamd_conf.patch
URL: http://www.clamav.net/
BuildRequires: autoconf
BuildRequires: automake
+%{?with_curl:BuildRequires: curl-devel}
BuildRequires: gmp-devel
-BuildRequires: libidn-devel
%{?with_milter:BuildRequires: libwrap-devel}
BuildRequires: libtool
BuildRequires: rpmbuild(macros) >= 1.159
Requires(pre): /usr/sbin/useradd
Requires(postun): /usr/sbin/groupdel
Requires(postun): /usr/sbin/userdel
+Requires(postun): sed >= 4.0
Requires(postun,pre): /usr/sbin/usermod
Requires(post,preun): /sbin/chkconfig
Requires: /usr/sbin/usermod
-Requires: %{name}-libs = %{version}-%{release}
+Requires: %{name}-libs = %{epoch}:%{version}-%{release}
Requires: bc
Provides: group(clamav)
Provides: user(clamav)
Clam Antivirus is a powerful anti-virus scanner for Unix. It supports
AMaViS, compressed files, on-access scanning and includes a program
for auto-updating with support for digital signatures. The virus
-database has over 20000 viruses, worms and trojans signatures. The
+database has over 25000 viruses, worms and trojans signatures. The
scanner is multithreaded, written in C, and POSIX compliant.
%description -l pl
Clam Antivirus jest potê¿nym skanerem antywirusowym dla systemów
uniksowych. Wspiera on AMaViSa, skompresowane pliki, skanowanie
"on-access" i posiada system bezpiecznej, automatycznej aktualizacji.
-Baza wirusów zawiera ponad 20000 sygnatur. Skaner jest wielow±tkowy,
+Baza wirusów zawiera ponad 25000 sygnatur. Skaner jest wielow±tkowy,
napisany w C i zgodny z POSIXem.
%package libs
Summary: clamav - Development header files and libraries
Summary(pl): clamav - Pliki nag³ówkowe i biblioteki dla programistów
Group: Development/Libraries
-Requires: %{name}-libs = %{version}-%{release}
+Requires: %{name}-libs = %{epoch}:%{version}-%{release}
Requires: bzip2-devel
Requires: gmp-devel
Requires: zlib-devel
Summary: clamav static libraris
Summary(pl): Biblioteki statyczne clamav
Group: Development/Libraries
-Requires: %{name}-devel = %{version}-%{release}
+Requires: %{name}-devel = %{epoch}:%{version}-%{release}
%description static
clamav static libraries.
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
# kill old libtool.m4 copy
head -n 489 acinclude.m4 > acinclude.m4.tmp
%{__automake}
%configure \
--disable-clamav \
+ %{!?with_curl:--without-libcurl} \
%{?with_milter:--enable-milter} \
--with-dbdir=/var/lib/%{name}
%{__make}
/usr/sbin/useradd -u 43 -d /tmp -s /bin/false \
-c "Clam Anti Virus Checker" -g clamav clamav 1>&2
if [ -n "`/usr/bin/getgid amavis`" ]; then
- echo "adding clamav to amavis group
+ echo "adding clamav to amavis group"
/usr/sbin/usermod -G amavis clamav 1>&2
fi
fi
%groupremove clamav
fi
+%triggerpostun -- %{name} <= 0.75.1
+if [ -f /etc/clamav.conf.rpmsave ]; then
+ echo "Renaming config to new name /etc/clamd.conf"
+ mv -f /etc/clamd.conf /etc/clamd.conf.rpmnew
+ mv -f /etc/clamav.conf.rpmsave /etc/clamd.conf
+ echo "Changing config location in freshclam config"
+ sed -i -e 's/clamav.conf/clamd.conf/' /etc/freshclam.conf
+fi
+
%if %{with milter}
%post milter
/sbin/chkconfig --add clamav-milter