File dba-clamav-0976.spec of Package dba-clamav-0976
#
# spec file for package clamav
#
%define real_name clamav
%define version 0.97.6
%define vers 0976
%define prefix /DBA/%{real_name}/%{version}
%define dbdir /DBA/%{real_name}/db
%define maketest 0
Name: dba-%{real_name}-%{vers}
Summary: Antivirus Toolkit
License: GPL-2.0
Group: Productivity/Security
Version: %{version}
Release: 1
Url: http://www.clamav.net
Source0: %{real_name}-%{version}.tar.gz
Source1: clamav-rcclamd
Source2: clamav-rcfreshclam
Source3: clamav-updateclamconf
Source4: clamav-rpmlintrc
Source5: clamav-rcmilter
Patch1: clamav-conf.patch
Patch2: clamav-sles9.patch
Patch3: clamav-gcc47.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} >= 1100
BuildRequires: -post-build-checks
%endif
#!BuildIgnore: dba-openssl-098o dba-openssl-098r dba-openssl-098x dba-openssl-101c
#Requires: latex2html-pngicons
BuildRequires: ncurses-devel
BuildRequires: sed
BuildRequires: sendmail sendmail-devel
%define llvm --disable-llvm
%if 0%{?suse_version} >= 1010
BuildRequires: bc
BuildRequires: pkgconfig
BuildRequires: zlib-devel
%ifarch %ix86 x86_64
%define llvm --enable-llvm
# Needed for compiling LLVM.
BuildRequires: gcc-c++
%endif
%endif
%if 0%{?suse_version} >= 1030
BuildRequires: check-devel
BuildRequires: libbz2-devel
BuildRequires: pwdutils
BuildRequires: python-devel
%define clamav_check --enable-check
%else
BuildRequires: bzip2
%define clamav_check --disable-check
%endif
%description
Clam AntiVirus is an open source (GPL) anti-virus toolkit for UNIX,
designed especially for e-mail scanning on mail gateways. It provides a
number of utilities including a flexible and scalable multi-threaded
daemon, a command line scanner and advanced tool for automatic database
updates. The core of the package is an anti-virus engine available in a
form of shared library.
Here is a list of the main features:
* command-line scanner
* fast, multi-threaded daemon with support for on-access scanning
* milter interface for sendmail
* advanced database updater with support for scripted updates and
digital signatures
* virus scanner C library
* on-access scanning (Linux and FreeBSD)
* virus database updated multiple times per day (see home page for
total number of signatures)
* built-in support for various archive formats, including Zip, RAR,
Tar, Gzip, Bzip2, OLE2, Cabinet, CHM, BinHex, SIS and others
* built-in support for almost all mail file formats
* built-in support for ELF executables and Portable Executable files
compressed with UPX, FSG, Petite, NsPack, wwpack32, MEW, Upack
and obfuscated with SUE, Y0da Cryptor and others
* built-in support for popular document formats including MS Office and
MacOffice files, HTML, RTF and PDF
%package db
Summary: Virus Database for ClamAV
License: BSD-3-Clause ; GPL-2.0+ ; LGPL-2.1+ ; SUSE-Public-Domain ; MIT
Group: Productivity/Security
%if 0%{?suse_version} > 1120
BuildArch: noarch
%endif
%description db
This package contains a snapshot of the virus description database for
ClamAV. It is not needed if you use freshclam to keep your virus
database up to date.
Authors:
--------
Tomasz Kojm
Nigel Horne
%prep
%setup -q -n %{real_name}-%{version}
%patch1
%if 0%{?suse_version} == 0910
# SLES9's libmilter doesn't have smfi_insheader()
%patch2
%endif
%patch3 -p1
%build
%if 0%{?suse_version} >= 1010
CFLAGS="-fstack-protector"
CXXFLAGS="-fstack-protector"
%endif
export CFLAGS="%optflags $CFLAGS"
export CXXFLAGS="%optflags $CXXFLAGS"
%if 0%{?suse_version} == 0910
# SLES9 needs this macro to enable the quarantine feature in libmilter
CFLAGS="$CFLAGS -D_FFR_QUARANTINE -D_FFR_SMFI_OPENSOCKET"
%endif
./configure \
--prefix=%{prefix} \
--libdir=%{prefix}/lib \
--mandir=%{prefix}/man \
--sysconfdir=%{prefix}/etc \
--disable-clamav \
--disable-static \
--with-dbdir=%{dbdir} \
--with-user=vscan \
--with-group=vscan \
--enable-milter \
%clamav_check \
%llvm \
--disable-zlib-vcheck \
--enable-clamdtop
make %{?jobs:-j%jobs}
%check
%if %maketest
VALGRIND_GENSUP=1 make check
%endif
%install
export NO_BRP_CHECK_RPATH=true
%{__mkdir_p} %{buildroot}%{prefix}/etc
%{__mkdir_p} %{buildroot}%{prefix}/db
%{__mkdir_p} %{buildroot}%{dbdir}
%if 0%{?suse_version}
%makeinstall
%else
make DESTDIR=%{buildroot} install
%endif
# move man pages
if test -d %{buildroot}%{_libdir}; then
%{__mv} %{buildroot}%{_libdir}/* %{buildroot}%{prefix}/lib/
%{__rm} -rf %{buildroot}%{_libdir}
fi
%files
%defattr(-,root,root)
%dir %{prefix}
%{prefix}/bin
%{prefix}/etc
%{prefix}/include
%{prefix}/lib
%{prefix}/man
%{prefix}/sbin
%files db
%defattr(-,root,root)
%dir %{dbdir}
%{dbdir}
%changelog
* Fri Jun 8 2012 Holger Manthey <holger.manthey@bertelsmann.de>
- inital version