]> git.pld-linux.org Git - packages/clamav.git/blobdiff - clamav.spec
- release 4 - merged from RA-branch (clamd_conf patch, better trigger),
[packages/clamav.git] / clamav.spec
index 96fd0bce8cac77e5207a08b17b8605fa57505e8f..f7c52591983e05d59608f59678a82ce2de010750 100644 (file)
@@ -2,17 +2,18 @@
 #   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
@@ -20,9 +21,9 @@ Source3:      %{name}-milter.init
 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
@@ -32,11 +33,12 @@ Source9:    %{name}-milter.sysconfig
 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
@@ -48,10 +50,11 @@ Requires(pre):      /usr/sbin/groupadd
 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)
@@ -61,14 +64,14 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 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
@@ -100,7 +103,7 @@ Filtr ClamAV dla sendmaila korzystaj
 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
@@ -117,7 +120,7 @@ klienckich clamav.
 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.
@@ -143,6 +146,7 @@ Bazy wirus
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 # kill old libtool.m4 copy
 head -n 489 acinclude.m4 > acinclude.m4.tmp
@@ -157,6 +161,7 @@ mv -f acinclude.m4.tmp acinclude.m4
 %{__automake}
 %configure \
        --disable-clamav \
+       %{!?with_curl:--without-libcurl} \
        %{?with_milter:--enable-milter} \
        --with-dbdir=/var/lib/%{name}
 %{__make}
@@ -241,7 +246,7 @@ else
        /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
@@ -271,6 +276,15 @@ if [ "$1" = "0" ]; then
        %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
This page took 0.297127 seconds and 4 git commands to generate.