File mingw64-kmymoney.spec of Package mingw64-kmymoney
#
# spec file for package kmymoney
#
# Copyright (c) 2015 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 http://bugs.opensuse.org/
#
%define _name kmymoney
%define with_akonadi 0
%define with_bankdata_files 1
%global aq_dev_package mingw64-aqbanking6-devel
%global gw_dev_package mingw64-gwenhywfar5-devel
%{!?aq_version: %define aq_version %(rpm -q %{aq_dev_package} | awk -F"[-+]" '{print $4}')}
%{!?gw_version: %define gw_version %(rpm -q %{gw_dev_package} | awk -F"[-+]" '{print $4}')}
%define gw_libversion 60
Name: mingw64-%{_name}
Version: 4.8.5
Release: 0
Summary: A Personal Finance Manager for KDE 4
License: GPL-2.0-only or GPL-3.0-only
Group: Productivity/Office/Finance
Url: https://kmymoney.org
Source0: %{_name}-%{version}.tar.xz
BuildRequires: mingw64-cross-cmake
BuildRequires: mingw64-aqbanking6-devel >= %{aq_version}
BuildRequires: mingw64-boost-devel
BuildRequires: mingw64-cross-gcc-c++
BuildRequires: mingw64-cross-kde4-tools
BuildRequires: mingw64-glibmm2-devel
BuildRequires: mingw64-gmp-devel
BuildRequires: mingw64-gwenhywfar5-devel >= %{gw_version}
BuildRequires: kdelibs4-doc
# qdbus2pp tools
BuildRequires: libqt4-devel
BuildRequires: docbook_4
BuildRequires: mingw64-libalkimia-devel
BuildRequires: mingw64-libgpgme-devel
BuildRequires: mingw64-libical-devel
#BuildRequires: mingw64-libkactivities-devel
BuildRequires: mingw64-libkde4-devel
BuildRequires: mingw64-libkdepimlibs4-devel
BuildRequires: mingw64-libofx-devel
BuildRequires: mingw64-libxml++-devel
BuildRequires: mingw64-libxml2-devel
BuildRequires: mingw64-opensp-devel
BuildRequires: mingw64-win_iconv-devel
BuildRequires: python
BuildRequires: subversion
Requires: mingw64-oxygen-icon-theme
# language packages
Requires: mingw64-kmymoney-lang
Requires: mingw64-kmymoney-doc
Requires: mingw64-kmymoney-bankdata
# not sure if this belongs to kdelibs
Requires: mingw64-shared-mime-info
# required for kmm_kbanking plugin
# Requires: mingw64-libgwenhywfar%%{gw_libversion}-plugins
Recommends: %{name}-doc = %{version}
Recommends: %{name}-lang = %{version}
%_mingw64_package_header_debug
BuildArch: noarch
%if %{with_akonadi}
%_mingw64_kde4_akonadi_requires
%endif
%_mingw64_kde4_pimlibs_requires
%_mingw64_kde4_runtime_requires
%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.
%package doc
Summary: Documentation for KMyMoney
Group: Documentation/HTML
Requires: %{name} = %{version}
%description doc
Documentation and help files for KMyMoney.
%package bankdata
Summary: BICs from german banks
Group: Productivity/Office/Finance
Requires: %{name} = %{version}
BuildArch: noarch
%description bankdata
This package should provide the bankdata. But it is not working at the moment.
%lang_package
Requires: mingw64-kdelibs4-lang
Requires: mingw64-aqbanking-lang
Requires: mingw64-gwenhywfar-lang
%_mingw64_debug_package
%prep
%setup -q -n %{_name}-%{version}
%build
# unpack translation
## sh -x %{_sourcedir}/fetch-translations --unpack %{_sourcedir}/translations.tar.xz
# The _service file removes the .git folder. So set the git commit here.
## VERSION_SUFFIX=$(echo %{version} | cut -d "." -f 4)
## if [ -n $VERSION_SUFFIX ]; then VERSION_SUFFIX="-$VERSION_SUFFIX"; fi
## %_mingw64_cmake_kde4 -d build -- -DVERSION_SUFFIX="$VERSION_SUFFIX" -DKDE4_BUILD_TESTS=0
%_mingw64_cmake_kde4 -d build -- -DKDE4_BUILD_TESTS=0
%_mingw64_cmake_build
%install
%_mingw64_kde4_makeinstall -C build
rm -rf %{buildroot}%{_mingw64_mandir}
%_mingw64_kde4_post_install
%_mingw64_find_lang %{_name} || true
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog ChangeLog.original README.Fileformats
#%dir %{_mingw64_datadir}/metainfo
%attr(644, -, -) %{_mingw64_datadir}/metainfo/org.kde.kmymoney.appdata.xml
%{_mingw64_kde4_applicationsdir}/org.kde.kmymoney.desktop
%{_mingw64_datadir}/mime/packages/x-kmymoney.xml
%{_mingw64_kde4_appsdir}/kconf_update/kmymoney.upd
%{_mingw64_kde4_appsdir}/kmm_*/
%{_mingw64_kde4_appsdir}/kmymoney/
%exclude %{_mingw64_kde4_appsdir}/kmymoney/ibanbicdata
%{_mingw64_kde4_bindir}/kmymoney.exe
%{_mingw64_kde4_configdir}/csvimporterrc
%{_mingw64_kde4_configkcfgdir}/
%{_mingw64_kde4_iconsdir}/*/*/*/*kmymoney.png
%{_mingw64_kde4_bindir}/libkmm_*.dll
%{_mingw64_kde4_bindir}/*payeeidentifier*.dll
%{_mingw64_kde4_modulesdir}/kcm_kmm_*.dll
%{_mingw64_kde4_modulesdir}/kmm_*.dll
%{_mingw64_kde4_modulesdir}/konlinetasks_sepa.dll
%{_mingw64_kde4_modulesdir}/payeeidentifier_*.dll
%{_mingw64_kde4_servicesdir}/kcm_kmm_*.desktop
%{_mingw64_kde4_servicesdir}/kmm_*.desktop
%{_mingw64_kde4_servicesdir}/kmymoney-*.desktop
%{_mingw64_kde4_servicetypesdir}/kmymoney-*.desktop
%files devel
%defattr(-,root,root,-)
%{_mingw64_kde4_includedir}/kmymoney/
%{_mingw64_kde4_libdir}/libkmm_kdchart.dll.a
%{_mingw64_kde4_libdir}/libkmm_mymoney.dll.a
%{_mingw64_kde4_libdir}/libkmm_payeeidentifier.dll.a
%{_mingw64_kde4_libdir}/libkmm_plugin.dll.a
%{_mingw64_kde4_libdir}/libkmm_widgets.dll.a
%{_mingw64_kde4_libdir}/libpayeeidentifier_iban_bic.dll.a
%{_mingw64_kde4_libdir}/libpayeeidentifier_iban_bic_widgets.dll.a
%{_mingw64_kde4_libdir}/libpayeeidentifier_nationalAccount.dll.a
%{_mingw64_kde4_libdir}/libkmm_settings.dll.a
%files lang -f %{_name}.lang
%defattr(-,root,root,-)
%exclude %{_mingw64_kde4_htmldir}
%files doc
%defattr(-,root,root,-)
%doc %{_mingw64_kde4_htmldir}
%files bankdata
%defattr(-,root,root,-)
%if %{with_bankdata_files}
%{_mingw64_kde4_appsdir}/kmymoney/ibanbicdata
%{_mingw64_kde4_servicesdir}/ibanbicdata
%endif
%{_mingw64_kde4_servicetypesdir}/ibanbicdata.desktop
%changelog