public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/cxxopts] epel10.3: Initial import (#1820895).
@ 2026-09-22 1:32 Vitaly Zaitsev
0 siblings, 0 replies; only message in thread
From: Vitaly Zaitsev @ 2026-09-22 1:32 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/cxxopts
Branch : epel10.3
Commit : d5417ae78d2254c877bd2c4baa95b3b41c57df5e
Author : Vitaly Zaitsev <vitaly@easycoding.org>
Date : 2020-04-05T18:11:05+02:00
Stats : +91/-0 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/cxxopts/c/d5417ae78d2254c877bd2c4baa95b3b41c57df5e?branch=epel10.3
Log:
Initial import (#1820895).
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ee16266
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/cxxopts-2.2.0.tar.gz
diff --git a/cxxopts-fix-installation.patch b/cxxopts-fix-installation.patch
new file mode 100644
index 0000000..bbeb198
--- /dev/null
+++ b/cxxopts-fix-installation.patch
@@ -0,0 +1,26 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 440490b..2faafba 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -70,8 +70,9 @@ target_include_directories(cxxopts INTERFACE
+ $<INSTALL_INTERFACE:include>
+ )
+
++include(GNUInstallDirs)
+ include(CMakePackageConfigHelpers)
+-set(CXXOPTS_CMAKE_DIR "lib/cmake/cxxopts" CACHE STRING
++set(CXXOPTS_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/cxxopts" CACHE STRING
+ "Installation directory for cmake files, relative to ${CMAKE_INSTALL_PREFIX}.")
+ set(version_config "${PROJECT_BINARY_DIR}/cxxopts-config-version.cmake")
+ set(project_config "${PROJECT_BINARY_DIR}/cxxopts-config.cmake")
+@@ -97,8 +98,8 @@ install(EXPORT ${targets_export_name} DESTINATION ${CXXOPTS_CMAKE_DIR}
+ NAMESPACE cxxopts::)
+
+ # Install the header file and export the target
+-install(TARGETS cxxopts EXPORT ${targets_export_name} DESTINATION lib)
+-install(FILES ${PROJECT_SOURCE_DIR}/include/cxxopts.hpp DESTINATION include)
++install(TARGETS cxxopts EXPORT ${targets_export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(FILES ${PROJECT_SOURCE_DIR}/include/cxxopts.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+
+ add_subdirectory(src)
+ add_subdirectory(test)
diff --git a/cxxopts.spec b/cxxopts.spec
new file mode 100644
index 0000000..0727ea8
--- /dev/null
+++ b/cxxopts.spec
@@ -0,0 +1,63 @@
+%global debug_package %{nil}
+
+Name: cxxopts
+Version: 2.2.0
+Release: 1%{?dist}
+
+Summary: Lightweight C++ command line option parser
+License: MIT
+URL: https://github.com/jarro2783/%{name}
+Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
+
+# https://github.com/jarro2783/cxxopts/pull/226
+Patch100: %{name}-fix-installation.patch
+
+BuildRequires: ninja-build
+BuildRequires: gcc-c++
+BuildRequires: cmake
+
+%description
+CXXOpts is a lightweight C++ option parser library, supporting the standard
+GNU style syntax for options.
+
+%package devel
+Summary: Development files for %{name}
+Provides: %{name}-static%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
+Provides: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
+Requires: libstdc++-devel%{?_isa}
+
+%description devel
+%{summary}.
+
+%prep
+%autosetup -p1
+mkdir -p %{_target_platform}
+
+%build
+pushd %{_target_platform}
+ %cmake -G Ninja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCXXOPTS_ENABLE_INSTALL=ON \
+ -DCXXOPTS_BUILD_EXAMPLES=OFF \
+ -DCXXOPTS_BUILD_TESTS=ON \
+ ..
+popd
+%ninja_build -C %{_target_platform}
+
+%check
+pushd %{_target_platform}
+ ctest --output-on-failure
+popd
+
+%install
+%ninja_install -C %{_target_platform}
+
+%files devel
+%doc README.md
+%license LICENSE
+%{_includedir}/%{name}.hpp
+%{_libdir}/cmake/%{name}/
+
+%changelog
+* Sat Apr 04 2020 Vitaly Zaitsev <vitaly@easycoding.org> - 2.2.0-1
+- Initial SPEC release.
diff --git a/sources b/sources
new file mode 100644
index 0000000..f94782e
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (cxxopts-2.2.0.tar.gz) = 9f5182b3a86b3d47d1ce5e1e222ab596fce59d3b2dcc0ab2c3802338d5e0f3e6556f2a5ff2accb32cae7e2db41ac5a361c93bf0256f9e44c316eaa4b47c19efa
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-22 1:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-22 1:32 [rpms/cxxopts] epel10.3: Initial import (#1820895) Vitaly Zaitsev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox