Name: yaml-cpp Version: 0.7.0 Release: 2 Summary: A YAML parser and emitter in C++. License: MIT URL: https://github.com/jbeder/yaml-cpp Source0: https://github.com/jbeder/yaml-cpp/archive/%{name}-%{version}.tar.gz Patch0001: yaml-cpp-cmake.patch BuildRequires: cmake gcc gcc-c++ %description yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec. %package devel Summary: Development files for yaml-cpp Requires: yaml-cpp = %{version}-%{release} boost-devel pkgconfig Provides: yaml-cpp-static = %{version}-%{release} Obsoletes: yaml-cpp-static < %{version}-%{release} %description devel This package contains libraries and header files for developing applications that use yaml-cpp. %prep %autosetup -n %{name}-%{name}-%{version} -p1 %build %cmake -B build_static \ -DCMAKE_BUILD_TYPE=Release \ -DYAML_CPP_BUILD_TOOLS:BOOL=OFF \ -DYAML_CPP_FORMAT_SOURCE:BOOL=OFF \ -DYAML_CPP_INSTALL:BOOL=ON \ -DYAML_BUILD_SHARED_LIBS:BOOL=OFF \ -DYAML_CPP_BUILD_TESTS:BOOL=OFF %make_build -C build_static %cmake -B build_shared \ -DCMAKE_BUILD_TYPE=Release \ -DYAML_CPP_BUILD_TOOLS:BOOL=OFF \ -DYAML_CPP_FORMAT_SOURCE:BOOL=OFF \ -DYAML_CPP_INSTALL:BOOL=ON \ -DYAML_BUILD_SHARED_LIBS:BOOL=ON \ -DYAML_CPP_BUILD_TESTS:BOOL=OFF %make_build -C build_shared %install %make_install -C build_static yaml-cpp # Move files so they don't get trampled mv %{buildroot}%{_libdir}/cmake/%{name} \ %{buildroot}%{_libdir}/cmake/%{name}-static mv %{buildroot}%{_libdir}/pkgconfig/%{name}.pc \ %{buildroot}%{_libdir}/pkgconfig/%{name}-static.pc %make_install -C build_shared %post /sbin/ldconfig %postun /sbin/ldconfig %files %license LICENSE %doc README.md %{_libdir}/*.so.* %files devel %{_libdir}/*.so %{_libdir}/*.a %{_includedir}/yaml-cpp/ %{_libdir}/cmake/ %{_libdir}/pkgconfig/ %changelog * Tue Sep 05 2023 yaoxin - 0.7.0-2 - Fix cmake error of referencing yaml-cpp-devel and remove unused patch * Thu Jul 06 2023 yaoxin - 0.7.0-1 - Update to 0.7.0 - Abi change: libyaml-cpp.so.0.6.3 -> libyaml-cpp.so.0.7.0 * Mon Jan 6 2020 Senlin Xia - 0.6.3-1 - Package init