86 lines
2.1 KiB
RPMSpec
86 lines
2.1 KiB
RPMSpec
# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS)
|
|
# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors
|
|
# SPDX-FileContributor: jingyupu <pujingyu@iscas.ac.cn>
|
|
#
|
|
# SPDX-License-Identifier: MulanPSL-2.0
|
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
%if "%{flavor}" == "doc"
|
|
%global pkg_suffix -doc
|
|
%endif
|
|
|
|
%define rname extra-cmake-modules
|
|
|
|
# Full KF6 version (e.g. 6.20.0)
|
|
%{!?_kf6_version: %global _kf6_version %{version}}
|
|
%bcond_without doc
|
|
%bcond_without released
|
|
Name: kf6-extra-cmake-modules%{?pkg_suffix}
|
|
Version: 6.20.0
|
|
Release: %autorelease
|
|
Summary: CMake modules
|
|
License: BSD-3-Clause
|
|
URL: https://www.kde.org
|
|
VCS: git:https://invent.kde.org/frameworks/extra-cmake-modules
|
|
#!RemoteAsset
|
|
Source1: https://invent.kde.org/frameworks/extra-cmake-modules/-/archive/v%{version}/extra-cmake-modules-v%{version}.tar.xz
|
|
Source2: %{rname}-%{version}.tar.xz.sig
|
|
Source3: frameworks.keyring
|
|
BuildSystem: cmake
|
|
|
|
|
|
BuildRequires: cmake >= 3.16
|
|
BuildRequires: kf6-filesystem
|
|
BuildRequires: gcc15-c++
|
|
BuildRequires: gcc15-PIE
|
|
Requires: gcc15-c++
|
|
Requires: gcc15-PIE
|
|
%if "%{flavor}" == "doc"
|
|
BuildRequires: python3-Sphinx
|
|
%endif
|
|
%if "%{flavor}" != "doc"
|
|
Requires: cmake >= 3.16
|
|
Requires: kf6-filesystem
|
|
Recommends: kf6-extra-cmake-modules-doc
|
|
Provides: extra-cmake-modules = %{version}
|
|
Obsoletes: extra-cmake-modules < %{version}
|
|
%else
|
|
Provides: extra-cmake-modules-doc = %{version}
|
|
Obsoletes: extra-cmake-modules-doc < %{version}
|
|
%endif
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
Extra modules and scripts for CMake.
|
|
%if "%{flavor}" == "doc"
|
|
|
|
This package provides documentation for kf6-extra-cmake-modules
|
|
%endif
|
|
|
|
%prep
|
|
%autosetup -p1 -n %{rname}-%{version}
|
|
|
|
%build
|
|
%cmake_kf6
|
|
|
|
%kf6_build
|
|
|
|
%install
|
|
%kf6_install
|
|
|
|
%if "%{flavor}" == "doc"
|
|
rm -r %{buildroot}%{_datadir}/ECM
|
|
%endif
|
|
|
|
%files
|
|
%if "%{flavor}" != "doc"
|
|
%license LICENSES/*
|
|
%{_datadir}/ECM/
|
|
%else
|
|
%doc %{_datadir}/doc/ECM/
|
|
%doc %lang(en) %{_mandir}/man7/ecm*.7*
|
|
%endif
|
|
|
|
%changelog
|
|
%{?autochangelog}
|