## START: Set by rpmautospec ## (rpmautospec version 0.8.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; 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 %bcond tests 1 %bcond rebuild_yaml_data 0 # Upstream defaults to C++11, but gtest 1.17.0 requires C++17 or later. %global cxx_std 17 Name: rapidyaml Summary: A library to parse and emit YAML, and do it fast Version: 0.11.1 # This is the same as the version number. To prevent undetected soversion # bumps, we nevertheless express it separately. %global so_version 0.11.1 Release: %autorelease # SPDX License: MIT URL: https://github.com/biojppm/rapidyaml Source0: %{url}/archive/v%{version}/rapidyaml-%{version}.tar.gz # Read this from the unpatched original test/CMakeLists.txt: # c4_download_remote_proj(yaml-test-suite … GIT_TAG ) %global yamltest_url https://github.com/yaml/yaml-test-suite %global yamltest_date 2022-01-17 # Data for testing the correctness of YAML processors. This is used only for # testing; it is not bundled in the binary RPMs. This is “are available in 2 # forms. Files in the src directory encode all the data for YAML using YAML. # The data from these tests is also available in a form where each test has its # own directory.” We use the latter form, but the former is the original source # and contains the (MIT) LICENSE file. # Data for testing the correctness of YAML processors. This is used only for Source1: %{yamltest_url}/archive/data-%{yamltest_date}/yaml-test-suite-data-%{yamltest_date}.tar.gz Source2: %{yamltest_url}/archive/v%{yamltest_date}/yaml-test-suite-%{yamltest_date}.tar.gz # Helper script to patch out unconditional download of dependencies in CMake Source10: patch-no-download # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: gcc-c++ BuildRequires: cmake # Minimum version with fix to ensure ${upper_prefix}_VERSION is set, eg # RYML_VERSION or C4CORE_VERSION. BuildRequires: c4project >= 0^20260326.1e65b7b-1 # CMake builds in Fedora now use the ninja backend by default, but the Python # extension build unconditionally uses ninja, so we’re explicit: BuildRequires: ninja-build BuildRequires: cmake(c4core) >= 0.2.10 %if %{with tests} BuildRequires: cmake(c4fs) BuildRequires: cmake(c4log) BuildRequires: cmake(gtest) %endif # A Python 3 interpreter is required unconditionally for the patch-no-download # script. BuildRequires: python3-devel # The Python bindings, https://pypi.org/project/rapidyaml/, were moved to a # separate repository, https://github.com/biojppm/rapidyaml-python, as of # rapidyaml 0.11.1. Since python3-rapidyaml was a leaf (sub)package in Fedora, # we have dropped it beginning with Fedora 45. This upgrade path can be removed # after Fedora 47. If it turns out that the Python bindings are needed for # something in the future, then they should be submitted and reviewed as a # separate python-rapidyaml source package. Obsoletes: python3-rapidyaml < 0.11.1-1 %if %{with rebuild_yaml_data} # See bin/suite-to-data in Source1. BuildRequires: bash >= 4.4 BuildRequires: perl >= 5.28 BuildRequires: perl(YAML::PP) >= 0.030 %endif %global common_description %{expand: \ Rapid YAML, or ryml, for short. ryml is a C++ library to parse and emit YAML, and do it fast, on everything from x64 to bare-metal chips without operating system. (If you are looking to use your programs with a YAML tree as a configuration tree with override facilities, take a look at c4conf).} %description %{common_description} %package devel Summary: Development files for Rapid YAML Requires: rapidyaml%{?_isa} = %{version}-%{release} Requires: c4core-devel%{?_isa} # https://docs.fedoraproject.org/en-US/packaging-guidelines/Conflicts/#_compat_package_conflicts Conflicts: rapidyaml0.10.0-devel %description devel %{common_description} The rapidyaml-devel package contains libraries and header files for developing applications that use Rapid YAML. %prep %autosetup -p1 # Remove/unbundle additional dependencies # c4project (CMake build scripts) rm -rvf ext/c4core/cmake cp -rvp %{_datadir}/cmake/c4project ext/c4core/cmake # Patch out download of gtest: '%{SOURCE10}' 'ext/c4core/cmake/c4Project.cmake' \ '^ if\(_GTEST\)' '^ endif' # Patch out download of c4core: '%{SOURCE10}' 'CMakeLists.txt' 'c4_require_subproject\(c4core' '\)$' # Use external c4core sed -r -i '/INCORPORATE c4core/d' 'CMakeLists.txt' # Patch out download of c4fs: '%{SOURCE10}' 'ext/testbm.cmake' 'c4_download_remote_proj\(c4fs' '\)$' '%{SOURCE10}' 'ext/testbm.cmake' 'c4_add_library\(c4fs' '\)$' # Patch out download of c4log '%{SOURCE10}' 'test/CMakeLists.txt' \ 'c4_require_subproject\(c4(log)' '\)$' # Patch out download of yaml-test-suite: '%{SOURCE10}' 'test/CMakeLists.txt' \ 'c4_download_remote_proj\(yaml-test-suite' '\)$' sed -r -i \ 's@([[:blank:]]*)set\(tsdir.*\).*@&\nset\(suite_dir test/extern/yaml-test-suite\)\1@' \ 'test/CMakeLists.txt' mkdir -p 'test/extern/' # Original sources (including LICENSE) %setup -q -T -D -b 1 -n rapidyaml-%{version} # Data in the form rapidyaml needs it %setup -q -T -D -b 2 -n rapidyaml-%{version} mv '../yaml-test-suite-data-%{yamltest_date}' 'test/extern/yaml-test-suite' %conf %if %{with rebuild_yaml_data} # We need to rebuild the test data before running CMake configuration, since it # checks to be sure it is present. pushd ../yaml-test-suite-%{yamltest_date} mkdir -p data perl bin/suite-to-data.pl src/*.yaml popd # Remove the pre-generated data from Source2 and replace it with the data we # rebuilt from Source1. rm -rv test/extern/yaml-test-suite mv ../yaml-test-suite-%{yamltest_date}/data test/extern/yaml-test-suite %endif # Disable RYML_TEST_FUZZ so that we do not have to include the contents of # https://github.com/biojppm/rapidyaml-data (and document the licenses of the # contents). We *could* do so, and add an additional source similar to the one # for yaml-test-suite, but running these test cases downstream doesn’t seem # important enough to bother. %cmake -GNinja \ -DRYML_CXX_STANDARD=%{cxx_std} \ -DRYML_BUILD_TESTS:BOOL=%{?with_tests:ON}%{?!with_tests:OFF} \ -DRYML_TEST_FUZZ:BOOL=OFF %build %cmake_build %install %cmake_install # Fix wrong installation paths for multilib; it would be nontrivial to patch # the source to get this right in the first place. The installation path is # determined by the scripts in https://github.com/biojppm/cmake, packaged as # c4project. # # Installation directory on Linux 64bit OS # https://github.com/biojppm/rapidyaml/issues/256 if [ '%{_libdir}' != '%{_prefix}/lib' ] then mkdir -p '%{buildroot}%{_libdir}' mv -v %{buildroot}%{_prefix}/lib/libryml.so* '%{buildroot}%{_libdir}/' mkdir -p '%{buildroot}%{_libdir}/cmake' mv -v %{buildroot}%{_prefix}/lib/cmake/ryml '%{buildroot}%{_libdir}/cmake/' find %{buildroot}%{_libdir}/cmake/ryml -type f -name '*.cmake' -print0 | xargs -r -t -0 sed -r -i "s@/lib/@/$(basename '%{_libdir}')/@" fi # We don’t believe this will be useful on Linux. See: # https://docs.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/natvis rm -vf '%{buildroot}%{_includedir}/ryml.natvis' %check %if %{with tests} %cmake_build --target ryml-test-run-verbose %endif %files %license LICENSE.txt %doc README.md %{_libdir}/libryml.so.%{so_version} %files devel %{_includedir}/ryml.hpp %{_includedir}/ryml_std.hpp # %%{_includedir}/c4 is owned by c4core-devel, upon which this package depends %{_includedir}/c4/yml/ %{_libdir}/libryml.so %dir %{_libdir}/cmake/ryml %{_libdir}/cmake/ryml/*.cmake %changelog ## START: Generated by rpmautospec * Mon Mar 30 2026 Benjamin A. Beasley - 0.11.1-2 - Add Conflicts between rapidyaml-devel and rapidyaml0.10.0-devel * Sat Mar 28 2026 Benjamin A. Beasley - 0.11.1-1 - Update to 0.11.1 (close RHBZ#2451796) - Drop and Obsolete the Python bindings, now maintained upstream in a separate repository * Thu Mar 26 2026 Benjamin A. Beasley - 0.11.0-4 - Backport upstream fix for unset RYML_VERSION in rymlConfig.cmake * Thu Mar 26 2026 Benjamin A. Beasley - 0.11.0-2 - Fix empty RYML_VERSION in rymlConfig.cmake (fix RHBZ#2451572) * Sun Mar 15 2026 Benjamin A. Beasley - 0.11.0-1 - Update to 0.11.0 (close RHBZ#2447336) * Thu Mar 12 2026 Benjamin A. Beasley - 0.10.0-5 - Rebuilt with fast_float 8.2.4 (for performance improvements) * Mon Jan 26 2026 Benjamin A. Beasley - 0.10.0-4 - Rebuilt for c4core 0.2.8 * Sat Jan 17 2026 Fedora Release Engineering - 0.10.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild * Mon Nov 03 2025 Benjamin A. Beasley - 0.10.0-2 - Build as C++17 for gtest 1.17 compatibility * Wed Oct 01 2025 Benjamin A. Beasley - 0.10.0-1 - Update to 0.10.0 (close RHBZ#2400546) * Mon Sep 29 2025 Benjamin A. Beasley - 0.9.0-7 - Rebuilt for c4core 0.2.7 * Fri Sep 19 2025 Python Maint - 0.9.0-6 - Rebuilt for Python 3.14.0rc3 bytecode * Fri Aug 15 2025 Python Maint - 0.9.0-5 - Rebuilt for Python 3.14.0rc2 bytecode * Fri Jul 25 2025 Fedora Release Engineering - 0.9.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Tue Jun 03 2025 Python Maint - 0.9.0-3 - Rebuilt for Python 3.14 * Sat May 10 2025 Benjamin A. Beasley - 0.9.0-2 - Do the Python import-only smoke-test even when tests are enabled * Fri Apr 11 2025 Benjamin A. Beasley - 0.9.0-1 - Update to 0.9.0 (close RHBZ#2358956) * Sat Feb 15 2025 Benjamin A. Beasley - 0.8.0-1 - Update to 0.8.0 (close RHBZ#2345901) * Sat Feb 15 2025 Benjamin A. Beasley - 0.7.2-9 - Rebuilt for c4core 0.2.5 * Tue Feb 11 2025 Benjamin A. Beasley - 0.7.2-8 - Rebuilt for c4core 0.2.4 * Sun Feb 09 2025 Benjamin A. Beasley - 0.7.2-7 - Rebuilt (and trivially patched) for c4core 0.2.3 * Sat Jan 18 2025 Fedora Release Engineering - 0.7.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Wed Jan 15 2025 Benjamin A. Beasley - 0.7.2-5 - Drop i686 support beginning with Fedora 42 * Sun Dec 15 2024 Benjamin A. Beasley - 0.7.2-4 - Support rebuilding YAML test data from original sources - Don’t do it for now since it brings in extra Perl dependencies, and there’s no obvious benefit. * Sun Dec 15 2024 Benjamin A. Beasley - 0.7.2-3 - Include original sources and LICENSE file for YAML test suite data * Sun Nov 03 2024 Benjamin A. Beasley - 0.7.2-2 - Invoke %%cmake in %%conf rather than in %%build * Wed Aug 28 2024 Benjamin A. Beasley - 0.7.2-1 - Update to 0.7.2 * Fri Aug 23 2024 Benjamin A. Beasley - 0.7.1-2 - Patch for 0.7.1 tests failing in ppc64le with -O2 * Fri Aug 16 2024 Benjamin A. Beasley - 0.7.1-1 - Update to 0.7.1 (close RHBZ#2292045) * Fri Jul 19 2024 Fedora Release Engineering - 0.6.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sat Jun 08 2024 Python Maint - 0.6.0-2 - Rebuilt for Python 3.13 * Mon Apr 29 2024 Benjamin A. Beasley - 0.6.0-1 - Update to 0.6.0 * Fri Jan 26 2024 Fedora Release Engineering - 0.5.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 0.5.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Tue Dec 19 2023 Benjamin A. Beasley - 0.5.0-10 - Assert that %%pyproject_files contains a license file * Fri Jul 21 2023 Fedora Release Engineering - 0.5.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Sun Jul 16 2023 Benjamin A. Beasley - 0.5.0-8 - Fix wrong multilib library paths in .cmake files (fix RHBZ#2223194) * Fri Jul 07 2023 Benjamin A. Beasley - 0.5.0-7 - Use new (rpm 4.17.1+) bcond style * Thu Jun 15 2023 Python Maint - 0.5.0-6 - Rebuilt for Python 3.12 * Sat Jun 03 2023 Benjamin A. Beasley - 0.5.0-5 - Remove explicit %%set_build_flags, not needed since F36 * Thu May 25 2023 Benjamin A. Beasley - 0.5.0-4 - Reference upstream bug for multilib install path * Mon Jan 30 2023 Benjamin A. Beasley - 0.5.0-3 - Build as C++14 instead of C++11 (for gtest 1.13.0) * Fri Jan 20 2023 Fedora Release Engineering - 0.5.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Mon Dec 19 2022 Benjamin A. Beasley - 0.5.0-1 - Update to 0.5.0 * Thu Sep 08 2022 Benjamin A. Beasley - 0.4.1-6 - Rebuild for c4core 0.1.10 * Wed Sep 07 2022 Benjamin A. Beasley - 0.4.1-5 - BR python3-devel even when building without Python support * Sun Sep 04 2022 Benjamin A. Beasley - 0.4.1-4 - Improve “python” build conditional * Wed Aug 31 2022 Benjamin A. Beasley - 0.4.1-3 - Drop python-setuptools_git BR * Wed Aug 31 2022 Benjamin A. Beasley - 0.4.1-2 - Note that License is SPDX MIT * Tue Aug 30 2022 Benjamin A. Beasley - 0.4.1-1 - Initial package (close RHBZ#2115417) ## END: Generated by rpmautospec