File mingw32-libalkimia.spec of Package mingw32-libalkimia
#
# spec file for package mingw32-libalkimia
#
# 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 sonum 8
%define tarversion 8.1.0
%define with_plasma 0
Name: mingw32-libalkimia
Version: 8.0.4
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: %{rname}-%{version}.tar.xz
Source1: manage-translations
Source2: %{rname}-%{tarversion}.tar.xz
BuildRequires: mingw32-cross-gcc-c++
BuildRequires: doxygen
BuildRequires: mingw32-gmp-devel
BuildRequires: mingw32-cross-kde4-tools
BuildRequires: mingw32-libkde4-devel
BuildRequires: mingw32-extra-cmake-modules
# for translation
BuildRequires: mingw32-ki18n-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%_mingw32_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 _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_qt4} -c mingw32-libalkimia5-lang
%_mingw32_lang_package -n mingw32-onlinequoteseditor
%_mingw32_debug_package
%description
libalkimia is a library with common classes and functionality used by finance
applications.
%package -n mingw32-onlinequoteseditor
Summary: Application for editing and checking online quotes
Group: System/Libraries
%description -n mingw32-onlinequoteseditor
OnlineQuotesEditor is a gui application for editing and checking online quotes
applications.
%package -n %{soname_qt4}%{sonum}
Summary: Library with common classes and functionality used by finance applications
Group: System/Libraries
%description -n %{soname_qt4}%{sonum}
%{soname_qt4} is a library for Qt4 with common classes and functionality used by finance
applications.
%package -n %{soname_qt4}-devel
Summary: Development Files for %{soname_qt4}
Group: Development/Languages/C and C++
Requires: %{soname_qt4}%{sonum} = %{version}
%description -n %{soname_qt4}-devel
The development files for %{soname_qt4}.
%if %with_plasma
%package -n %{soname_qt4}-plasma-widgets
Summary: Alkima plasma widgets
Group: System/Libraries
%description -n %{soname_qt4}-plasma-widgets
This package contains plasma widgets provided by the alkimia library.
%endif
%prep
%setup -q -n %{rname}-%{version}
# import translations
sh -x %{_sourcedir}/manage-translations --unpack5 %{SOURCE2}
%build
%_mingw32_cmake_kde4 -d build-qt4 -- -DBUILD_QT4=1 -DGETTEXT_FOUND=1 -DBUILD_APPLETS=%with_plasma
%make_jobs
%install
cd build-qt4
%_mingw32_kde4_makeinstall
cd ..
%_mingw32_find_lang alkimia alkimia.lang || true
%_mingw32_find_lang onlinequoteseditor onlinequoteseditor.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,-)
%dir %{_mingw32_libdir}/qt4/plugins/imports
%dir %{_mingw32_libdir}/qt4/plugins/imports/org
%dir %{_mingw32_libdir}/qt4/plugins/imports/org/kde
%dir %{_mingw32_libdir}/qt4/plugins/imports/org/kde/alkimia
%{_mingw32_libdir}/qt4/plugins/imports/org/kde/alkimia/libqmlalkimia.dll
%{_mingw32_libdir}/qt4/plugins/imports/org/kde/alkimia/qmldir
%files -n mingw32-onlinequoteseditor
%defattr(-,root,root,-)
%{_mingw32_kde4_bindir}/onlinequoteseditor.exe
%{_mingw32_datadir}/applications/kde4/org.kde.onlinequoteseditor.desktop
%{_mingw32_datadir}/icons/*/*/*/onlinequoteseditor.*
%{_mingw32_datadir}/metainfo/org.kde.onlinequoteseditor.appdata.xml
%if %with_plasma
%files -n %{soname_qt4}-plasma-widgets
%defattr(-,root,root,-)
%{_mingw32_libdir}/kde4/plasma_applet_onlinequote.dll
%{_mingw32_datadir}/kde4/services/plasma-applet-onlinequote.desktop
%endif
%files -n %{soname_qt4}-devel
%defattr(-,root,root,-)
%dir %{_mingw32_kde4_includedir}/alkimia/
%{_mingw32_kde4_includedir}/alkimia/Qt4
%{_mingw32_kde4_libdir}/cmake/LibAlkimia-*/
%{_mingw32_kde4_libdir}/libalkimia.dll.a
%files -n %{soname_qt4}%{sonum}
%defattr(-,root,root,-)
%{_mingw32_kde4_bindir}/libalkimia-*.dll
%{_mingw32_kde4_configdir}/alkimia-quotes.knsrc
%{_mingw32_kde4_configdir}/kmymoney-quotes.knsrc
%{_mingw32_kde4_configdir}/skrooge-quotes.knsrc
%files -n %{soname_qt4}-lang -f %{rname}.lang
%defattr(-,root,root,-)
%files -n mingw32-onlinequoteseditor-lang -f onlinequoteseditor.lang
%defattr(-,root,root,-)
%changelog