diff options
Diffstat (limited to 'cpp-hocon.spec')
-rw-r--r-- | cpp-hocon.spec | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/cpp-hocon.spec b/cpp-hocon.spec new file mode 100644 index 0000000..ac5bda2 --- /dev/null +++ b/cpp-hocon.spec @@ -0,0 +1,60 @@ +Name: cpp-hocon +Version: 0.3.0 +Release: 1 +Summary: C++ support for the HOCON configuration file format +License: Apache-2.0 +URL: https://github.com/puppetlabs/cpp-hocon +Source0: https://github.com/puppetlabs/cpp-hocon/archive/refs/tags/%{version}.tar.gz +Source1: cpphocon.pc.in +Patch1: cpp-hocon-boost-filesystem-link.patch +BuildRequires: cmake >= 3.2.2 make gcc-c++ boost-devel >= 1.54 +BuildRequires: leatherman-devel gettext catch1-devel +%description +This is a port of the TypesafeConfig library to C++. +The library provides C++ support for the HOCON configuration file format. + +%package devel +Requires: cpp-hocon%{?_isa} = %{version}-%{release} +Summary: Development files for the cpp-hocon library +%description devel +Libraries and headers to links against cpp-hocon. + +%prep +%autosetup -p1 +sed -r -i 's/(LEATHERMAN_COMPONENTS)(\b.+)?(\bcatch\b)/\1\2/' CMakeLists.txt +sed -r -i 's|\$\{LEATHERMAN_CATCH_INCLUDE\}|"%{_includedir}/catch"|' \ + lib/tests/CMakeLists.txt + +%build +%cmake \ + -DBOOST_INCLUDEDIR=%{_includedir}/boost \ + -DBOOST_LIBRARYDIR=%{_libdir}/boost \ + -DLeatherman_DIR=%{_libdir}/cmake/leatherman \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + %{nil} +%cmake_build + +%install +%cmake_install +mkdir -p %{buildroot}%{_libdir}/pkgconfig +cp -p %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/cpphocon.pc +sed -i 's#@@PREFIX@@#%{_prefix}#' %{buildroot}%{_libdir}/pkgconfig/cpphocon.pc +sed -i 's#@@VERSION@@#%{version}#' %{buildroot}%{_libdir}/pkgconfig/cpphocon.pc +sed -i 's#@@LIBDIR@@#%{_lib}#' %{buildroot}%{_libdir}/pkgconfig/cpphocon.pc + +%files +%license LICENSE +%{_libdir}/libcpp-hocon.so.* + +%files devel +%{_libdir}/libcpp-hocon.so +%{_includedir}/hocon/ +%{_libdir}/pkgconfig/cpphocon.pc + +%changelog +* Tue Nov 12 2024 Funda Wang <fundawang@yeah.net> - 0.3.0-1 +- update to 0.3.0 + +* Fri Aug 14 2020 yaokai <yaokai13@huawei.com> - 0.2.1-1 +- package init |