From 3fece970c5abb44f555e97bf150ce08224d33c0c Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Tue, 22 Sep 2026 07:59:47 +0000 Subject: automatic import of cli11 --- .gitignore | 1 + cli11.spec | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 78 insertions(+) create mode 100644 cli11.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..899dd9e 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/cli11-2.7.2.tar.gz diff --git a/cli11.spec b/cli11.spec new file mode 100644 index 0000000..6811ca0 --- /dev/null +++ b/cli11.spec @@ -0,0 +1,76 @@ +%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 diff --git a/sources b/sources new file mode 100644 index 0000000..7472f6d --- /dev/null +++ b/sources @@ -0,0 +1 @@ +0d618d522f3f89cc628517d8753b41d9 cli11-2.7.2.tar.gz -- cgit v1.2.3