File kmymoney.spec of Package kmymoney4

# spec file for package kmymoney
# Copyright (c) 2018 SUSE LINUX 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:           kmymoney
Version:        4.8.4
%if 0%{?sle_version} == 150300
Epoch: 1
Provides: %{name} = %{version}
Release:        0
Summary:        A Personal Finance Manager by KDE
License:        GPL-2.0 or GPL-3.0
Group:          Productivity/Office/Finance
Source1:        manage-translations
Source2:        kmymoney-4.8.4-src.7z 
Patch0:         Fix-Print-to-File.patch
Patch1:         Fix-clang-compilation-error-ordered-comparison-between-pointer-and-zero.patch
Patch2:         add-print-preview-for-charts.patch
Patch3:         disable-print-preview-with-unpatched-kdelibs.patch
BuildRequires:  aqbanking-devel
%if 0%{?suse_version} > 1325
BuildRequires:  libboost_headers-devel
BuildRequires:  boost-devel
BuildRequires:  fdupes
BuildRequires:  glibmm2-devel
BuildRequires:  gmp-devel
BuildRequires:  libalkimia-devel
BuildRequires:  libgpgme-devel
BuildRequires:  libkactivities-devel
BuildRequires:  libkdepimlibs4-devel
BuildRequires:  libofx-devel
BuildRequires:  libxml++-devel
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150200
BuildRequires:  p7zip-full
BuildRequires:  p7zip
%if %suse_version > 1320 
BuildRequires:  python2
BuildRequires:  python
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(libical)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(sqlcipher)
Requires(post): shared-mime-info
Requires(postun): shared-mime-info
Recommends:     %{name}-doc = %{version}
Recommends:     %{name}-lang = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if %suse_version > 1320 || 0%{?is_opensuse}
Requires:       libakonadiprotocolinternals1
Recommends:     akonadi-runtime
Requires(post): shared-mime-info
Requires(postun): shared-mime-info
%requires_ge aqbanking

KMyMoney is a Personal Finance Manager by KDE. It operates
similar to Quicken, supports various account types, categorization
of expenses, multiple currencies, online banking support via QIF,
OFX and HBCI, budgeting and a rich set of reports.

%package devel
Summary:        Development Files for KMyMoney
Group:          Development/Languages/C and C++
Requires:       %{name} = %{version}

%description devel
Development files and headers need to build software using KMyMoney.

%package doc
Summary:        Documentation for KMyMoney
Group:          Documentation/HTML
Requires:       %{name} = %{version}

%description doc
Documentation and help files for KMyMoney.


%setup -q
%autopatch -p1
sh -x %{_sourcedir}/manage-translations --unpack4 %{SOURCE2}

%if 0%{suse_version} > 1500
# workaround to fix build with gcc11 where C++17 is the default
# TODO: check if still needed whenever there's a new release
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS --std=c++14"
%cmake_kde4 -d build -- -DENABLE_SQLCIPHER=1

%kde4_makeinstall -C build


%find_lang %{name}

%fdupes -s %{buildroot}



%doc AUTHORS COPYING ChangeLog ChangeLog.original README.Fileformats
%dir %{_datadir}/metainfo
%dir %{_kde4_modulesdir}/sqldrivers

%dir %{_kde4_servicesdir}/ibanbicdata

%files devel

%files lang -f %{name}.lang
%exclude %{_kde4_htmldir}

%files doc
%doc %{_kde4_htmldir}

openSUSE Build Service is sponsored by