diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | cpp-hocon-boost-filesystem-link.patch | 10 | ||||
| -rw-r--r-- | cpp-hocon.spec | 60 | ||||
| -rw-r--r-- | cpphocon.pc.in | 11 | ||||
| -rw-r--r-- | sources | 1 | 
5 files changed, 83 insertions, 0 deletions
@@ -0,0 +1 @@ +/0.3.0.tar.gz diff --git a/cpp-hocon-boost-filesystem-link.patch b/cpp-hocon-boost-filesystem-link.patch new file mode 100644 index 0000000..8fb3f94 --- /dev/null +++ b/cpp-hocon-boost-filesystem-link.patch @@ -0,0 +1,10 @@ +--- cpp-hocon-0.2.1/lib/tests/CMakeLists.txt~	2020-06-03 11:26:20.690331543 +0100 ++++ cpp-hocon-0.2.1/lib/tests/CMakeLists.txt	2020-06-03 11:26:22.519331902 +0100 +@@ -26,6 +26,7 @@ +  + target_link_libraries(lib${PROJECT_NAME}_test +     ${Boost_LIBRARIES} ++    Boost::filesystem +     ${LEATHERMAN_LIBRARIES} +     ${CMAKE_THREAD_LIBS_INIT} + ) 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 diff --git a/cpphocon.pc.in b/cpphocon.pc.in new file mode 100644 index 0000000..3bf821c --- /dev/null +++ b/cpphocon.pc.in @@ -0,0 +1,11 @@ +prefix=@@PREFIX@@ +exec_prefix=${prefix} +includedir=${prefix}/include +libdir=${exec_prefix}/@@LIBDIR@@ + +Name: cpphocon +Description: The cpp-hcon library +Version: @@VERSION@@ +Cflags: -I${includedir}/hocon +Libs: -L${libdir} -llibcpp-hocon + @@ -0,0 +1 @@ +a7ceebe8af350dd4fd387c5823b40bd5  0.3.0.tar.gz  | 
