File mingw64-libalkimia5.spec of Package mingw64-libalkimia5
#
# spec file for package mingw64-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 mingw64-libalkimia
%define soname_qt5 mingw64-libalkimia5
%define sonum 8
%define tarversion 8.1.80
Name: mingw64-libalkimia5
Version: 8.1.80
Release: 0
Summary: Library with common classes and functionality used by finance applications
License: LGPL-2.1+
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
# png2ico
BuildRequires: mingw64-cross-kdewin-tools
BuildRequires: mingw64-extra-cmake-modules
BuildRequires: mingw64-gmp-devel
BuildRequires: mingw64(cmake:KF5Completion)
BuildRequires: mingw64(cmake:KF5Config)
BuildRequires: mingw64(cmake:KF5CoreAddons)
BuildRequires: mingw64(cmake:KF5I18n)
BuildRequires: mingw64(cmake:KF5IconThemes)
BuildRequires: mingw64(cmake:KF5NewStuff)
BuildRequires: mingw64(cmake:KF5Package)
BuildRequires: mingw64(cmake:KF5TextWidgets)
BuildRequires: mingw64(cmake:Qt5Core) >= 5.2.0
BuildRequires: mingw64(cmake:Qt5DBus) >= 5.2.0
BuildRequires: mingw64(cmake:Qt5Qml) >= 5.2.0
BuildRequires: mingw64(cmake:Qt5Test) >= 5.2.0
BuildRequires: mingw64(cmake:Qt5WebKit) >= 5.2.0
BuildRequires: mingw64(cmake:Qt5Widgets) >= 5.2.0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%_mingw64_package_header_debug
BuildArch: noarch
# 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 _mingw64_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.
%_mingw64_lang_package -n %{soname_qt5} -c %{soname_qt4}-lang
%_mingw64_debug_package
%description
libalkimia is a library with common classes and functionality used by finance
applications.
%package -n mingw64-onlinequoteseditor5
Summary: Application for editing and checking online quotes
Group: System/Libraries
%description -n mingw64-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
%_mingw64_cmake_kf5 -d build-qt5 -- -DBUILD_APPLETS=0 -DBUILD_WITH_QTNETWORK=1 -DBUILD_WITH_WEBKIT=1
%_mingw64_cmake_build
%install
%_mingw64_kf5_makeinstall -C build-qt5
%_mingw64_find_lang %{rname} || true
%_mingw64_find_lang onlinequoteseditor alkimia.lang || true
%_mingw64_find_lang plasma_applet_onlinequote alkimia.lang || true
%_mingw64_find_lang plasma_applet_org.wincak.foreigncurrencies2 alkimia.lang || true
%files
%defattr(-,root,root,-)
%{_mingw64_libdir}/qt5
%exclude %{_mingw64_libdir}/qt5/qml/org/kde/alkimia5/libqmlalkimia5.dll.debug
%files -n mingw64-onlinequoteseditor5
%defattr(-,root,root,-)
%{_mingw64_kf5_bindir}/onlinequoteseditor5.exe
%{_mingw64_datadir}/applications/org.kde.onlinequoteseditor5.desktop
%{_mingw64_datadir}/icons/*/*/*/onlinequoteseditor5.*
%{_mingw64_datadir}/metainfo/org.kde.onlinequoteseditor5.appdata.xml
%files -n %{soname_qt5}-devel
%defattr(-,root,root,-)
%{_mingw64_kf5_cmakedir}/LibAlkimia5-*/
%dir %{_mingw64_includedir}/alkimia/
%{_mingw64_includedir}/alkimia/Qt5
%{_mingw64_kf5_libdir}/libalkimia5.dll.a
%{_mingw64_kf5_bindir}/libalkimia5*.py
%files -n %{soname_qt5}%{sonum}
%defattr(-,root,root,-)
%{_mingw64_kf5_bindir}/libalkimia5*.dll
%{_mingw64_kf5_knsrcfilesdir}/alkimia-quotes.knsrc
%{_mingw64_kf5_knsrcfilesdir}/kmymoney-quotes.knsrc
%{_mingw64_kf5_knsrcfilesdir}/skrooge-quotes.knsrc
%files -n %{soname_qt5}-lang -f %{rname}.lang
%defattr(-,root,root,-)
%changelog