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 http://bugs.opensuse.org/
#

Name:           kde3-klamav
%if %suse_version>=1500
BuildRequires:  clamav-devel
%else
BuildRequires:  clamav
%endif
BuildRequires:  curl-devel gmp-devel kdelibs3-devel sqlite3-devel unsermake
BuildRequires:  fdupes 
Url:            http://klamav.sourceforge.net/
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}

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

%prep
%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
%endif
. /etc/opt/kde3/common_options
rm -rf src/klamd src/sqlite
update_admin

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

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

%files -f klamav.lang
%defattr(-,root,root)
%doc  README AUTHORS ChangeLog COPYING NEWS TODO
/opt/kde3/bin/ScanWithKlamAV
/opt/kde3/bin/klamarkollon
/opt/kde3/bin/klamav
/opt/kde3/bin/klammail
/opt/kde3/share/applications/kde/klamav.desktop
/opt/kde3/share/apps/klamav
%dir /opt/kde3/share/apps/konqueror
%dir /opt/kde3/share/apps/konqueror/servicemenus
/opt/kde3/share/apps/konqueror/servicemenus/klamav-dropdown.desktop
/opt/kde3/share/config.kcfg/klamavconfig.kcfg
/opt/kde3/share/icons/*/*/*
%doc %lang(en) /opt/kde3/share/doc/HTML/en/klamav02

%changelog
openSUSE Build Service is sponsored by