Update kf6-extra-cmake-modules.spec

This commit is contained in:
2025-12-11 17:50:25 +08:00
parent 8f3169cfdf
commit d92224c781

View File

@@ -4,21 +4,16 @@
#
# 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}
Name: kf6-extra-cmake-modules
Version: 6.20.0
Release: %autorelease
Summary: CMake modules
Summary: Extra CMake modules and documentation
License: BSD-3-Clause
URL: https://www.kde.org
VCS: git:https://invent.kde.org/frameworks/extra-cmake-modules
@@ -28,35 +23,24 @@ Source1: %{rname}-%{version}.tar.xz.sig
Source2: frameworks.keyring
BuildSystem: cmake
BuildRequires: cmake >= 3.16
BuildRequires: kf6-filesystem
BuildRequires: gcc-c++
BuildRequires: gcc-PIE
Requires: gcc-c++
Requires: gcc-PIE
%if "%{flavor}" == "doc"
BuildRequires: python-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
Requires: gcc-c++
Requires: gcc-PIE
BuildArch: noarch
%description
Extra modules and scripts for CMake.
%if "%{flavor}" == "doc"
This package provides documentation for kf6-extra-cmake-modules
%endif
This package also includes the documentation and man pages for kf6-extra-cmake
-modules.
%build
%cmake_kf6
@@ -66,18 +50,11 @@ This package provides documentation for kf6-extra-cmake-modules
%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}
%{?autochangelog}