File kde3-klamav.spec of Package klamav

# spec file for package klamav
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           kde3-klamav
%if %suse_version>=1500
BuildRequires:  clamav-devel
BuildRequires:  clamav
BuildRequires:  curl-devel gmp-devel kdelibs3-devel sqlite3-devel unsermake
BuildRequires:  fdupes 
License:        GPL-2.0+
Group:          Productivity/Security
Summary:        Frontend for clamav
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Version:        0.46
Release:        15
Source0:        klamav-%{version}-source.tar.bz2
Source1:        klamav-%{version}-translations.tar.bz2
Patch4:         external-sqlite.diff
Patch7:         build-c.diff
Patch8:         klamav-gcc43.diff
Patch9:         01_kdepot.patch
Patch10:        03_no_update_software_config_section.patch
Patch12:        08-use-default-database-path.patch
Patch13:        09-disable-autoscan.patch
Patch14:        10-fix-window-size.patch
Patch15:        11_desktop_directory.diff
Patch16:        12_no_mediaslave.diff
Patch17:        13_ltmail.sh_fix.diff
Patch18:        klamav-zlib.patch
Patch19:        klamav-fedora-0.46-clamav-0.101.patch
Patch20:        klamav_mprintf_stdout_flag.patch
Patch21:        klamav_0.46-75f04527_to_a3c768f6.patch
Provides:       klamav = %{version}
Obsoletes:      klamav <= %{version}

A KDE3 front-end for the Clam AntiVirus antivirus toolkit.

%setup -q -n klamav-%version-source/klamav-%version
%patch -P 4
%patch -P 7
%patch -P 8 -p1
%patch -P 9 -p1
%patch -P 10 -p1
%patch -P 12 -p1
%patch -P 13 -p1
%patch -P 14 -p1
%patch -P 15 -p1
%patch -P 16 -p1
%patch -P 17 -p1
%patch -P 18 -p2
%patch -P 19 -p1
%patch -P 20 -p2
%patch -P 21 -p1
cd po
%__tar xjf %SOURCE1
cd ..
%if %suse_version>=1500
sed -i 's|typedef struct Mem sqlite3_value|typedef struct sqlite3_value sqlite3_value|g' src/collectiondb.h
. /etc/opt/kde3/common_options
rm -rf src/klamd src/sqlite

. /etc/opt/kde3/common_options
./configure $configkde \
%ifarch amd64 x86_64 ia32e ppc64 s390x
	--enable-libsuffix=64 \
        --disable-final \
unsermake all

. /etc/opt/kde3/common_options
unsermake DESTDIR=$RPM_BUILD_ROOT install
%suse_update_desktop_file klamav Utility Security
%find_lang klamav
chmod a+x $RPM_BUILD_ROOT/opt/kde3/bin/ScanWithKlamAV
%if %suse_version > 1020
%fdupes $RPM_BUILD_ROOT/opt/kde3/share/

%files -f klamav.lang
%dir /opt/kde3/share/apps/konqueror
%dir /opt/kde3/share/apps/konqueror/servicemenus
%doc %lang(en) /opt/kde3/share/doc/HTML/en/klamav02

openSUSE Build Service is sponsored by