Backport cmake support

Resolves: rhbz#1974621
This commit is contained in:
Tomas Korbar 2021-06-30 08:10:01 +02:00
parent 34dfd44e23
commit f47ac06c41
2 changed files with 1289 additions and 13 deletions

1274
libserf-1.3.9-cmake.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -8,16 +8,17 @@
Name: libserf
Version: 1.3.9
Release: 20%{?dist}
Release: 21%{?dist}
Summary: High-Performance Asynchronous HTTP Client Library
License: ASL 2.0
URL: http://serf.apache.org/
Source0: https://archive.apache.org/dist/serf/serf-%{version}.tar.bz2
BuildRequires: gcc, %{scons_pkg}, pkgconfig
BuildRequires: apr-devel, apr-util-devel, krb5-devel, openssl-devel
BuildRequires: zlib-devel
BuildRequires: zlib-devel, cmake
Patch0: %{name}-norpath.patch
Patch1: %{name}-python3.patch
Patch2: %{name}-1.3.9-cmake.patch
%description
The serf library is a C-based HTTP client library built upon the Apache
@ -44,22 +45,19 @@ developing applications that use %{name}.
sed -i '/SHLIBVERSION/s/MAJOR/0/' SConstruct
%build
%{scons} \
CFLAGS="%{optflags}" \
LINKFLAGS="%{__global_ldflags}" \
PREFIX=%{_prefix} \
LIBDIR=%{_libdir} \
GSSAPI=%{_prefix} \
%{?_smp_mflags}
%cmake -DCMAKE_INSTALL_LIBDIR=%{_libdir}
%cmake_build
%install
%{scons} install --install-sandbox=%{buildroot}
%cmake_install
find %{buildroot}%{_libdir} -type f -name '*.*a' -delete -print
mkdir -p %{buildroot}%{_libdir}/pkgconfig
mv %{buildroot}%{_datadir}/pkgconfig/serf.pc %{buildroot}%{_libdir}/pkgconfig/serf.pc
rm -rf %{buildroot}%{_datadir}
%check
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
%{scons} %{?_smp_mflags} check || true
%ctest || true
%ldconfig_scriptlets
@ -74,6 +72,10 @@ export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
%{_libdir}/pkgconfig/serf*.pc
%changelog
* Wed Jun 30 2021 Tomas Korbar <tkorbar@redhat.com> - 1.3.9-21
- Backport cmake support
- Resolves: rhbz#1974621
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.3.9-20
- Rebuilt for RHEL 9 BETA for openssl 3.0
Related: rhbz#1971065