File mingw64-kdebase4-runtime.spec of Package mingw64-kdebase4-runtime

#
# spec file for package mingw64-kdebase4-runtime
#
# Copyright (c) 2014 SUSE LINUX Products 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   kdebase4-runtime
%define with_khelpcenter 1

Name:           mingw64-%{_name}

BuildRequires:  mingw64-cross-cmake
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-cross-kde4-tools >= 4.14.60
BuildRequires:  mingw64-cross-qmake
BuildRequires:  mingw64-libgcrypt-devel
BuildRequires:  mingw64-libqt4-devel >= 4.8.0
BuildRequires:  mingw64-libqt4-tools
BuildRequires:  mingw64-libqt4-tools-devel >= 4.8.0
BuildRequires:  mingw64-libkde4-devel
#for drkonqi
BuildRequires:  mingw64-libkdepimlibs4-devel
# binutils-devel provided libbfd and libiberty
BuildRequires:  mingw64-binutils-devel
BuildRequires:  mingw64-libintl-devel
BuildRequires:  mingw64-zlib-devel
#kwalletd
BuildRequires:  mingw64-libgpgme-devel
# share/dbus-1/interfaces
BuildRequires:  mingw64-libdbus-1-3
# should include share/config and share/apps, did not work
# BuildRequires:  mingw64-kde4-filesystem
# qdbusxml2cpp
BuildRequires:  libqt4-devel
Summary:        The KDE Runtime Components
License:        GPL-2.0-or-later
Group:          System/GUI/KDE
Url:            http://www.kde.org/
Version:        15.12.0
Release:        0
Source0:        kde-runtime-%{version}.tar.xz
%_mingw64_package_header_debug
BuildArch:      noarch

%description
This package contains all run-time dependencies of KDE applications.

%if %{with_khelpcenter} == 1
%package -n mingw64-khelpcenter
Summary:        KDE helpcenter
Group:          Development/Libraries/KDE
Requires:       %{name} = %{version}

%description -n mingw64-khelpcenter
This package contains khelpcenter
%endif

%package devel
Summary:        Development files for %{name}
Group:          Development/Libraries/KDE
Requires:       %{name} = %{version}

%description devel
This package contains development files and headers needed to
build software using %{name}

%_mingw64_debug_package
%exclude %{_mingw64_kde4_bindir}/khelpcenter.exe.debug

%prep
%autosetup -p1 -n kde-runtime-%{version}

%build
  CMAKE_OPTIONS="-DKDE4_BUILD_TESTS=0 -DDISABLE_ALL_OPTIONAL_SUBDIRS=1 -DBUILD_kuiserver=1 -DBUILD_kdebugdialog=1 -DBUILD_kioslave=1"
  CMAKE_OPTIONS="$CMAKE_OPTIONS -DBUILD_l10n=1 -DBUILD_localization=1 -DBUILD_kwalletd=1 -DBUILD_drkonqi=1"
  CMAKE_OPTIONS="$CMAKE_OPTIONS -DBUILD_kcmshell=1 -DBUILD_kcontrol=1 -DBUILD_locale=1 -DBUILD_trash=1"
  %if %{with_khelpcenter} == 1
      CMAKE_OPTIONS="$CMAKE_OPTIONS -DBUILD_khelpcenter=1"
  %endif
  %_mingw64_cmake_kde4 -d build -- $CMAKE_OPTIONS
  %_mingw64_cmake_build

%install
  %_mingw64_kde4_makeinstall -C build
  rm -rf %{buildroot}/%{_mingw64_kde4_bindir}/kde4

