e8bd6f
# Regression tests take a long time, you can skip 'em with this
e8bd6f
%{!?runselftest: %{expand: %%global runselftest 1}}
e8bd6f
%global with_sasl        1
e8bd6f
e8bd6f
Name:      libmemcached
e8bd6f
Summary:   Client library and command line tools for memcached server
e8bd6f
Version:   1.0.16
9d8302
Release:   5%{?dist}
e8bd6f
License:   BSD
e8bd6f
Group:     System Environment/Libraries
e8bd6f
URL:       http://libmemcached.org/
e8bd6f
# Original sources:
e8bd6f
#   http://launchpad.net/libmemcached/1.0/%{version}/+download/libmemcached-%{version}.tar.gz
e8bd6f
# The source tarball must be repackaged to remove the Hsieh hash
e8bd6f
# code, since the license is non-free.  When upgrading, download the new
e8bd6f
# source tarball, and run "./strip-hsieh.sh <version>" to produce the
e8bd6f
# "-exhsieh" tarball.
e8bd6f
Source0:   libmemcached-%{version}-exhsieh.tar.gz
e8bd6f
e8bd6f
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
e8bd6f
%if %{with_sasl}
e8bd6f
BuildRequires: cyrus-sasl-devel
e8bd6f
%endif
e8bd6f
BuildRequires: flex
e8bd6f
BuildRequires: bison
e8bd6f
BuildRequires: python-sphinx
e8bd6f
BuildRequires: memcached
e8bd6f
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
e8bd6f
BuildRequires: systemtap-sdt-devel
e8bd6f
%endif
e8bd6f
BuildRequires: libevent-devel
e8bd6f
9d8302
Patch0: libmemcached-fix-linking-with-libpthread.patch
e8bd6f
e8bd6f
%description
e8bd6f
libmemcached is a C/C++ client library and tools for the memcached server
e8bd6f
(http://memcached.org/). It has been designed to be light on memory
e8bd6f
usage, and provide full access to server side methods.
e8bd6f
e8bd6f
It also implements several command line tools:
e8bd6f
e8bd6f
memaslap    Load testing and benchmarking a server
e8bd6f
memcapable  Checking a Memcached server capibilities and compatibility
e8bd6f
memcat      Copy the value of a key to standard output
e8bd6f
memcp       Copy data to a server
e8bd6f
memdump     Dumping your server
e8bd6f
memerror    Translate an error code to a string
e8bd6f
memexist    Check for the existance of a key
e8bd6f
memflush    Flush the contents of your servers
e8bd6f
memparse    Parse an option string
e8bd6f
memping     Test to see if a server is available.
e8bd6f
memrm       Remove a key(s) from the server
e8bd6f
memslap     Generate testing loads on a memcached cluster
e8bd6f
memstat     Dump the stats of your servers to standard output
e8bd6f
memtouch    Touches a key
e8bd6f
e8bd6f
e8bd6f
%package devel
e8bd6f
Summary: Header files and development libraries for %{name}
e8bd6f
Group: Development/Libraries
e8bd6f
Requires: %{name}%{?_isa} = %{version}-%{release}
e8bd6f
Requires: pkgconfig
e8bd6f
%if %{with_sasl}
e8bd6f
Requires: cyrus-sasl-devel%{?_isa}
e8bd6f
%endif
e8bd6f
e8bd6f
%description devel
e8bd6f
This package contains the header files and development libraries
e8bd6f
for %{name}. If you like to develop programs using %{name}, 
e8bd6f
you will need to install %{name}-devel.
e8bd6f
e8bd6f
e8bd6f
%prep
e8bd6f
%setup -q
9d8302
%patch0 -p1 -b .pthread
e8bd6f
e8bd6f
mkdir examples
e8bd6f
cp -p tests/*.{cc,h} examples/
e8bd6f
9d8302
# Don't test memaslap: https://bugs.launchpad.net/libmemcached/+bug/1115357
9d8302
sed -i '/^TESTS = /s|\($(bin_PROGRAMS)\)|$(filter-out clients/memaslap,\1)|' Makefile.in
e8bd6f
e8bd6f
%build
e8bd6f
# option --with-memcached=false to disable server binary check (as we don't run test)
e8bd6f
%configure \
e8bd6f
%if %{runselftest}
e8bd6f
   --with-memcached=%{_bindir}/memcached \
e8bd6f
%else
e8bd6f
   --with-memcached=false \
e8bd6f
%endif
e8bd6f
%if %{with_sasl}
e8bd6f
   --enable-sasl \
e8bd6f
%else
e8bd6f
   --disable-sasl \
e8bd6f
%endif
e8bd6f
   --enable-libmemcachedprotocol \
e8bd6f
   --enable-memaslap \
e8bd6f
   --enable-dtrace \
e8bd6f
   --disable-static
e8bd6f
e8bd6f
%if 0%{?fedora} < 14 && 0%{?rhel} < 7
e8bd6f
# for warning: unknown option after '#pragma GCC diagnostic' kind
e8bd6f
sed -e 's/-Werror//' -i Makefile
e8bd6f
%endif
e8bd6f
e8bd6f
make %{_smp_mflags}
e8bd6f
e8bd6f
e8bd6f
%install
e8bd6f
rm -rf %{buildroot}
e8bd6f
make install  DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS=""
e8bd6f
e8bd6f
# Hack: when sphinx-build too old (fedora < 14 and rhel < 7)
e8bd6f
# install upstream provided man pages
e8bd6f
if [ ! -d %{buildroot}%{_mandir}/man1 ]; then
e8bd6f
   install -d %{buildroot}%{_mandir}/man1
e8bd6f
   install -p -m 644 man/*1 %{buildroot}%{_mandir}/man1
e8bd6f
   install -d %{buildroot}%{_mandir}/man3
e8bd6f
   install -p -m 644 man/*3 %{buildroot}%{_mandir}/man3
e8bd6f
fi
e8bd6f
e8bd6f
e8bd6f
%check
e8bd6f
%if %{runselftest}
9d8302
make test
e8bd6f
%endif
e8bd6f
e8bd6f
e8bd6f
%clean
e8bd6f
rm -rf %{buildroot}
e8bd6f
e8bd6f
e8bd6f
%post -p /sbin/ldconfig
e8bd6f
e8bd6f
e8bd6f
%postun -p /sbin/ldconfig
e8bd6f
 
e8bd6f
e8bd6f
%files
e8bd6f
%defattr (-,root,root,-) 
e8bd6f
%doc AUTHORS COPYING README THANKS TODO ChangeLog
e8bd6f
%{_bindir}/mem*
e8bd6f
%exclude %{_libdir}/lib*.la
e8bd6f
%{_libdir}/libhashkit.so.2*
e8bd6f
%{_libdir}/libmemcached.so.11*
e8bd6f
%{_libdir}/libmemcachedprotocol.so.0*
e8bd6f
%{_libdir}/libmemcachedutil.so.2*
e8bd6f
%{_mandir}/man1/mem*
e8bd6f
e8bd6f
e8bd6f
%files devel
e8bd6f
%defattr (-,root,root,-) 
e8bd6f
%doc examples
e8bd6f
%{_includedir}/libmemcached
e8bd6f
%{_includedir}/libmemcached-1.0
e8bd6f
%{_includedir}/libhashkit
e8bd6f
%{_includedir}/libhashkit-1.0
e8bd6f
%{_includedir}/libmemcachedprotocol-0.0
e8bd6f
%{_includedir}/libmemcachedutil-1.0
e8bd6f
%{_libdir}/libhashkit.so
e8bd6f
%{_libdir}/libmemcached.so
e8bd6f
%{_libdir}/libmemcachedprotocol.so
e8bd6f
%{_libdir}/libmemcachedutil.so
e8bd6f
%{_libdir}/pkgconfig/libmemcached.pc
e8bd6f
%{_datadir}/aclocal/ax_libmemcached.m4
e8bd6f
%{_mandir}/man3/libmemcached*
e8bd6f
%{_mandir}/man3/libhashkit*
e8bd6f
%{_mandir}/man3/memcached*
e8bd6f
%{_mandir}/man3/hashkit*
e8bd6f
e8bd6f
e8bd6f
%changelog
9d8302
* Thu Jul 02 2015 Miroslav Lichvar <mlichvar@redhat.com> - 1.0.16-5
9d8302
- don't test memaslap in make check (#1231828)
9d8302
- rebuild with fixed binutils (#1238466)
9d8302
9d8302
* Wed Apr 22 2015 Miroslav Lichvar <mlichvar@redhat.com> - 1.0.16-4
9d8302
- fix linking with libpthread (#1116949)
9d8302
2bb1a3
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.0.16-3
2bb1a3
- Mass rebuild 2014-01-24
2bb1a3
2bb1a3
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.0.16-2
2bb1a3
- Mass rebuild 2013-12-27
2bb1a3
e8bd6f
* Tue Apr 30 2013 Daniel Mach <dmach@redhat.com> - 1.0.16-1.2
e8bd6f
- Rebuild for cyrus-sasl
e8bd6f
e8bd6f
* Mon Feb  4 2013 Remi Collet <remi@fedoraproject.org> - 1.0.16-1
e8bd6f
- update to 1.0.16
e8bd6f
- ignore test result for memaslap (XFAIL but PASS)
e8bd6f
  https://bugs.launchpad.net/libmemcached/+bug/1115357
e8bd6f
e8bd6f
* Sat Dec 29 2012 Remi Collet <remi@fedoraproject.org> - 1.0.15-1
e8bd6f
- update to 1.0.15
e8bd6f
- libmemcachedprotocol is back
e8bd6f
- add memaslap command line tool
e8bd6f
- report various issues to upstream
e8bd6f
  https://bugs.launchpad.net/libmemcached/+bug/1094413 (libevent)
e8bd6f
  https://bugs.launchpad.net/libmemcached/+bug/1094414 (c99 MODE)
e8bd6f
e8bd6f
* Sat Nov 17 2012 Remi Collet <remi@fedoraproject.org> - 1.0.14-1
e8bd6f
- update to 1.0.14
e8bd6f
- libmemcachedprotocol removed
e8bd6f
- sasl support is back
e8bd6f
- run test during build
e8bd6f
- report various issues to upstream
e8bd6f
  https://bugs.launchpad.net/libmemcached/+bug/1079994 (bigendian)
e8bd6f
  https://bugs.launchpad.net/libmemcached/+bug/1079995 (config.h)
e8bd6f
  https://bugs.launchpad.net/libmemcached/+bug/1079996 (dtrace)
e8bd6f
  https://bugs.launchpad.net/libmemcached/+bug/1079997 (-ldl)
e8bd6f
  https://bugs.launchpad.net/libmemcached/+bug/1080000 (touch)
e8bd6f
e8bd6f
* Sat Oct 20 2012 Remi Collet <remi@fedoraproject.org> - 1.0.13-1
e8bd6f
- update to 1.0.13
e8bd6f
e8bd6f
* Fri Oct 19 2012 Remi Collet <remi@fedoraproject.org> - 1.0.12-2
e8bd6f
- temporary hack: fix LIBMEMCACHED_VERSION_HEX value
e8bd6f
e8bd6f
* Thu Oct 11 2012 Remi Collet <remi@fedoraproject.org> - 1.0.12-1
e8bd6f
- update to 1.0.12
e8bd6f
- add aclocal/ax_lib_libmemcached.m4
e8bd6f
- abi-compliance-checker verdict : Compatible
e8bd6f
- uggly hack for man pages
e8bd6f
e8bd6f
* Tue Sep 25 2012 Karsten Hopp <karsten@redhat.com> 1.0.11-2
e8bd6f
- fix defined but not used variable error on bigendian machines
e8bd6f
e8bd6f
* Sat Sep 22 2012 Remi Collet <remi@fedoraproject.org> - 1.0.11-1
e8bd6f
- update to 1.0.11, soname bump to libmemcached.so.11
e8bd6f
- drop broken SASL support
e8bd6f
- don't generate parser (bison 2.6 not supported)
e8bd6f
e8bd6f
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-2
e8bd6f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e8bd6f
e8bd6f
* Sun May 27 2012 Remi Collet <remi@fedoraproject.org> - 1.0.8-1
e8bd6f
- update to 1.0.8
e8bd6f
e8bd6f
* Sun Apr 22 2012 Remi Collet <remi@fedoraproject.org> - 1.0.7-1
e8bd6f
- update to 1.0.7
e8bd6f
- regenerate parser using flex/bison (#816766)
e8bd6f
e8bd6f
* Sun Apr 22 2012 Remi Collet <remi@fedoraproject.org> - 1.0.6-2
e8bd6f
- workaround for SASL detection
e8bd6f
e8bd6f
* Sat Apr 21 2012 Remi Collet <remi@fedoraproject.org> - 1.0.6-1
e8bd6f
- update to 1.0.6
e8bd6f
- soname bump to libmemcached.so.10 and libhashkit.so.2
e8bd6f
e8bd6f
* Sat Mar 03 2012 Remi Collet <remi@fedoraproject.org> - 1.0.4-1
e8bd6f
- update to 1.0.4
e8bd6f
- soname bump to libmemcached.so.9
e8bd6f
- update description
e8bd6f
e8bd6f
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-3
e8bd6f
- Rebuilt for c++ ABI breakage
e8bd6f
e8bd6f
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-2
e8bd6f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
e8bd6f
e8bd6f
* Thu Oct 27 2011 Remi Collet <remi@fedoraproject.org> - 1.0.2-1
e8bd6f
- update to 1.0.2
e8bd6f
e8bd6f
* Sun Oct 16 2011 Remi Collet <remi@fedoraproject.org> - 0.53-1
e8bd6f
- update to 0.53
e8bd6f
e8bd6f
* Sat Sep 17 2011 Remi Collet <remi@fedoraproject.org> - 0.52-1
e8bd6f
- update to 0.52
e8bd6f
e8bd6f
* Sun Jul 31 2011 Remi Collet <remi@fedoraproject.org> - 0.51-1
e8bd6f
- update to 0.51 (soname bump libmemcached.so.8)
e8bd6f
e8bd6f
* Thu Jun 02 2011 Remi Collet <Fedora@famillecollet.com> - 0.49-1
e8bd6f
- update to 0.49
e8bd6f
- add build option : --with tests
e8bd6f
e8bd6f
* Mon Feb 28 2011 Remi Collet <Fedora@famillecollet.com> - 0.47-1
e8bd6f
- update to 0.47
e8bd6f
- remove patch merged upstream
e8bd6f
e8bd6f
* Sun Feb 20 2011 Remi Collet <Fedora@famillecollet.com> - 0.46-2
e8bd6f
- patch Makefile.in instead of include.am (to avoid autoconf)
e8bd6f
- donc requires pkgconfig with arch
e8bd6f
e8bd6f
* Fri Feb 18 2011 Remi Collet <Fedora@famillecollet.com> - 0.46-1
e8bd6f
- update to 0.46
e8bd6f
e8bd6f
* Sat Feb 12 2011 Remi Collet <Fedora@famillecollet.com> - 0.44-6
e8bd6f
- arch specific requires
e8bd6f
e8bd6f
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.44-5
e8bd6f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
e8bd6f
e8bd6f
* Wed Nov 24 2010 Joe Orton <jorton@redhat.com> - 0.44-4
e8bd6f
- repackage source tarball to remove non-free Hsieh hash code
e8bd6f
e8bd6f
* Sat Oct 02 2010 Remi Collet <Fedora@famillecollet.com> - 0.44-3
e8bd6f
- improves SASL patch
e8bd6f
e8bd6f
* Sat Oct 02 2010 Remi Collet <Fedora@famillecollet.com> - 0.44-2
e8bd6f
- enable SASL support
e8bd6f
e8bd6f
* Fri Oct 01 2010 Remi Collet <Fedora@famillecollet.com> - 0.44-1
e8bd6f
- update to 0.44
e8bd6f
- add soname version in %%file to detect change
e8bd6f
e8bd6f
* Fri Jul 30 2010 Remi Collet <Fedora@famillecollet.com> - 0.43-1
e8bd6f
- update to 0.43
e8bd6f
e8bd6f
* Wed Jul 07 2010 Remi Collet <Fedora@famillecollet.com> - 0.42-1
e8bd6f
- update to 0.42
e8bd6f
e8bd6f
* Tue May 04 2010 Remi Collet <Fedora@famillecollet.com> - 0.40-1
e8bd6f
- update to 0.40 (new soname for libmemcached.so.5)
e8bd6f
- new URI (site + source)
e8bd6f
e8bd6f
* Sat Mar 13 2010 Remi Collet <Fedora@famillecollet.com> - 0.38-1
e8bd6f
- update to 0.38
e8bd6f
e8bd6f
* Sat Feb 06 2010 Remi Collet <Fedora@famillecollet.com> - 0.37-1
e8bd6f
- update to 0.37 (soname bump)
e8bd6f
- new libhashkit (should be a separated project in the futur)
e8bd6f
e8bd6f
* Sun Sep 13 2009 Remi Collet <Fedora@famillecollet.com> - 0.31-1
e8bd6f
- update to 0.31
e8bd6f
e8bd6f
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.30-2
e8bd6f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
e8bd6f
e8bd6f
* Sun Jun 14 2009 Remi Collet <Fedora@famillecollet.com> - 0.30-1
e8bd6f
- update to 0.30
e8bd6f
e8bd6f
* Tue May 19 2009 Remi Collet <Fedora@famillecollet.com> - 0.29-1
e8bd6f
- update to 0.29
e8bd6f
e8bd6f
* Fri May 01 2009 Remi Collet <Fedora@famillecollet.com> - 0.28-2
e8bd6f
- add upstream patch to disable nonfree hsieh hash method
e8bd6f
e8bd6f
* Sat Apr 25 2009 Remi Collet <Fedora@famillecollet.com> - 0.28-1
e8bd6f
- Initial RPM from Brian Aker spec
e8bd6f
- create -devel subpackage
e8bd6f
- add %%post %%postun %%check section
e8bd6f