LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File libserf.spec of Package libserf (Project devel:libraries:c_c++)

#
# spec file for package libserf
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%bcond_without	gssapi
# version 1.2.0 requires apr 1.3.0 or later for apr_socket_addr_get
%define minimum_apr_version 1.3.0

Name:           libserf
%define major	1
%define minor	3
%define SHLIBVER %major.%minor.0
Version:        1.3.4
Release:        0
Summary:        High-Performance Asynchronous HTTP Client Library
License:        Apache-2.0
Group:          System/Libraries
Source:         https://serf.googlecode.com/svn/src_releases/serf-%version.tar.bz2
Url:            https://serf.googlecode.com
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gcc
BuildRequires:  glibc-devel
BuildRequires:  libapr-util1-devel >= %{minimum_apr_version}
BuildRequires:  libapr1-devel >= %{minimum_apr_version}
BuildRequires:  libexpat-devel
BuildRequires:  libopenssl-devel
BuildRequires:  openldap2-devel
BuildRequires:  pkgconfig
BuildRequires:  scons >= 2.3
BuildRequires:  zlib-devel
%if %{with gssapi}
BuildRequires:  krb5-devel
%endif

%description
The serf library is a C-based HTTP client library built upon the Apache
Portable Runtime (APR) library. It multiplexes connections, running the
read/write communication asynchronously. Memory copies and transformations are
kept to a minimum to provide high performance operation.




Authors:
--------
    Greg Stein <serf-dev@googlegroups.com>
    Justin Erenkrantz <serf-dev@googlegroups.com>

%package -n libserf-%major-%major

Summary:        High-Performance Asynchronous HTTP Client Library
Group:          Development/Libraries/C and C++

%description -n libserf-%major-%major
The serf library is a C-based HTTP client library built upon the Apache
Portable Runtime (APR) library. It multiplexes connections, running the
read/write communication asynchronously. Memory copies and transformations are
kept to a minimum to provide high performance operation.




Authors:
--------
    Greg Stein <serf-dev@googlegroups.com>
    Justin Erenkrantz <serf-dev@googlegroups.com>


%package -n libserf-devel

Summary:        High-Performance Asynchronous HTTP Client Library
Group:          Development/Libraries/C and C++
%if %{with gssapi}
Requires:       krb5-devel
%endif
Requires:       libapr-util1-devel >= %{minimum_apr_version}
Requires:       libapr1-devel >= %{minimum_apr_version}
Requires:       libexpat-devel
Requires:       libopenssl-devel
Requires:       libserf-%major-%major = %{version}
Requires:       openldap2-devel
Requires:       zlib-devel

%description -n libserf-devel
The serf library is a C-based HTTP client library built upon the Apache
Portable Runtime (APR) library. It multiplexes connections, running the
read/write communication asynchronously. Memory copies and transformations are
kept to a minimum to provide high performance operation.




Authors:
--------
    Greg Stein <serf-dev@googlegroups.com>
    Justin Erenkrantz <serf-dev@googlegroups.com>

%prep
%setup -q -n "serf-%{version}"

%build
scons \
	PREFIX=%{_prefix} \
	LIBDIR=%{_libdir} \
	APR=%{_prefix} \
	OPENSSL=%{_prefix} \
	ZLIB=%{_prefix} \
%if %{with gssapi}
	GSSAPI=/usr/lib/mit \
%endif
	DEBUG=yes \
	CFLAGS="%{optflags}" \
	APR_STATIC=no \
	%{?_smp_mflags} 

%install
scons install --install-sandbox=%{buildroot}
%__rm -f "%{buildroot}%{_libdir}"/lib*.a

%check
%if 0%{?suse_version} > 1210
scons \
	CFLAGS="%{optflags}" \
	check \
	%{?_smp_mflags}
%endif

%post   -n libserf-%{major}-%{major} -p /sbin/ldconfig

%postun -n libserf-%{major}-%{major} -p /sbin/ldconfig

%files -n libserf-%{major}-%{major}
%defattr(-,root,root)
%doc CHANGES LICENSE NOTICE README
%doc design-guide.txt
%{_libdir}/libserf-%{major}.so.%{major}
%{_libdir}/libserf-%{major}.so.%{SHLIBVER}

%files -n libserf-devel
%defattr(-,root,root)
%_includedir/serf-%{major}
%{_libdir}/libserf-%{major}.so
%{_libdir}/pkgconfig/serf-%{major}.pc

%changelog