103 lines
2.9 KiB
RPMSpec
103 lines
2.9 KiB
RPMSpec
%global sover 0.7
|
|
%global srcname yaml-cpp
|
|
|
|
Name: yaml-cpp%{sover}
|
|
Version: 0.7.0
|
|
Release: 1%{?dist}
|
|
|
|
License: MIT
|
|
Summary: A YAML parser and emitter for C++
|
|
URL: https://github.com/jbeder/yaml-cpp
|
|
Source0: %{url}/archive/%{srcname}-%{version}/%{srcname}-%{version}.tar.gz
|
|
|
|
# CMake fixes from 0e6e28d1a38224fc8172fae0109ea7f673c096db commit
|
|
Patch100: yaml-cpp-cmake.patch
|
|
|
|
BuildRequires: cmake
|
|
BuildRequires: gcc
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: make
|
|
|
|
# This compat package cannot be installed at the same time as the base package
|
|
# of the same soname version due to file conflicts. Different soname versions
|
|
# can be installed in parallel.
|
|
%ifarch armv7hl i686
|
|
Conflicts: libyaml-cpp.so.%{sover}
|
|
%else
|
|
Conflicts: libyaml-cpp.so.%{sover}()(%{__isa_bits}bit)
|
|
%endif
|
|
|
|
%description
|
|
yaml-cpp is a YAML parser and emitter in C++ written around the YAML 1.2 spec.
|
|
|
|
%package devel
|
|
Summary: Development files for %{name}
|
|
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
Requires: libstdc++-devel%{?_isa}
|
|
Conflicts: %{srcname}-devel
|
|
|
|
%description devel
|
|
The %{name}-devel package contains libraries and header files for
|
|
developing applications that use %{name}.
|
|
|
|
%package static
|
|
Summary: Static library for %{name}
|
|
Requires: %{name}-devel%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
Conflicts: %{srcname}-static
|
|
|
|
%description static
|
|
The %{name}-static package contains the static library for %{name}.
|
|
|
|
%prep
|
|
%autosetup -n %{srcname}-%{srcname}-%{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/%{srcname} \
|
|
%{buildroot}%{_libdir}/cmake/%{srcname}-static
|
|
mv %{buildroot}%{_libdir}/pkgconfig/%{srcname}.pc \
|
|
%{buildroot}%{_libdir}/pkgconfig/%{srcname}-static.pc
|
|
|
|
%make_install -C build_shared
|
|
|
|
%files
|
|
%doc CONTRIBUTING.md README.md
|
|
%license LICENSE
|
|
%{_libdir}/lib%{srcname}*.so.%{sover}*
|
|
|
|
%files devel
|
|
%{_includedir}/yaml-cpp/
|
|
%{_libdir}/lib%{srcname}.so
|
|
%{_libdir}/cmake/%{srcname}
|
|
%{_libdir}/pkgconfig/%{srcname}.pc
|
|
|
|
%files static
|
|
%license LICENSE
|
|
%{_libdir}/lib%{srcname}.a
|
|
%{_libdir}/cmake/%{srcname}-static
|
|
%{_libdir}/pkgconfig/%{srcname}-static.pc
|
|
|
|
%changelog
|
|
* Tue Dec 02 2025 Orion Poplawski - 0.7.0-1
|
|
- Initial compatibility packge
|