File mingw64-kdewin.spec of Package mingw64-kdewin
#
# spec file for package mingw64-kdewin
#
# Copyright (c) 2014 Ralf Habacker
#
# 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 _with_qt4 0
%define _with_qt5 0
Name: mingw64-kdewin
Version: 0.6.0
Release: 0
Source0: kdewin-%{version}.tar.xz
BuildRequires: automoc4
BuildRequires: mingw64-cross-cmake
BuildRequires: mingw64-cross-gcc-c++
BuildRequires: mingw64-filesystem
%if %{_with_qt4}
BuildRequires: mingw64-cross-qmake
BuildRequires: mingw64-libqt4-filesystem
BuildRequires: mingw64-libqt4-devel
%endif
%if %{_with_qt5}
BuildRequires: mingw64-libqt5-qtbase-devel
BuildRequires: mingw64-libqt5-qtsvg-devel
BuildRequires: mingw64-libqt5-qtsvg
%endif
BuildRequires: xz
%_mingw64_package_header_debug
Url: https://projects.kde.org/kdewin
BuildArch: noarch
#!BuildIgnore: post-build-checks
Summary: The KDE Windows support library
License: GPL-2.0-or-later
Group: Development/Libraries/C and C++
%description
KDEWin is a supplementary library and provides supplementary tools which are required for compiling KDE applications on Windows.
%if %{_with_qt4}
%package qt4
Summary: The KDE Windows qt based support libraries
Group: Development/Libraries/C and C++
Requires: mingw64-libqt4
%description qt4
KDEWin is a supplementary library and provides supplementary tools which are required for compiling KDE applications on Windows.
%endif
%if %{_with_qt5}
%package qt5
Summary: The KDE Windows qt based support libraries
Group: Development/Libraries/C and C++
Requires: mingw64-libqt5-qtbase
%description qt5
KDEWin is a supplementary library and provides supplementary tools which are required for compiling KDE applications on Windows.
%endif
%package devel
Summary: The KDE Windows support library
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%if %{_with_qt4}
Requires: %{name}-qt4
%endif
%if %{_with_qt5}
Requires: %{name}-qt5
%endif
%description devel
KDEWin is a supplementary library and provides supplementary tools which are required for compiling KDE applications on Windows.
%_mingw64_debug_package
%prep
%setup -q -n kdewin-%{version}
%build
rm -rf CMakeCache.txt
%if %{_with_qt4}
%_mingw64_cmake_qt4 -d build-qt4 -DBUILD_BASE_LIB_WITH_QT=ON -DBUILD_QT_LIB=ON -DMINGW_W32=ON
cd ..
%else
%_mingw64_cmake -DBUILD_BASE_LIB_WITH_QT=OFF -DBUILD_QT_LIB=OFF -DMINGW_W32=ON
%endif
%if %{_with_qt5}
mkdir build-qt5
cd build-qt5
%_mingw64_cmake -DBUILD_BASE_LIB_WITH_QT=ON -DBUILD_QT_LIB=ON -DMINGW_W32=ON
%endif
%_mingw64_cmake_build
%install
%_mingw64_cmake_install
rm %{buildroot}/%{_mingw64_libdir}/libwbemuuid.a
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_mingw64_bindir}/libkdewin.dll
%{_mingw64_prefix}/share/doc/kdewin-*/readme.txt
%if %{_with_qt4}
%files qt4
%defattr(-,root,root,-)
%{_mingw64_bindir}/libkdewin-qt.dll
%endif
%if %{_with_qt5}
%files qt4
%defattr(-,root,root,-)
%{_mingw64_bindir}/libkdewin-qt.dll
%endif
%files devel
%defattr(-,root,root,-)
%{_mingw64_datadir}/apps/cmake/modules/FindKDEWin.cmake
%{_mingw64_datadir}/apps/cmake/modules/FindKDEWIN32.cmake
%{_mingw64_datadir}/apps/cmake/modules/FindKDEWIN_Packager.cmake
%{_mingw64_libdir}/cmake/KDEWin/KDEWinTargets.cmake
%{_mingw64_libdir}/cmake/KDEWin/KDEWinConfig.cmake
%{_mingw64_libdir}/cmake/KDEWin/KDEWinConfigVersion.cmake
%{_mingw64_libdir}/cmake/KDEWin/KDEWinTargets-relwithdebinfo.cmake
%{_mingw64_includedir}/*
%{_mingw64_libdir}/pkgconfig/kdewin.pc
%if %{_with_qt4}
%{_mingw64_libdir}/libkdewin-qt-static.a
%{_mingw64_libdir}/libkdewin-qt.dll.a
%endif
%if %{_with_qt5}
%{_mingw64_libdir}/libkdewin-qt-static.a
%{_mingw64_libdir}/libkdewin-qt.dll.a
%endif
%{_mingw64_libdir}/libkdewin.dll.a
%changelog