File mingw64-extra-cmake-modules.spec of Package mingw64-extra-cmake-modules

#
# spec file for package mingw64-extra-cmake-modules
#
# Copyright (c) 2019 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


%define _tar_path 5.103
# Full KF5 version (e.g. 5.33.0)
%{!?_kf5_version: %global _kf5_version %{version}}
# Last major and minor KF5 version (e.g. 5.33)
%{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')}
%if 0%{?suse_version} >= 1330
%bcond_without doc
%else
%bcond_with doc
%endif
# Only needed for the package signature condition
%bcond_without lang
%define _name   extra-cmake-modules
Name:           mingw64-%{_name}
Version:        5.103.0
Release:        0
Summary:        CMake modules
License:        BSD-3-Clause
Group:          Development/Tools/Other
URL:            https://www.kde.org
Source:         https://download.kde.org/stable/frameworks/%{_tar_path}/%{_name}-%{version}.tar.xz
%if %{with lang}
Source1:        https://download.kde.org/stable/frameworks/%{_tar_path}/%{_name}-%{version}.tar.xz.sig
Source2:        frameworks.keyring
%endif
Patch0:         kf5-add-lib-prefix-to-qml-plugins.patch
BuildRequires:  mingw64-cross-cmake
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-kf5-filesystem
Requires:       icoutils
Requires:       mingw64-cross-cmake
Requires:       mingw64-cross-gcc-c++
Requires:       mingw64-kf5-filesystem
Requires:       mingw64(cmake:Qt5LinguistTools)
Recommends:     %{name}-doc
Provides:       mingw64-kf5umbrella = 4.99.0
Obsoletes:      mingw64-kf5umbrella < 4.99.0
%if %{with doc}
BuildRequires:  python3-Sphinx
%endif

%_mingw64_package_header_debug
BuildArch:      noarch

%description
Extra modules and scripts for CMake.

For more information see https://community.kde.org/KDE_Core/Platform_11/Buildsystem/FindFilesSurvey

%package doc
Summary:        Documentation for extra-cmake-modules
Group:          Documentation/Other
Requires:       mingw64-%{name} = %{version}
BuildArch:      noarch

%description doc
Extra modules and scripts for CMake.

For more information see https://community.kde.org/KDE_Core/Platform_11/Buildsystem/FindFilesSurvey
This package provides documentation for extra-cmake-modules

%prep
%autosetup -p1 -n %{_name}-%{version}

%build
  %_mingw64_cmake_kf5 -d build
  %_mingw64_cmake_build

%install
  %_mingw64_kf5_makeinstall -C build
  find %{buildroot} -type f -name '*.orig' -exec rm {} \;

%files
%{_mingw64_datadir}/ECM/

%if %{with doc}
%files doc
%doc %{_mingw64_datadir}/doc/ECM/
%doc %lang(en) %{_mingw64_mandir}/man7/ecm*.7*
%endif

%changelog
openSUSE Build Service is sponsored by