From 9ee3fc246e4fa839279598e10e84dd4b5ccd7c14486b65ae31d0c21d117ee417 Mon Sep 17 00:00:00 2001 From: Alexey Svistunov Date: Wed, 8 Feb 2023 14:57:29 +0000 Subject: [PATCH] - Switch to meson tests - Add examples to headers package OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cpp-httplib?expand=0&rev=12 --- cpp-httplib-headers.spec | 2 +- cpp-httplib.changes | 6 ++++++ cpp-httplib.spec | 18 +++++++++--------- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/cpp-httplib-headers.spec b/cpp-httplib-headers.spec index b877963..c35dd29 100644 --- a/cpp-httplib-headers.spec +++ b/cpp-httplib-headers.spec @@ -61,7 +61,7 @@ ln -s cpp-httplib.pc %{name}.pc %{_includedir}/httplib.h %{_datadir}/pkgconfig/cpp-httplib.pc %{_datadir}/pkgconfig/%{name}.pc -%doc README.md +%doc README.md examples %license LICENSE %changelog diff --git a/cpp-httplib.changes b/cpp-httplib.changes index 85670aa..0f891e8 100644 --- a/cpp-httplib.changes +++ b/cpp-httplib.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Feb 8 14:55:18 UTC 2023 - Alexey Svistunov + +- Switch to meson tests +- Add examples to headers package + ------------------------------------------------------------------- Mon Feb 6 14:55:29 UTC 2023 - Alexey Svistunov diff --git a/cpp-httplib.spec b/cpp-httplib.spec index a3a235a..999666f 100644 --- a/cpp-httplib.spec +++ b/cpp-httplib.spec @@ -27,6 +27,7 @@ URL: https://github.com/yhirose/cpp-httplib Source0: %{name}-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: meson >= 0.47.0 +BuildRequires: pkgconfig(gtest) BuildRequires: pkgconfig(libbrotlidec) BuildRequires: pkgconfig(libbrotlienc) BuildRequires: pkgconfig(openssl) >= 1.1.1 @@ -59,21 +60,21 @@ interfaces and any available port. %setup -q %build -%meson -Dcpp-httplib_compile=true --buildtype=release +%meson -Dcpp-httplib_compile=true -Dcpp-httplib_test=true \ + --buildtype=release %meson_build %install %meson_install +# Create a pkgconfig alias cd %{buildroot}%{_libdir}/pkgconfig ln -s %{name}.pc %{name}-shared.pc %check -pushd test - %make_build test CXX=g++ - # Mock and OBS does not provide internet connectivity, - # skip online tests to avoid failures - ./test --gtest_filter='-*.*_Online' -popd +# OBS and chroot build environments does not provide internet +# connectivity, skip online tests to avoid failures +export GTEST_FILTER='-*.*_Online' +%meson_test %post -n lib%{name}%{libver} -p /sbin/ldconfig %postun -n lib%{name}%{libver} -p /sbin/ldconfig @@ -86,8 +87,7 @@ popd %files devel %{_libdir}/lib%{name}.so %{_includedir}/httplib.h -%{_libdir}/pkgconfig/%{name}.pc -%{_libdir}/pkgconfig/%{name}-shared.pc +%{_libdir}/pkgconfig/*.pc %doc README.md %changelog