libmemcached/libmemcached.spec
Marcus Meissner ee630f686f Accepting request 265460 from home:dimstar:branches:devel:libraries:c_c++
- Add libmemcached-no-docs-available.patch: Do not build
  documentation if this is not a VC checkout. The idea is that the
  tarballs do only ship the pre-built documentation (which, on the
  other hand, is also missing in 1.0.18).

And, after more than a month, we get a building package again...

OBS-URL: https://build.opensuse.org/request/show/265460
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libmemcached?expand=0&rev=46
2014-12-18 14:00:43 +00:00

178 lines
5.6 KiB
RPMSpec

#
# spec file for package libmemcached
#
# 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/
#
Name: libmemcached
%define libsoname %{name}11
Summary: A C and C++ client library to the memcached server
License: BSD-3-Clause
Group: Development/Libraries/C and C++
Version: 1.0.18
Release: 0
Url: http://libmemcached.org
Source0: https://launchpad.net/libmemcached/1.0/%{version}/+download/libmemcached-%{version}.tar.gz
Source1: https://launchpad.net/libmemcached/1.0/%{version}/+download/libmemcached-%{version}.tar.gz.asc
Source2: %{name}.keyring
# PATCH-FIX-UPSTREAM libmemcached-pthread.patch lp#133614 dimstar@opensuse.org -- Fix pthread detection
Patch0: libmemcached-pthread.patch
Patch1: libmemcached-automake1_14.diff
# PATCH-FIX-UPSTREAM libmemcached-no-docs-available.patch dimstar@opensuse.org -- Do not build docs if not VCS checkout
Patch2: libmemcached-no-docs-available.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# List of additional build dependencies
BuildRequires: automake >= 1.13
BuildRequires: bison
BuildRequires: cyrus-sasl-devel
BuildRequires: gcc-c++
BuildRequires: libevent-devel
BuildRequires: libtool
BuildRequires: memcached
BuildRequires: pkgconfig
# needed for man pages
BuildRequires: fdupes
BuildRequires: python-Sphinx
%description
Libmemcached is a C and C++ client library to the memcached server
(http://danga.com/memcached). It has been designed to be light on
memory usage, thread safe, and provide full access to server side
methods.
%package -n %{libsoname}
Summary: Libmemcached is a C and C++ client library to the memcached server
Group: System/Libraries
%description -n %{libsoname}
Libmemcached is a C and C++ client library to the memcached server
(http://danga.com/memcached). It has been designed to be light on
memory usage, thread safe, and provide full access to server side
methods.
%package -n libmemcachedutil2
Summary: Libmemcached is a C and C++ client library to the memcached server
Group: System/Libraries
%description -n libmemcachedutil2
Libmemcached is a C and C++ client library to the memcached server
(http://danga.com/memcached). It has been designed to be light on
memory usage, thread safe, and provide full access to server side
methods.
The libmemcachedutil library contains utility functions used by
libmemcached.
%package devel
Summary: Libmemcached is a C and C++ client library to the memcached server
Group: Development/Libraries/C and C++
Requires: %{libsoname} = %{version}
Requires: %{name} = %{version}
# memcached.h includes memcached-1.0/struct/sasl.h, which in turn includes sasl/sasl.h
Requires: cyrus-sasl-devel
Requires: glibc-devel
Requires: libmemcachedutil2 = %{version}
%description devel
Libmemcached is a C and C++ client library to the memcached server
(http://danga.com/memcached). It has been designed to be light on
memory usage, thread safe, and provide full access to server side
methods.
%prep
%setup -q
%patch -P 0 -P 1 -p1
%patch2 -p1
%build
autoreconf -fiv
%configure \
--disable-static \
--enable-libmemcachedprotocol \
--with-memcached=%{_sbindir}/memcached
make CFLAGS="-std=c99 %optflags" CXXFLAGS="%optflags" %{?_smp_mflags}
%install
%makeinstall CFLAGS="-std=c99 %optflags" CXXFLAGS="%optflags"
%__rm -f %{buildroot}%{_libdir}/*.la
%if 0%{?suse_version} > 1020
# create symlinks for man pages
%fdupes -s %{buildroot}%{_mandir}
%endif
# remove not needed files
%{__rm} -f %{buildroot}/usr/share/aclocal/ax_libmemcached.m4
%post -n %{libsoname} -p /sbin/ldconfig
%postun -n %{libsoname} -p /sbin/ldconfig
%post -n libmemcachedutil2 -p /sbin/ldconfig
%postun -n libmemcachedutil2 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_bindir}/memcapable
%{_bindir}/memcat
%{_bindir}/memcp
%{_bindir}/memdump
%{_bindir}/memerror
%{_bindir}/memexist
%{_bindir}/memflush
%{_bindir}/memparse
%{_bindir}/memping
%{_bindir}/memrm
%{_bindir}/memslap
%{_bindir}/memstat
%{_bindir}/memtouch
%doc %{_mandir}/man1/mem*.1*
%files -n %{libsoname}
%defattr(-,root,root)
%{_libdir}/%{name}.so.*
%files -n libmemcachedutil2
%defattr(-,root,root)
%{_libdir}/libhashkit.so.2
%{_libdir}/libhashkit.so.2.*.*
%{_libdir}/libmemcachedutil.so.2
%{_libdir}/libmemcachedutil.so.2.*.*
%{_libdir}/libmemcachedprotocol.so.0
%{_libdir}/libmemcachedprotocol.so.0.*.*
%files devel
%defattr(-,root,root)
%dir %{_includedir}/%{name}
%dir %{_includedir}/%{name}-1.0
%dir %{_includedir}/libhashkit
%dir %{_includedir}/libhashkit-1.0
%dir %{_includedir}/libmemcachedprotocol-0.0
%dir %{_includedir}/libmemcachedutil-1.0
%{_includedir}/libhashkit/*
%{_includedir}/libhashkit-1.0/*
%{_includedir}/%{name}/*
%{_includedir}/%{name}-1.0/*
%{_includedir}/libmemcachedprotocol-0.0/*
%{_includedir}/libmemcachedutil-1.0/*
%{_libdir}/pkgconfig/libmemcached.pc
%{_libdir}/libhashkit.so
%{_libdir}/%{name}.so
%{_libdir}/libmemcachedutil.so
%{_libdir}/libmemcachedprotocol.so
%doc %{_mandir}/man3/*.3*
%changelog