File kmymoney.spec of Package kmymoney5

#
# spec file for package kmymoney
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


%bcond_without lang
Name:           kmymoney5
Version:        5.1.3
Release:        0
Summary:        A Personal Finance Manager by KDE
License:        GPL-2.0-only OR GPL-3.0-only
Group:          Productivity/Office/Finance
URL:            https://www.kmymoney.org/
Source0:        https://download.kde.org/stable/kmymoney/%{version}/src/kmymoney-%{version}.tar.xz
BuildRequires:  doxygen
BuildRequires:  extra-cmake-modules
BuildRequires:  fdupes
BuildRequires:  kdiagram-devel
BuildRequires:  libQt5Sql-private-headers-devel
BuildRequires:  libalkimia5-devel >= 7.0
BuildRequires:  libofx-devel
BuildRequires:  libqgpgme-devel
BuildRequires:  pkgconfig
BuildRequires:  python3-devel
BuildRequires:  update-desktop-files
BuildRequires:  cmake(KF5Activities)
BuildRequires:  cmake(KF5Akonadi)
BuildRequires:  cmake(KF5Archive)
BuildRequires:  cmake(KF5Completion)
BuildRequires:  cmake(KF5Config)
BuildRequires:  cmake(KF5ConfigWidgets)
BuildRequires:  cmake(KF5Contacts)
BuildRequires:  cmake(KF5CoreAddons)
BuildRequires:  cmake(KF5DocTools)
BuildRequires:  cmake(KF5Holidays)
BuildRequires:  cmake(KF5I18n)
BuildRequires:  cmake(KF5IconThemes)
BuildRequires:  cmake(KF5IdentityManagement)
BuildRequires:  cmake(KF5ItemModels)
BuildRequires:  cmake(KF5ItemViews)
BuildRequires:  cmake(KF5KCMUtils)
BuildRequires:  cmake(KF5KIO)
BuildRequires:  cmake(KF5Notifications)
BuildRequires:  cmake(KF5Service)
BuildRequires:  cmake(KF5TextWidgets)
BuildRequires:  cmake(KF5Wallet)
BuildRequires:  cmake(KF5XmlGui)
BuildRequires:  cmake(Qt5Concurrent) >= 5.6.0
BuildRequires:  cmake(Qt5Core) >= 5.6.0
BuildRequires:  cmake(Qt5DBus) >= 5.6.0
BuildRequires:  cmake(Qt5PrintSupport) >= 5.6.0
BuildRequires:  cmake(Qt5QuickWidgets) >= 5.6.0
BuildRequires:  cmake(Qt5Sql) >= 5.6.0
BuildRequires:  cmake(Qt5Svg) >= 5.6.0
BuildRequires:  cmake(Qt5Test) >= 5.6.0
BuildRequires:  cmake(Qt5WebEngine) >= 5.8.0
BuildRequires:  cmake(Qt5Widgets) >= 5.6.0
BuildRequires:  cmake(Qt5Xml) >= 5.6.0
BuildRequires:  cmake(aqbanking) >= 6.0.1
BuildRequires:  pkgconfig(libical)
BuildRequires:  pkgconfig(sqlcipher)
BuildRequires:  pkgconfig(sqlite3)
# QtWebEngine is needed
%ifnarch %{ix86} x86_64 %{arm} aarch64
ExclusiveArch:  do_not_build
%endif
%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150200
# aqbanking6 and gwenhywfar5 are in Leap since 15.2 (as aqbanking and gwenhywfar), obsolete them so users don't unnecessary keep them
Obsoletes:      aqbanking6
Obsoletes:      aqbanking6-lang
Obsoletes:      aqbanking6-doc
Obsoletes:      aqbanking6-ebics
Obsoletes:      aqbanking6-devel
Obsoletes:      aqbanking6-ofx
Obsoletes:      aqbanking-kf5
Obsoletes:      aqbanking-kf5-lang
Obsoletes:      aqbanking-kf5-doc
Obsoletes:      aqbanking-kf5-ebics
Obsoletes:      aqbanking-kf5-devel
Obsoletes:      aqbanking-kf5-ofx
Obsoletes:      gwenhywfar5
Obsoletes:      gwenhywfar5-lang
Obsoletes:      gwenhywfar5-devel
Obsoletes:      gwenhywfar5-tools
%endif

%description
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.

%lang_package

%prep
%autosetup -p1 -n kmymoney-%{version}

%build
%cmake_kf5 -d build -- -DENABLE_WEBENGINE=ON -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir}

%cmake_build

%install
%kf5_makeinstall -C build
%fdupes -s %{buildroot}
%suse_update_desktop_file org.kde.kmymoney

%if %{with lang}
#find_lang %{name} --with-man
%kf5_find_lang %{name}
%{kf5_find_htmldocs}
%endif

%ldconfig_scriptlets

%files
%license LICENSES/*
%doc %lang(en) %{_kf5_htmldir}/en/kmymoney/
%dir %{_kf5_iconsdir}/hicolor/1024x1024
%dir %{_kf5_iconsdir}/hicolor/1024x1024/apps
%dir %{_kf5_iconsdir}/hicolor/1024x1024/mimetypes
%dir %{_kf5_iconsdir}/hicolor/20x20
%dir %{_kf5_iconsdir}/hicolor/20x20/apps
%{_kf5_sharedir}/mime/packages/x-kmymoney.xml
%{_kf5_applicationsdir}/org.kde.kmymoney.desktop
%{_kf5_appsdir}/kbanking/
%{_kf5_appsdir}/kmymoney/
%{_kf5_appstreamdir}/org.kde.kmymoney.appdata.xml
%{_kf5_bindir}/kmymoney
%{_kf5_configkcfgdir}/
%{_kf5_iconsdir}/hicolor/*/*/*
%{_kf5_kxmlguidir}/
%{_kf5_libdir}/libkmm_csvimportercore.so.*
%{_kf5_libdir}/libkmm_icons.so.*
%{_kf5_libdir}/libkmm_menus.so.*
%{_kf5_libdir}/libkmm_models.so.*
%{_kf5_libdir}/libkmm_mymoney.so.*
%{_kf5_libdir}/libkmm_payeeidentifier.so.*
%{_kf5_libdir}/libkmm_plugin.so.*
%{_kf5_libdir}/libkmm_printer.so.*
%{_kf5_libdir}/libkmm_settings.so.*
%{_kf5_libdir}/libkmm_widgets.so.*
%{_kf5_plugindir}/
%{_kf5_servicesdir}/*.desktop
%{_kf5_sharedir}/checkprinting/
%{_kf5_sharedir}/kconf_update/
%{_kf5_mandir}/man1/kmymoney.1

%files devel
%{_kf5_prefix}/include/kmymoney/
%{_kf5_libdir}/libkmm_csvimportercore.so
%{_kf5_libdir}/libkmm_icons.so
%{_kf5_libdir}/libkmm_menus.so
%{_kf5_libdir}/libkmm_models.so
%{_kf5_libdir}/libkmm_mymoney.so
%{_kf5_libdir}/libkmm_payeeidentifier.so
%{_kf5_libdir}/libkmm_plugin.so
%{_kf5_libdir}/libkmm_printer.so
%{_kf5_libdir}/libkmm_settings.so
%{_kf5_libdir}/libkmm_widgets.so

%if %{with lang}
%files lang -f %{name}.lang
%{_kf5_mandir}/*/man1/kmymoney.1
%endif

%changelog
openSUSE Build Service is sponsored by