## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 6; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: gulrak-filesystem Version: 1.5.14 Release: %autorelease Summary: Implementation of C++17 std::filesystem for C++11/14/17/20 # SPDX License: MIT URL: https://github.com/gulrak/filesystem Source: %{url}/archive/v%{version}/filesystem-%{version}.tar.gz # Fix CMake config mode package finding # https://github.com/gulrak/filesystem/pull/129 # Rebased on v1.5.14. Patch: 0001-Fix-CMake-config-mode-package-finding.patch # Also fix package name in the CMake config template (TODO: offer upstream) Patch: 0002-Also-fix-package-name-in-the-CMake-config-template.patch BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: make # Consider migrating to Catch2 v3 # https://github.com/gulrak/filesystem/issues/165 BuildRequires: pkgconfig(catch2) < 3 # No compiled binaries are installed, so this would be empty. %global debug_package %{nil} %global common_description %{expand: This is a header-only single-file std::filesystem compatible helper library, based on the C++17 and C++20 specs, but implemented for C++11, C++14, C++17 or C++20 (tightly following the C++17 standard with very few documented exceptions). It is currently tested on macOS 10.12/10.14/10.15, Windows 10, Ubuntu 18.04, Ubuntu 20.04, CentOS 7, CentOS 8, FreeBSD 12 and Alpine ARM/ARM64 Linux but should work on other systems too, as long as you have at least a C++11 compatible compiler. It should work with Android NDK, Emscripten and I even had reports of it being used on iOS (within sandboxing constraints) and with v1.5.6 there is experimental support for QNX. The support of Android NDK, Emscripten and QNX is not backed up by automated testing but PRs and bug reports are welcome for those too. It is of course in its own namespace ghc::filesystem to not interfere with a regular std::filesystem should you use it in a mixed C++17 environment (which is possible).} %description %{common_description} %package devel Summary: Development files for %{name} # Header-only library Provides: %{name}-static = %{version}-%{release} %description devel %{common_description} The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %autosetup -n filesystem-%{version} -p1 # Remove bundled Catch library and use the system version rm -vf test/catch.hpp sed -r -i 's|(include[[:blank:]]+")(catch.hpp")|\1catch2/\2|' test/*.cpp sed -r -i 's|[[:blank:]]+catch\.hpp||' test/CMakeLists.txt %build %cmake %cmake_build %install %cmake_install %check %ctest %files devel %license LICENSE %doc README.md %doc examples/ %{_includedir}/ghc/ %{_libdir}/cmake/ghc_filesystem/ %changelog * Mon Sep 18 2023 Benjamin A. Beasley - 1.5.14-6 - Also fix package name in the CMake config template * Sun Sep 17 2023 Benjamin A. Beasley - 1.5.14-5 - Fix CMake config mode package finding * Thu Jul 20 2023 Fedora Release Engineering - 1.5.14-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Fri May 26 2023 Benjamin A. Beasley - 1.5.14-3 - Add trailing slashes to listed directories * Mon Mar 06 2023 Benjamin A. Beasley - 1.5.14-1 - Update to 1.5.14 (close RHBZ#2175562) * Tue Feb 28 2023 Benjamin A. Beasley - 1.5.12-5 - Ensure the catch2 (v2.x) compat package is used for tests * Thu Jan 19 2023 Fedora Release Engineering - 1.5.12-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Aug 05 2022 Benjamin A. Beasley - 1.5.12-3 - Confirm that License is SPDX MIT (no License field change) * Thu Jul 21 2022 Fedora Release Engineering - 1.5.12-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Apr 04 2022 Benjamin A. Beasley - 1.5.12-1 - Fix missed version bump in spec file * Mon Apr 04 2022 Benjamin A. Beasley - 1.5.10-5 - Update to 1.5.12 (close RHBZ#2071462) * Thu Feb 24 2022 Benjamin A. Beasley - 1.5.10-4 - Fix URL field and drop “forge” macros * Thu Jan 20 2022 Fedora Release Engineering - 1.5.10-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Dec 14 2021 Benjamin A. Beasley - 1.5.10-2 - Dep. on cmake-filesystem is now auto-generated * Sun Oct 24 2021 Benjamin A. Beasley - 1.5.10-1 - Update to 1.5.10 * Tue Aug 17 2021 Benjamin A. Beasley - 1.5.8-1 - Initial package