File mingw32-libalkimia5.spec of Package mingw32-libalkimia5

#
# spec file for package mingw32-libalkimia5
#
# Copyright (c) 2017 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 rname alkimia
%define soname_qt4 mingw32-libalkimia
%define soname_qt5 mingw32-libalkimia5
%define sonum 8
%define tarversion 8.1.80

Name:           mingw32-libalkimia5
Version:        8.1.80
Release:        0
Summary:        Library with common classes and functionality used by finance applications
License:        LGPL-2.1-or-later
Group:          Development/Libraries/C and C++
Url:            https://kmymoney.org/
Source0:        https://download.kde.org/stable/%{rname}/%{version}/src/%{rname}-%{version}.tar.xz
Source1:        manage-translations
Source2:        %{rname}-%{tarversion}.tar.xz
BuildRequires:  doxygen
BuildRequires:  mingw32-extra-cmake-modules
BuildRequires:  mingw32-gmp-devel
BuildRequires:  mingw32(cmake:KF5Completion)
BuildRequires:  mingw32(cmake:KF5Config)
BuildRequires:  mingw32(cmake:KF5CoreAddons)
BuildRequires:  mingw32(cmake:KF5I18n)
BuildRequires:  mingw32(cmake:KF5IconThemes)
BuildRequires:  mingw32(cmake:KF5NewStuff)
BuildRequires:  mingw32(cmake:KF5Package)
BuildRequires:  mingw32(cmake:KF5TextWidgets)
BuildRequires:  mingw32(cmake:Qt5Core) >= 5.2.0
BuildRequires:  mingw32(cmake:Qt5DBus) >= 5.2.0
BuildRequires:  mingw32(cmake:Qt5Qml) >= 5.2.0
BuildRequires:  mingw32(cmake:Qt5Test) >= 5.2.0
BuildRequires:  mingw32(cmake:Qt5WebKit) >= 5.2.0
BuildRequires:  mingw32(cmake:Qt5Widgets) >= 5.2.0
BuildRequires:  AppStream
%_mingw32_package_header_debug
BuildArch: noarch
# qml dialogs
Requires: mingw32-knewstuff-imports

# Template for lang sub-package.
#
# -c <package> specify conflicting package
# -n <package> specify custom base name
# -r <package> specify custom requirement
# -R do not add requirement from -n option
# -S do not add supplements
#
%define _mingw32_lang_package(n:r:c:RS) \
%package %{-n:-n %{-n*}-}lang \
Summary: Translations for package %{-n:%{-n*}}%{!-n:%{name}} \
Group: System/Localization \
%{!-R:Requires: %{-n:%{-n*}}%{!-n:%{name}} = %{version}} \
%{-r:Requires: %{-r*}} \
%{-c:Conflicts: %{-c*}} \
Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \
%{!-S:Supplements: %{-n:%{-n*}}%{!-n:%{name}}} \
BuildArch: noarch \
%description %{-n:-n %{-n*}-}lang \
Provides translations for the \"%{-n:%{-n*}}%{!-n:%{name}}\" package.

%_mingw32_lang_package -n %{soname_qt5} -c %{soname_qt4}-lang

%_mingw32_debug_package

%description
libalkimia is a library with common classes and functionality used by finance
applications.

%package -n mingw32-onlinequoteseditor5
Summary:        Application for editing and checking online quotes
Group:          System/Libraries

%description -n mingw32-onlinequoteseditor5
OnlineQuotesEditor is a gui application for editing and checking online quotes
applications.

%package -n %{soname_qt5}%{sonum}
Summary:        Library with common classes and functionality used by finance applications
Group:          System/Libraries

%description -n %{soname_qt5}%{sonum}
%{soname_qt5} is a library for Qt5 with common classes and functionality used by finance
applications.

%package -n %{soname_qt5}-devel
Summary:        Development Files for %{soname_qt5}
Group:          Development/Languages/C and C++
Requires:       %{soname_qt5}%{sonum} = %{version}

%description -n %{soname_qt5}-devel
The development files for %{soname_qt5}.

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

# import translations
sh -x %{_sourcedir}/manage-translations --unpack5 %{SOURCE2}

%build
%_mingw32_cmake_kf5 -d build-qt5 -- -DBUILD_APPLETS=0 -DBUILD_WITH_QTNETWORK=1 -DBUILD_WITH_WEBKIT=1
%_mingw32_cmake_build

%install
%_mingw32_kf5_makeinstall -C build-qt5

%_mingw32_find_lang %{rname} || true
%_mingw32_find_lang onlinequoteseditor alkimia.lang || true
%_mingw32_find_lang plasma_applet_onlinequote alkimia.lang || true
%_mingw32_find_lang plasma_applet_org.wincak.foreigncurrencies2 alkimia.lang || true

%files
%defattr(-,root,root,-)
%{_mingw32_libdir}/qt5
%exclude %{_mingw32_libdir}/qt5/qml/org/kde/alkimia5/*.debug

%files -n mingw32-onlinequoteseditor5
%defattr(-,root,root,-)
%{_mingw32_kf5_bindir}/onlinequoteseditor5.exe
%{_mingw32_datadir}/applications/org.kde.onlinequoteseditor5.desktop
%{_mingw32_datadir}/icons/*/*/*/onlinequoteseditor5.*
%{_mingw32_datadir}/metainfo/org.kde.onlinequoteseditor5.appdata.xml

%files -n %{soname_qt5}-devel
%defattr(-,root,root,-)
%{_mingw32_kf5_cmakedir}/LibAlkimia5-*/
%dir %{_mingw32_includedir}/alkimia/
%{_mingw32_includedir}/alkimia/Qt5
%{_mingw32_kf5_libdir}/libalkimia5.dll.a
%{_mingw32_kf5_bindir}/libalkimia5*.dll-gdb.py

%files -n %{soname_qt5}%{sonum}
%defattr(-,root,root,-)
%{_mingw32_kf5_bindir}/libalkimia5*.dll
%{_mingw32_kf5_knsrcfilesdir}/alkimia-quotes.knsrc
%{_mingw32_kf5_knsrcfilesdir}/kmymoney-quotes.knsrc
%{_mingw32_kf5_knsrcfilesdir}/skrooge-quotes.knsrc

%files -n %{soname_qt5}-lang -f %{rname}.lang
%defattr(-,root,root,-)

%changelog
openSUSE Build Service is sponsored by