| 1 | %define serfver 1
|
|---|
| 2 |
|
|---|
| 3 | Summary: A high-performance asynchronous HTTP client library
|
|---|
| 4 | Name: serf
|
|---|
| 5 | Version: 1.2.1
|
|---|
| 6 | Release: 5%{?dist}
|
|---|
| 7 | License: Apache License
|
|---|
| 8 | Group: System/Libraries
|
|---|
| 9 | URL: http://code.google.com/p/serf/
|
|---|
| 10 | Source0: http://serf.googlecode.com/files/%{name}-%{version}.tar.bz2
|
|---|
| 11 | Source1: serf-1.def
|
|---|
| 12 | Patch1: serf-os2.patch
|
|---|
| 13 |
|
|---|
| 14 | BuildRequires: apr-devel
|
|---|
| 15 | BuildRequires: apr-util-devel
|
|---|
| 16 | #BuildRequires: autoconf2.5
|
|---|
| 17 | #BuildRequires: automake
|
|---|
| 18 | #BuildRequires: libtool
|
|---|
| 19 | BuildRequires: openssl-devel
|
|---|
| 20 | BuildRequires: zlib-devel
|
|---|
| 21 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
|---|
| 22 |
|
|---|
| 23 | %description
|
|---|
| 24 | The serf library is a C-based HTTP client library built upon the Apache
|
|---|
| 25 | Portable Runtime (APR) library. It multiplexes connections, running the
|
|---|
| 26 | read/write communication asynchronously. Memory copies and transformations are
|
|---|
| 27 | kept to a minimum to provide high performance operation.
|
|---|
| 28 |
|
|---|
| 29 | %package devel
|
|---|
| 30 | Summary: Development libraries and headers for %{name}
|
|---|
| 31 | Group: Development/C
|
|---|
| 32 | Requires: %{name} = %{version}-%{release}
|
|---|
| 33 | Provides: %{name}-devel = %{version}-%{release}
|
|---|
| 34 |
|
|---|
| 35 | %description devel
|
|---|
| 36 | The serf library is a C-based HTTP client library built upon the Apache
|
|---|
| 37 | Portable Runtime (APR) library. It multiplexes connections, running the
|
|---|
| 38 | read/write communication asynchronously. Memory copies and transformations are
|
|---|
| 39 | kept to a minimum to provide high performance operation.
|
|---|
| 40 |
|
|---|
| 41 | This package contains all of the development files that you will need in order
|
|---|
| 42 | to compile %{name} applications.
|
|---|
| 43 |
|
|---|
| 44 | %package debug
|
|---|
| 45 | Summary: HLL debug data for exception handling support.
|
|---|
| 46 |
|
|---|
| 47 | %description debug
|
|---|
| 48 | HLL debug data for exception handling support.
|
|---|
| 49 |
|
|---|
| 50 | %prep
|
|---|
| 51 |
|
|---|
| 52 | %setup -q
|
|---|
| 53 | %patch1 -p1 -b .os2
|
|---|
| 54 |
|
|---|
| 55 | cp %{SOURCE1} .
|
|---|
| 56 |
|
|---|
| 57 | # don't link against ldap libs
|
|---|
| 58 | #perl -pi -e "s|apu_config --link-libtool --libs|apu_config --link-libtool --avoid-ldap --libs|g" configure*
|
|---|
| 59 | # lib64 fix
|
|---|
| 60 | #perl -pi -e "s|/lib\b|/%{_lib}|g" configure*
|
|---|
| 61 | # no static builds
|
|---|
| 62 | #perl -pi -e "s|-static||g" Makefile*
|
|---|
| 63 |
|
|---|
| 64 | %build
|
|---|
| 65 | export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
|
|---|
| 66 | export LDFLAGS="-Zhigh-mem -Zargs-wild -Zargs-resp"
|
|---|
| 67 | export LIBS="-lurpo -lmmap"
|
|---|
| 68 | %configure \
|
|---|
| 69 | --includedir=/@unixroot/usr/include/serf-1 \
|
|---|
| 70 | "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
|
|---|
| 71 | make %{?_smp_mflags}
|
|---|
| 72 |
|
|---|
| 73 | %install
|
|---|
| 74 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 75 | make install DESTDIR=$RPM_BUILD_ROOT
|
|---|
| 76 |
|
|---|
| 77 | # add serf dir symlink for AOO
|
|---|
| 78 | ln -s /@unixroot/usr/include/serf-1 $RPM_BUILD_ROOT/@unixroot/usr/include/serf
|
|---|
| 79 |
|
|---|
| 80 | # Unpackaged files:
|
|---|
| 81 | rm -f $RPM_BUILD_ROOT%{_libdir}/serf-*.la
|
|---|
| 82 |
|
|---|
| 83 | # rename static library
|
|---|
| 84 | mv $RPM_BUILD_ROOT%{_libdir}/serf-%{serfver}.lib $RPM_BUILD_ROOT%{_libdir}/serf-%{serfver}_s.lib
|
|---|
| 85 | # import library
|
|---|
| 86 | emximp -o $RPM_BUILD_ROOT%{_libdir}/serf-%{serfver}.lib $RPM_BUILD_ROOT%{_libdir}/serf-%{serfver}.dll
|
|---|
| 87 |
|
|---|
| 88 | %clean
|
|---|
| 89 | rm -rf %{buildroot}
|
|---|
| 90 |
|
|---|
| 91 | %files
|
|---|
| 92 | %defattr(-,root,root)
|
|---|
| 93 | %doc CHANGES LICENSE NOTICE README design-guide.txt
|
|---|
| 94 | %attr(0755,root,root) %{_libdir}/serf*.dll
|
|---|
| 95 | %exclude %{_libdir}/*.dbg
|
|---|
| 96 |
|
|---|
| 97 | %files devel
|
|---|
| 98 | %defattr(-,root,root)
|
|---|
| 99 | %attr(0644,root,root) %{_includedir}/serf-1/*.h
|
|---|
| 100 | %attr(0644,root,root) %{_includedir}/serf
|
|---|
| 101 | %attr(0755,root,root) %{_libdir}/serf*.lib
|
|---|
| 102 | %{_libdir}/pkgconfig/*.pc
|
|---|
| 103 |
|
|---|
| 104 | %files debug
|
|---|
| 105 | %defattr(-,root,root)
|
|---|
| 106 | %{_libdir}/*.dbg
|
|---|
| 107 |
|
|---|
| 108 | %changelog
|
|---|
| 109 | * Thu Feb 20 2014 yd
|
|---|
| 110 | - update source to release 1.2.1 (required for AOO 4.x)
|
|---|
| 111 | - added debug package with symbolic info for exceptq.
|
|---|
| 112 |
|
|---|
| 113 | * Wed Jun 27 2012 yd
|
|---|
| 114 | - update source to release 1.1.0 (required for AOO 3.5.x)
|
|---|
| 115 | - added missing export.
|
|---|
| 116 |
|
|---|
| 117 | * Fri Mar 02 2012 yd
|
|---|
| 118 | - added http://code.google.com/p/serf/issues/detail?id=68
|
|---|
| 119 |
|
|---|
| 120 | * Fri Mar 02 2012 yd
|
|---|
| 121 | - initial unixroot build.
|
|---|