%files
%defattr(-,root,root)
%exclude %{_mingw64_kde4_bindir}/khelpcenter.exe
%{_mingw64_kde4_bindir}/*.exe
%{_mingw64_kde4_bindir}/*.dll
%{_mingw64_kde4_libdir}/kde4/*.dll
%{_mingw64_kde4_datadir}/config/kwinstartmenurc
%{_mingw64_kde4_datadir}/kde4/services/*.desktop
%{_mingw64_kde4_datadir}/kde4/services/*.protocol
%{_mingw64_kde4_datadir}/kde4/services/kded/winstartmenu.desktop
%{_mingw64_kde4_datadir}/applications/kde4/kwinshutdown.desktop
%{_mingw64_kde4_datadir}/locale
# should be provided by mingw64-kde4-filesystem
%dir %{_mingw64_kde4_datadir}/apps/
%dir %{_mingw64_kde4_datadir}/config/
%{_mingw64_kde4_datadir}/dbus-1/interfaces/org.kde.WinStartMenu.xml
%{_mingw64_kde4_datadir}/apps/kconf_update/kwallet-4.13.upd
%dir %{_mingw64_kde4_datadir}/apps/kwalletd
%{_mingw64_kde4_datadir}/apps/kwalletd/kwalletd.notifyrc
%{_mingw64_kde4_datadir}/dbus-1/services/org.kde.kuiserver.service
#for kcm_locale
%dir %{_mingw64_kde4_datadir}/apps/kcmlocale
%dir %{_mingw64_kde4_datadir}/apps/kcmlocale/pics
%{_mingw64_kde4_datadir}/apps/kcmlocale/pics/background.png
# drkonqi
%dir %{_mingw64_kde4_datadir}/apps/drkonqi
%{_mingw64_kde4_datadir}/apps/drkonqi/mappings
%dir %{_mingw64_kde4_datadir}/apps/drkonqi/debuggers
%dir %{_mingw64_kde4_datadir}/apps/drkonqi/debuggers/external
%dir %{_mingw64_kde4_datadir}/apps/drkonqi/debuggers/internal
%{_mingw64_kde4_datadir}/apps/drkonqi/debuggers/external/gdbrc
%{_mingw64_kde4_datadir}/apps/drkonqi/debuggers/external/kdbgrc
%{_mingw64_kde4_datadir}/apps/drkonqi/debuggers/internal/dbxrc
%{_mingw64_kde4_datadir}/apps/drkonqi/debuggers/internal/gdbrc
%{_mingw64_kde4_datadir}/apps/drkonqi/debuggers/internal/kdbgwinrc
%dir %{_mingw64_kde4_datadir}/apps/drkonqi/pics
%{_mingw64_kde4_datadir}/apps/drkonqi/pics/crash.png
%dir %{_mingw64_kde4_datadir}/apps/kconf_update/
%{_mingw64_kde4_datadir}/apps/kconf_update/drkonqi-rename-config-section.upd

%if %{with_khelpcenter} == 1
%files -n mingw64-khelpcenter
%defattr(-,root,root)
%{_mingw64_kde4_bindir}/khelpcenter.exe
%{_mingw64_kde4_datadir}/applications/kde4/Help.desktop
%dir %{_mingw64_kde4_datadir}/apps/khelpcenter
%{_mingw64_kde4_datadir}/apps/khelpcenter/glossary.html.in
%{_mingw64_kde4_datadir}/apps/khelpcenter/glossary.xslt
%{_mingw64_kde4_datadir}/apps/khelpcenter/index.html.in
%{_mingw64_kde4_datadir}/apps/khelpcenter/khelpcenterui.rc
%dir %{_mingw64_kde4_datadir}/apps/khelpcenter/plugins
%dir %{_mingw64_kde4_datadir}/apps/khelpcenter/plugins/Applications
%{_mingw64_kde4_datadir}/apps/khelpcenter/plugins/Applications/.directory
%{_mingw64_kde4_datadir}/apps/khelpcenter/plugins/browsercontrolmodules.desktop
%{_mingw64_kde4_datadir}/apps/khelpcenter/plugins/filemanagercontrolmodules.desktop
%{_mingw64_kde4_datadir}/apps/khelpcenter/plugins/fundamentals.desktop
%{_mingw64_kde4_datadir}/apps/khelpcenter/plugins/info.desktop
%{_mingw64_kde4_datadir}/apps/khelpcenter/plugins/kcontrolmodules.desktop
%{_mingw64_kde4_datadir}/apps/khelpcenter/plugins/kicmodules.desktop
%{_mingw64_kde4_datadir}/apps/khelpcenter/plugins/kioslaves.desktop
%{_mingw64_kde4_datadir}/apps/khelpcenter/plugins/konquerorcontrolmodules.desktop
%{_mingw64_kde4_datadir}/apps/khelpcenter/plugins/onlinehelp.desktop
%{_mingw64_kde4_datadir}/apps/khelpcenter/plugins/othercontrolmodules.desktop
%{_mingw64_kde4_datadir}/apps/khelpcenter/plugins/plasma.desktop
%{_mingw64_kde4_datadir}/apps/khelpcenter/table-of-contents.xslt
%{_mingw64_kde4_datadir}/config.kcfg/khelpcenter.kcfg
%{_mingw64_kde4_datadir}/dbus-1/interfaces/org.kde.khelpcenter.kcmhelpcenter.xml

# add debug package
%endif

%files devel
%{_mingw64_kde4_appsdir}/cmake
%{_mingw64_kde4_libdir}/*.a

%changelog
openSUSE Build Service is sponsored by