forked from pool/cpp-httplib
- 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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user