yaml-cpp/yaml-cpp.spec

85 lines
2.3 KiB
RPMSpec
Raw Normal View History

2020-01-12 21:22:50 -05:00
Name: yaml-cpp
2023-07-06 16:08:14 +08:00
Version: 0.7.0
Release: 2
2020-01-12 21:20:24 -05:00
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
2023-07-06 16:08:14 +08:00
Patch0001: yaml-cpp-cmake.patch
2020-01-12 21:20:24 -05:00
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
2020-01-12 21:20:24 -05:00
%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
2020-01-12 21:20:24 -05:00
%make_install -C build_shared
2020-01-12 21:20:24 -05:00
%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 <yao_xin001@hoperun.com> - 0.7.0-2
- Fix cmake error of referencing yaml-cpp-devel and remove unused patch
2023-07-06 16:08:14 +08:00
* Thu Jul 06 2023 yaoxin <yao_xin001@hoperun.com> - 0.7.0-1
- Update to 0.7.0
- Abi change: libyaml-cpp.so.0.6.3 -> libyaml-cpp.so.0.7.0
2020-01-12 21:20:24 -05:00
* Mon Jan 6 2020 Senlin Xia<xiasenlin1@huawei.com> - 0.6.3-1
- Package init