%global debug_package %{nil} Name: cli11 Version: 2.7.2 Release: 1%{?dist} Summary: Command line parser for C++11 License: BSD-3-Clause URL: https://github.com/CLIUtils/CLI11 Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: make BuildRequires: boost-devel BuildRequires: Catch2-devel Requires: %{name}-devel = %{version}-%{release} %description CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface. It is header-only, has no external dependencies beyond the standard library, and ships CMake and pkg-config integration files. %package devel Summary: Development files for %{name} Provides: %{name}-static = %{version}-%{release} %description devel CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface. This package contains the header-only library, the CMake package configuration (find_package(CLI11)) and the pkg-config file. %prep # topdir: %{name}-%{version}(源码 tarball 顶层目录,由 build 流程 --transform 统一) %autosetup -p1 -n %{name}-%{version} %build %cmake \ -DCLI11_BUILD_TESTS:BOOL=OFF \ -DCLI11_BUILD_DOCS:BOOL=OFF \ -DCLI11_BUILD_EXAMPLES:BOOL=OFF \ -DCLI11_SINGLE_FILE:BOOL=OFF \ -DCLI11_PRECOMPILED:BOOL=OFF \ -DCLI11_MODULES:BOOL=OFF \ -DCMAKE_CXX_STANDARD=11 # openEuler 24.03 的 cmake 配置宏是历史遗留的 IN-SOURCE 宏(不传 -S/-B,构建文件 # 落在解包后的源码目录),而同一宏集的 cmake_build / cmake_install 引用的是 # out-of-source 的 _vpath_builddir(本目标 chroot 为 aarch64-openEuler-linux-gnu), # configure 从未创建该目录,直接用会报 "is not a directory"。显式驱动已配置好的 # in-source 树(与同项目 libopen3d-dev 的已验证处置一致)。 %{__cmake} --build . %{?_smp_mflags} --verbose %install DESTDIR=%{buildroot} %{__cmake} --install . %files %license LICENSE %doc README.md CHANGELOG.md %files devel %{_includedir}/CLI/ %{_datadir}/cmake/CLI11/ %{_datadir}/pkgconfig/CLI11.pc %changelog * Tue Sep 22 2026 openEuler Builder - 2.7.2-1 - Initial package, based on the openEuler cli11 2.2.0 reference spec - Header-only library; tests/docs/examples disabled in %%build