8
0
forked from pool/cpp-httplib

Small specfile refactoring

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cpp-httplib?expand=0&rev=22
This commit is contained in:
2024-09-27 13:08:20 +00:00
committed by Git OBS Bridge
parent 8536137bbd
commit cb90b6e91c
2 changed files with 8 additions and 10 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Sep 27 13:05:37 UTC 2024 - Alexey Svistunov <svalx@svalx.net>
- Small specfile refactoring
-------------------------------------------------------------------
Sun Sep 22 16:50:33 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>

View File

@@ -29,12 +29,10 @@ Source1: %{name}.pc
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig(gtest)
BuildRequires: pkgconfig(libbrotlicommon)
BuildRequires: pkgconfig(libbrotlidec)
BuildRequires: pkgconfig(libbrotlienc)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(openssl) >= 3.0.0
BuildRequires: pkgconfig(zlib)
%package -n lib%{name}%{libver}
Summary: A C++11 HTTP/HTTPS library
@@ -42,7 +40,6 @@ Summary: A C++11 HTTP/HTTPS library
%package devel
Summary: A C++11 HTTP/HTTPS library
Requires: lib%{name}%{libver} = %{version}
Conflicts: cpp-httplib-headers-devel
%description
This is a multi-threaded HTTP library with blocking I/O. There is no
@@ -74,8 +71,7 @@ sed -i 's|Version: 0.0.0|Version: %{version}|g' %{SOURCE1}
-DHTTPLIB_REQUIRE_ZLIB=ON \
-DHTTPLIB_REQUIRE_BROTLI=ON \
-DHTTPLIB_COMPILE=ON \
-DHTTPLIB_TEST=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DHTTPLIB_TEST=ON
%cmake_build
%install
@@ -83,20 +79,17 @@ sed -i 's|Version: 0.0.0|Version: %{version}|g' %{SOURCE1}
install -Dm0644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
#remove files
rm -r %{buildroot}%{_datadir}/licenses/httplib
rm %{buildroot}%{_datadir}/doc/packages/cpp-httplib/README.md
rm -r %{buildroot}%{_datadir}/{licenses/httplib,doc/packages/cpp-httplib}
%check
# OBS and chroot build environments does not provide internet
# connectivity, skip online tests to avoid failures
%ctest --parallel 1 --exclude-regex '(_Online$|SSLClientServerTest|MultipartFormDataTest)'
%ctest --parallel 1 --tests-regex SSLClientServerTest || :
%ctest --parallel 1 --exclude-regex '(_Online$)'
%ldconfig_scriptlets -n lib%{name}%{libver}
%files -n lib%{name}%{libver}
%license LICENSE
%doc README.md
%{_libdir}/lib%{name}.so.%{sover}
%{_libdir}/lib%{name}.so.%{version}