Package init
This commit is contained in:
commit
d0f5617ecf
34
libserf-norpath.patch
Normal file
34
libserf-norpath.patch
Normal file
@ -0,0 +1,34 @@
|
||||
diff -uNr serf-1.3.9.orig/SConstruct serf-1.3.9/SConstruct
|
||||
--- serf-1.3.9.orig/SConstruct 2016-09-02 08:22:35.180532030 +0200
|
||||
+++ serf-1.3.9/SConstruct 2016-09-02 08:22:56.653174061 +0200
|
||||
@@ -224,9 +224,6 @@
|
||||
else:
|
||||
LIBNAMESTATIC = 'serf-${MAJOR}'
|
||||
|
||||
-env.Append(RPATH=libdir,
|
||||
- PDB='${TARGET.filebase}.pdb')
|
||||
-
|
||||
if sys.platform == 'darwin':
|
||||
# linkflags.append('-Wl,-install_name,@executable_path/%s.dylib' % (LIBNAME,))
|
||||
env.Append(LINKFLAGS=['-Wl,-install_name,%s/%s.dylib' % (thisdir, LIBNAME,)])
|
||||
@@ -385,12 +382,6 @@
|
||||
if sys.platform == 'win32':
|
||||
env.Append(CPPDEFINES=['SERF_HAVE_SSPI'])
|
||||
|
||||
-# On some systems, the -R values that APR describes never make it into actual
|
||||
-# RPATH flags. We'll manually map all directories in LIBPATH into new
|
||||
-# flags to set RPATH values.
|
||||
-for d in env['LIBPATH']:
|
||||
- env.Append(RPATH=':'+d)
|
||||
-
|
||||
# Set up the construction of serf-*.pc
|
||||
pkgconfig = env.Textfile('serf-%d.pc' % (MAJOR,),
|
||||
env.File('build/serf.pc.in'),
|
||||
@@ -461,7 +452,6 @@
|
||||
TEST_EXES = [ os.path.join('test', '%s' % (prog)) for prog in TEST_PROGRAMS ]
|
||||
|
||||
# Find the (dynamic) library in this directory
|
||||
-tenv.Replace(RPATH=thisdir)
|
||||
tenv.Prepend(LIBS=[LIBNAMESTATIC, ],
|
||||
LIBPATH=[thisdir, ])
|
||||
|
||||
30
libserf-python3.patch
Normal file
30
libserf-python3.patch
Normal file
@ -0,0 +1,30 @@
|
||||
diff -up serf-1.3.9/SConstruct.python3 serf-1.3.9/SConstruct
|
||||
--- serf-1.3.9/SConstruct.python3 2018-07-02 17:21:47.331685070 +0200
|
||||
+++ serf-1.3.9/SConstruct 2018-07-02 17:27:12.316413515 +0200
|
||||
@@ -20,6 +20,8 @@
|
||||
# ====================================================================
|
||||
#
|
||||
|
||||
+from __future__ import print_function
|
||||
+
|
||||
import sys
|
||||
import os
|
||||
import re
|
||||
@@ -166,7 +168,7 @@ env.Append(BUILDERS = {
|
||||
match = re.search('SERF_MAJOR_VERSION ([0-9]+).*'
|
||||
'SERF_MINOR_VERSION ([0-9]+).*'
|
||||
'SERF_PATCH_VERSION ([0-9]+)',
|
||||
- env.File('serf.h').get_contents(),
|
||||
+ env.File('serf.h').get_contents().decode('utf-8'),
|
||||
re.DOTALL)
|
||||
MAJOR, MINOR, PATCH = [int(x) for x in match.groups()]
|
||||
env.Append(MAJOR=str(MAJOR))
|
||||
@@ -183,7 +185,7 @@ CALLOUT_OKAY = not (env.GetOption('clean
|
||||
|
||||
unknown = opts.UnknownVariables()
|
||||
if unknown:
|
||||
- print 'Warning: Used unknown variables:', ', '.join(unknown.keys())
|
||||
+ print('Warning: Used unknown variables:', ', '.join(unknown.keys()))
|
||||
|
||||
apr = str(env['APR'])
|
||||
apu = str(env['APU'])
|
||||
73
libserf.spec
Normal file
73
libserf.spec
Normal file
@ -0,0 +1,73 @@
|
||||
%global scons scons-3
|
||||
%global scons_pkg python3-scons
|
||||
|
||||
Name: libserf
|
||||
Version: 1.3.9
|
||||
Release: 11
|
||||
Summary: High-Performance Asynchronous HTTP Client Library
|
||||
License: ASL 2.0
|
||||
URL: https://serf.apache.org/
|
||||
Source0: https://archive.apache.org/dist/serf/serf-%{version}.tar.bz2
|
||||
BuildRequires: gcc, %{scons_pkg}, pkgconfig, zlib-devel
|
||||
BuildRequires: apr-devel, apr-util-devel, krb5-devel, openssl-devel
|
||||
|
||||
Patch0: %{name}-norpath.patch
|
||||
Patch1: %{name}-python3.patch
|
||||
|
||||
%description
|
||||
The serf library is a high performance C-based HTTP client library built upon
|
||||
the Apache Portable Runtime (APR) library. It is permissively licensed under
|
||||
the Apache License, v2.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release} apr-devel%{?_isa}
|
||||
|
||||
%description devel
|
||||
This package contains libraries and header files for
|
||||
developing applications that use %{name}.
|
||||
|
||||
%package_help
|
||||
|
||||
%prep
|
||||
%autosetup -n serf-%{version} -p1
|
||||
|
||||
sed -i '/SHLIBVERSION/s/MAJOR/0/' SConstruct
|
||||
|
||||
%build
|
||||
%{scons} \
|
||||
CFLAGS="%{optflags}" LINKFLAGS="%{__global_ldflags}" \
|
||||
PREFIX=%{_prefix} LIBDIR=%{_libdir} \
|
||||
GSSAPI=%{_prefix} %{?_smp_mflags}
|
||||
|
||||
|
||||
%install
|
||||
%{scons} install --install-sandbox=%{buildroot}
|
||||
|
||||
%delete_la_and_a
|
||||
|
||||
%check
|
||||
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
|
||||
%{scons} %{?_smp_mflags} check || true
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%license LICENSE NOTICE
|
||||
%{_libdir}/*.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{_includedir}/serf-1/
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/pkgconfig/serf*.pc
|
||||
|
||||
%files help
|
||||
%defattr(-,root,root)
|
||||
%doc README CHANGES design-guide.txt
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Sep 16 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.3.9-11
|
||||
- Package init
|
||||
BIN
serf-1.3.9.tar.bz2
Normal file
BIN
serf-1.3.9.tar.bz2
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user