File mingw64-kdiagram.spec of Package mingw64-kdiagram

#
# spec file for package mingw64-kdiagram
#
# Copyright (c) 2016 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/
#


%bcond_without lang
%define _name   kdiagram
Name:           mingw64-%{_name}
Version:        2.8.0
Release:        0
Summary:        Powerful libraries (KChart, KGantt) for creating business diagrams
License:        GPL-2.0-or-later
Group:          System/GUI/KDE
Url:            http://www.kde.org/
Source:         %{_name}-%{version}.tar.xz
Patch0:         gcc-8-compile-fix.patch
BuildRequires:  mingw64-cross-cmake
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-extra-cmake-modules
# fix have choice for mingw64(dbghelp.dll) needed by mingw64-libdbus-1-3: mingw64-cross-wine mingw64-filesystem
BuildRequires:  mingw64-filesystem
BuildRequires:  mingw64-kf5-filesystem
#BuildRequires:  mingw64-libqt5-linguist-devel >= 5.6.0
BuildRequires:  mingw64-cross-libqt5-qmake  >= 5.6.0
BuildRequires:  mingw64-libqt5-qtbase-devel >= 5.6.0
# FIXME obsolate - should be a dependency of the related development package
BuildRequires:  mingw64-libqt5-qtsvg >= 5.6.0
BuildRequires:  mingw64-libqt5-qtsvg-devel >= 5.6.0
# FIXME obsolate - should be a dependency of the related package
BuildRequires:  mingw64-cross-libqt5-qttools >= 5.6.0
BuildRequires:  mingw64-libqt5-qttools >= 5.6.0
BuildRequires:  mingw64-zlib-devel
%_mingw64_package_header_debug
BuildArch: noarch

%description
%{summary}

%package -n mingw64-libKChart2
Summary:        KChart library for kdiagram
Group:          System/Libraries
%if %{with lang}
Recommends:     mingw64-libkchart-lang = %{version}
%endif

%description -n mingw64-libKChart2
This package contains the KChart libraries from the kdiagram package.

%package -n mingw64-libKGantt2
Summary:        Gantt chart implementation for kdiagram
Group:          System/Libraries
%if %{with lang}
Recommends:     mingw64-libkgantt-lang = %{version}
%endif

%description -n mingw64-libKGantt2
This package contains the KGantt libraries from the kdiagram package.

%package -n mingw64-libkgantt-lang
Summary:        Translation for the KGantt library
Group:          System/Localization
Requires:       mingw64-libKGantt2 = %{version}
Provides:       mingw64-libkgantt-lang-all = %{version}
#Supplements:    packageand(bundle-lang-other:libKGantt2)
BuildArch:      noarch

%description -n mingw64-libkgantt-lang
Translatons for the KGantt library

%package -n mingw64-libkchart-lang
Summary:        Translation for the KChart library
Group:          System/Localization
Requires:       mingw64-libKChart2 = %{version}
Provides:       mingw64-libkchart-lang-all = %{version}
#Supplements:    packageand(bundle-lang-other:libKChart2)
BuildArch:      noarch

%description -n mingw64-libkchart-lang
Translatons for the KChart library


%package devel
Summary:        Development package for the KDiagram libraries
Group:          System/Libraries/KDE
Requires:       mingw64-libKChart2 = %{version}
Requires:       mingw64-libKGantt2 = %{version}
Requires:       mingw64-libqt5-qtbase-devel >= 5.2.0

%description devel
Development package for the KDiagram libraries

%lang_package
%_mingw64_debug_package

%prep
%setup -q -n %{_name}-%{version}
%patch -P 0 -p1

%build
  %_mingw64_cmake_kf5 -d build  
  %_mingw64_cmake_build

%install
  %_mingw64_kf5_makeinstall -C build
  %_mingw64_find_lang kgantt_qt --with-qt --without-mo --all-name
  %_mingw64_find_lang kchart_qt --with-qt --without-mo --all-name


%files -n mingw64-libKChart2
%defattr(-,root,root)
%{_mingw64_bindir}/libKChart*.dll

%files -n mingw64-libKGantt2
%defattr(-,root,root)
%{_mingw64_bindir}/libKGantt*.dll

%files -n mingw64-libkchart-lang -f kchart_qt.lang
%defattr(-,root,root)
%exclude %{_mingw64_datadir}/locale/*/LC_MESSAGES/kgantt_qt.qm

%files -n mingw64-libkgantt-lang -f kgantt_qt.lang
%defattr(-,root,root)
%exclude %{_mingw64_datadir}/locale/*/LC_MESSAGES/kchart_qt.qm

%files devel
%defattr(-,root,root)
%{_mingw64_includedir}/KChart/
%{_mingw64_includedir}/kchart_version.h
%{_mingw64_includedir}/KGantt/
%{_mingw64_includedir}/kgantt_version.h
%{_mingw64_libdir}/libKChart.dll.a
%{_mingw64_libdir}/libKGantt.dll.a
%{_mingw64_datadir}/qt5/mkspecs/modules/qt_KChart.pri
%{_mingw64_datadir}/qt5/mkspecs/modules/qt_KGantt.pri
%{_mingw64_libdir}/cmake/KChart/
%{_mingw64_libdir}/cmake/KGantt/

%changelog
openSUSE Build Service is sponsored by