89e5f4
# spec file for libmemcached
89e5f4
#
89e5f4
# Copyright (c) 2009-2018 Remi Collet
89e5f4
# License: CC-BY-SA
89e5f4
# http://creativecommons.org/licenses/by-sa/4.0/
89e5f4
#
89e5f4
# Please, preserve the changelog entries
89e5f4
#
89e5f4
# Lot of tests are broken making test suite unusable
89e5f4
%global with_tests       0%{?_witht_tests:1}
89e5f4
%global with_sasl        1
89e5f4
%global libname          libmemcached
89e5f4
89e5f4
Name:      libmemcached
89e5f4
Summary:   Client library and command line tools for memcached server
89e5f4
Version:   1.0.18
dde094
Release:   17%{?dist}
89e5f4
License:   BSD
89e5f4
URL:       http://libmemcached.org/
89e5f4
# Original sources:
89e5f4
#   http://launchpad.net/libmemcached/1.0/%%{version}/+download/libmemcached-%%{version}.tar.gz
89e5f4
# The source tarball must be repackaged to remove the Hsieh hash
89e5f4
# code, since the license is non-free.  When upgrading, download the new
89e5f4
# source tarball, and run "./strip-hsieh.sh <version>" to produce the
89e5f4
# "-exhsieh" tarball.
89e5f4
Source0:   %{libname}-%{version}-exhsieh.tar.gz
89e5f4
89e5f4
BuildRequires: gcc
89e5f4
BuildRequires: gcc-c++
89e5f4
%if %{with_sasl}
89e5f4
BuildRequires: cyrus-sasl-devel
89e5f4
%endif
89e5f4
BuildRequires: flex
89e5f4
BuildRequires: bison
89e5f4
BuildRequires: python3-sphinx
89e5f4
BuildRequires: memcached
89e5f4
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
89e5f4
BuildRequires: systemtap-sdt-devel
89e5f4
%endif
89e5f4
BuildRequires: libevent-devel
89e5f4
89e5f4
Provides:      bundled(bobjenkins-hash)
89e5f4
Requires:      %{name}-libs%{?_isa} = %{version}-%{release}
89e5f4
89e5f4
Patch0: libmemcached-fix-linking-with-libpthread.patch
89e5f4
# Fix: ISO C++ forbids comparison between pointer and integer [-fpermissive]
89e5f4
# https://bugs.launchpad.net/libmemcached/+bug/1663985
89e5f4
Patch1: %{libname}-build.patch
89e5f4
# Fix typo in memparse man page
89e5f4
# https://bugs.launchpad.net/libmemcached/+bug/1675762
89e5f4
Patch2: %{libname}-memparse-man.patch
dde094
Patch3: %{libname}-memaslap-help.patch
89e5f4
89e5f4
%description
89e5f4
libmemcached is a C/C++ client library and tools for the memcached server
89e5f4
(http://memcached.org/). It has been designed to be light on memory
89e5f4
usage, and provide full access to server side methods.
89e5f4
89e5f4
It also implements several command line tools:
89e5f4
89e5f4
memaslap    Load testing and benchmarking a server
89e5f4
memcapable  Checking a Memcached server capibilities and compatibility
89e5f4
memcat      Copy the value of a key to standard output
89e5f4
memcp       Copy data to a server
89e5f4
memdump     Dumping your server
89e5f4
memerror    Translate an error code to a string
89e5f4
memexist    Check for the existance of a key
89e5f4
memflush    Flush the contents of your servers
89e5f4
memparse    Parse an option string
89e5f4
memping     Test to see if a server is available.
89e5f4
memrm       Remove a key(s) from the server
89e5f4
memslap     Generate testing loads on a memcached cluster
89e5f4
memstat     Dump the stats of your servers to standard output
89e5f4
memtouch    Touches a key
89e5f4
89e5f4
89e5f4
%package devel
89e5f4
Summary:    Header files and development libraries for %{name}
89e5f4
Requires:   %{name}%{?_isa} = %{version}-%{release}
89e5f4
Requires:   pkgconfig
89e5f4
%if %{with_sasl}
89e5f4
Requires:   cyrus-sasl-devel%{?_isa}
89e5f4
%endif
89e5f4
89e5f4
%description devel
89e5f4
This package contains the header files and development libraries
89e5f4
for %{name}. If you like to develop programs using %{name}, 
89e5f4
you will need to install %{name}-devel.
89e5f4
89e5f4
89e5f4
%package libs
89e5f4
Summary:    %{libname} libraries
89e5f4
89e5f4
%description libs
89e5f4
This package contains the %{libname} libraries version %{version}.
89e5f4
89e5f4
89e5f4
%prep
89e5f4
%setup -q -n %{libname}-%{version}
89e5f4
%patch0 -p1 -b .link
89e5f4
%patch1 -p1 -b .build
89e5f4
%patch2 -p1 -b .memparse-man
dde094
%patch3 -p1 -b .memaslap-help
89e5f4
89e5f4
mkdir examples
89e5f4
cp -p tests/*.{cc,h} examples/
89e5f4
89e5f4
89e5f4
%build
89e5f4
# option --with-memcached=false to disable server binary check (as we don't run test)
89e5f4
%configure \
89e5f4
%if %{with_tests}
89e5f4
   --with-memcached=%{_bindir}/memcached \
89e5f4
%else
89e5f4
   --with-memcached=false \
89e5f4
%endif
89e5f4
%if %{with_sasl}
89e5f4
   --enable-sasl \
89e5f4
%else
89e5f4
   --disable-sasl \
89e5f4
%endif
89e5f4
   --enable-libmemcachedprotocol \
89e5f4
   --enable-memaslap \
89e5f4
   --enable-dtrace \
89e5f4
   --disable-static
89e5f4
89e5f4
%if 0%{?fedora} < 14 && 0%{?rhel} < 7
89e5f4
# for warning: unknown option after '#pragma GCC diagnostic' kind
89e5f4
sed -e 's/-Werror//' -i Makefile
89e5f4
%endif
89e5f4
89e5f4
make %{_smp_mflags} V=1
89e5f4
89e5f4
89e5f4
%install
89e5f4
make install  DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS=""
89e5f4
89e5f4
# Hack: when sphinx-build too old (fedora < 14 and rhel < 7)
89e5f4
# install upstream provided man pages
89e5f4
if [ ! -d %{buildroot}%{_mandir}/man1 ]; then
89e5f4
   install -d %{buildroot}%{_mandir}/man1
89e5f4
   install -p -m 644 man/*1 %{buildroot}%{_mandir}/man1
89e5f4
   install -d %{buildroot}%{_mandir}/man3
89e5f4
   install -p -m 644 man/*3 %{buildroot}%{_mandir}/man3
89e5f4
fi
89e5f4
89e5f4
89e5f4
%check
89e5f4
%if %{with_tests}
89e5f4
: Run test suite
89e5f4
make test
89e5f4
%else
89e5f4
: Skip test suite
89e5f4
%endif
89e5f4
89e5f4
89e5f4
%files
89e5f4
%{_bindir}/mem*
89e5f4
%exclude %{_libdir}/lib*.la
89e5f4
%{_mandir}/man1/mem*
89e5f4
89e5f4
%files libs
89e5f4
%license COPYING
89e5f4
%doc AUTHORS README THANKS TODO ChangeLog
89e5f4
%{_libdir}/libhashkit.so.2*
89e5f4
%{_libdir}/libmemcached.so.11*
89e5f4
%{_libdir}/libmemcachedprotocol.so.0*
89e5f4
%{_libdir}/libmemcachedutil.so.2*
89e5f4
89e5f4
%files devel
89e5f4
%doc examples
89e5f4
%{_includedir}/libmemcached
89e5f4
%{_includedir}/libmemcached-1.0
89e5f4
%{_includedir}/libhashkit
89e5f4
%{_includedir}/libhashkit-1.0
89e5f4
%{_includedir}/libmemcachedprotocol-0.0
89e5f4
%{_includedir}/libmemcachedutil-1.0
89e5f4
%{_libdir}/libhashkit.so
89e5f4
%{_libdir}/libmemcached.so
89e5f4
%{_libdir}/libmemcachedprotocol.so
89e5f4
%{_libdir}/libmemcachedutil.so
89e5f4
%{_libdir}/pkgconfig/libmemcached.pc
89e5f4
%{_datadir}/aclocal/ax_libmemcached.m4
89e5f4
%{_mandir}/man3/libmemcached*
89e5f4
%{_mandir}/man3/libhashkit*
89e5f4
%{_mandir}/man3/memcached*
89e5f4
%{_mandir}/man3/hashkit*
89e5f4
89e5f4
89e5f4
%changelog
dde094
* Mon Oct 25 2021 Tomas Korbar <tkorbar@redhat.com> - 1.0.18-17
dde094
- fix also memaslap help text
dde094
- Related: rhbz#2008399
dde094
89e5f4
* Mon Oct 11 2021 Tomas Korbar <tkorbar@redhat.com> - 1.0.18-16
89e5f4
- fix typo in memaslap man page
89e5f4
- Resolves: rhbz#2008399
89e5f4
89e5f4
* Fri Jul 27 2018 Miroslav Lichvar <mlichvar@redhat.com> 1.0.18-15
89e5f4
- fix typo in memparse man page (#1609312)
89e5f4
89e5f4
* Mon Jul 09 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.0.18-14
89e5f4
- Change to python3-sphinx
89e5f4
89e5f4
* Tue Feb 20 2018 Remi Collet <remi@remirepo.net> - 1.0.18-13
89e5f4
- missing BR on C/C++ compilers
89e5f4
89e5f4
* Thu Feb 15 2018 Remi Collet <remi@remirepo.net> - 1.0.18-12
89e5f4
- drop ldconfig scriptlets
89e5f4
89e5f4
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.18-11
89e5f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
89e5f4
89e5f4
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.18-10
89e5f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
89e5f4
89e5f4
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.18-9
89e5f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
89e5f4
89e5f4
* Sun Feb 12 2017 Remi Collet <remi@fedoraproject.org> - 1.0.18-8
89e5f4
- add build patch to fix FTBFS
89e5f4
89e5f4
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.18-8
89e5f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
89e5f4
89e5f4
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.18-7
89e5f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
89e5f4
89e5f4
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.18-6
89e5f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
89e5f4
89e5f4
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.18-5
89e5f4
- Rebuilt for GCC 5 C++11 ABI change
89e5f4
89e5f4
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.18-4
89e5f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
89e5f4
89e5f4
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.18-3
89e5f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
89e5f4
89e5f4
* Wed Feb 19 2014 Remi Collet <remi@fedoraproject.org> - 1.0.18-2
89e5f4
- cleanups
89e5f4
89e5f4
* Wed Feb 19 2014 Remi Collet <remi@fedoraproject.org> - 1.0.18-1
89e5f4
- update to 1.0.18
89e5f4
- disable test suite (too much broken tests)
89e5f4
89e5f4
* Sat Dec 14 2013 Remi Collet <remi@fedoraproject.org> - 1.0.16-2
89e5f4
- move libraries in new libs sub packages
89e5f4
- add provides for bundled(bobjenkins-hash) #1041351
89e5f4
- apply libpthread workaround #1037707
89e5f4
- spec cleanups
89e5f4
89e5f4
* Tue Dec 03 2013 Ruben Kerkhof <ruben@rubenkerkhof.com> 1.0.16-2
89e5f4
- Fix linking against libpthread as a workaround for libtool bug #661333
89e5f4
89e5f4
* Mon Aug  5 2013 Remi Collet <remi@fedoraproject.org> - 1.0.16-1
89e5f4
- revert to 1.0.16 for fedora 20
89e5f4
89e5f4
* Mon Aug  5 2013 Remi Collet <remi@fedoraproject.org> - 1.0.17-2
89e5f4
- fix BR, libasan don't exist on all arch
89e5f4
- disable all sanitize options (only for dev)
89e5f4
89e5f4
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.17-2
89e5f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
89e5f4
89e5f4
* Thu Apr  4 2013 Remi Collet <remi@fedoraproject.org> - 1.0.17-1
89e5f4
- update to 1.0.17
89e5f4
- fix option --with-memcached and report regression
89e5f4
  https://bugs.launchpad.net/libmemcached/+bug/1164440
89e5f4
- broken build when -fsanitize=thread available
89e5f4
  https://bugs.launchpad.net/libmemcached/+bug/1164442
89e5f4
89e5f4
* Mon Feb  4 2013 Remi Collet <remi@fedoraproject.org> - 1.0.16-1
89e5f4
- update to 1.0.16
89e5f4
- ignore test result for memaslap (XFAIL but PASS)
89e5f4
  https://bugs.launchpad.net/libmemcached/+bug/1115357
89e5f4
89e5f4
* Sat Dec 29 2012 Remi Collet <remi@fedoraproject.org> - 1.0.15-1
89e5f4
- update to 1.0.15
89e5f4
- libmemcachedprotocol is back
89e5f4
- add memaslap command line tool
89e5f4
- report various issues to upstream
89e5f4
  https://bugs.launchpad.net/libmemcached/+bug/1094413 (libevent)
89e5f4
  https://bugs.launchpad.net/libmemcached/+bug/1094414 (c99 MODE)
89e5f4
89e5f4
* Sat Nov 17 2012 Remi Collet <remi@fedoraproject.org> - 1.0.14-1
89e5f4
- update to 1.0.14
89e5f4
- libmemcachedprotocol removed
89e5f4
- sasl support is back
89e5f4
- run test during build
89e5f4
- report various issues to upstream
89e5f4
  https://bugs.launchpad.net/libmemcached/+bug/1079994 (bigendian)
89e5f4
  https://bugs.launchpad.net/libmemcached/+bug/1079995 (config.h)
89e5f4
  https://bugs.launchpad.net/libmemcached/+bug/1079996 (dtrace)
89e5f4
  https://bugs.launchpad.net/libmemcached/+bug/1079997 (-ldl)
89e5f4
  https://bugs.launchpad.net/libmemcached/+bug/1080000 (touch)
89e5f4
89e5f4
* Sat Oct 20 2012 Remi Collet <remi@fedoraproject.org> - 1.0.13-1
89e5f4
- update to 1.0.13
89e5f4
89e5f4
* Fri Oct 19 2012 Remi Collet <remi@fedoraproject.org> - 1.0.12-2
89e5f4
- temporary hack: fix LIBMEMCACHED_VERSION_HEX value
89e5f4
89e5f4
* Thu Oct 11 2012 Remi Collet <remi@fedoraproject.org> - 1.0.12-1
89e5f4
- update to 1.0.12
89e5f4
- add aclocal/ax_lib_libmemcached.m4
89e5f4
- abi-compliance-checker verdict : Compatible
89e5f4
- uggly hack for man pages
89e5f4
89e5f4
* Tue Sep 25 2012 Karsten Hopp <karsten@redhat.com> 1.0.11-2
89e5f4
- fix defined but not used variable error on bigendian machines
89e5f4
89e5f4
* Sat Sep 22 2012 Remi Collet <remi@fedoraproject.org> - 1.0.11-1
89e5f4
- update to 1.0.11, soname bump to libmemcached.so.11
89e5f4
- drop broken SASL support
89e5f4
- don't generate parser (bison 2.6 not supported)
89e5f4
89e5f4
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-2
89e5f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
89e5f4
89e5f4
* Sun May 27 2012 Remi Collet <remi@fedoraproject.org> - 1.0.8-1
89e5f4
- update to 1.0.8
89e5f4
89e5f4
* Sun Apr 22 2012 Remi Collet <remi@fedoraproject.org> - 1.0.7-1
89e5f4
- update to 1.0.7
89e5f4
- regenerate parser using flex/bison (#816766)
89e5f4
89e5f4
* Sun Apr 22 2012 Remi Collet <remi@fedoraproject.org> - 1.0.6-2
89e5f4
- workaround for SASL detection
89e5f4
89e5f4
* Sat Apr 21 2012 Remi Collet <remi@fedoraproject.org> - 1.0.6-1
89e5f4
- update to 1.0.6
89e5f4
- soname bump to libmemcached.so.10 and libhashkit.so.2
89e5f4
89e5f4
* Sat Mar 03 2012 Remi Collet <remi@fedoraproject.org> - 1.0.4-1
89e5f4
- update to 1.0.4
89e5f4
- soname bump to libmemcached.so.9
89e5f4
- update description
89e5f4
89e5f4
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-3
89e5f4
- Rebuilt for c++ ABI breakage
89e5f4
89e5f4
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-2
89e5f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
89e5f4
89e5f4
* Thu Oct 27 2011 Remi Collet <remi@fedoraproject.org> - 1.0.2-1
89e5f4
- update to 1.0.2
89e5f4
89e5f4
* Sun Oct 16 2011 Remi Collet <remi@fedoraproject.org> - 0.53-1
89e5f4
- update to 0.53
89e5f4
89e5f4
* Sat Sep 17 2011 Remi Collet <remi@fedoraproject.org> - 0.52-1
89e5f4
- update to 0.52
89e5f4
89e5f4
* Sun Jul 31 2011 Remi Collet <remi@fedoraproject.org> - 0.51-1
89e5f4
- update to 0.51 (soname bump libmemcached.so.8)
89e5f4
89e5f4
* Thu Jun 02 2011 Remi Collet <Fedora@famillecollet.com> - 0.49-1
89e5f4
- update to 0.49
89e5f4
- add build option : --with tests
89e5f4
89e5f4
* Mon Feb 28 2011 Remi Collet <Fedora@famillecollet.com> - 0.47-1
89e5f4
- update to 0.47
89e5f4
- remove patch merged upstream
89e5f4
89e5f4
* Sun Feb 20 2011 Remi Collet <Fedora@famillecollet.com> - 0.46-2
89e5f4
- patch Makefile.in instead of include.am (to avoid autoconf)
89e5f4
- donc requires pkgconfig with arch
89e5f4
89e5f4
* Fri Feb 18 2011 Remi Collet <Fedora@famillecollet.com> - 0.46-1
89e5f4
- update to 0.46
89e5f4
89e5f4
* Sat Feb 12 2011 Remi Collet <Fedora@famillecollet.com> - 0.44-6
89e5f4
- arch specific requires
89e5f4
89e5f4
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.44-5
89e5f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
89e5f4
89e5f4
* Wed Nov 24 2010 Joe Orton <jorton@redhat.com> - 0.44-4
89e5f4
- repackage source tarball to remove non-free Hsieh hash code
89e5f4
89e5f4
* Sat Oct 02 2010 Remi Collet <Fedora@famillecollet.com> - 0.44-3
89e5f4
- improves SASL patch
89e5f4
89e5f4
* Sat Oct 02 2010 Remi Collet <Fedora@famillecollet.com> - 0.44-2
89e5f4
- enable SASL support
89e5f4
89e5f4
* Fri Oct 01 2010 Remi Collet <Fedora@famillecollet.com> - 0.44-1
89e5f4
- update to 0.44
89e5f4
- add soname version in %%file to detect change
89e5f4
89e5f4
* Fri Jul 30 2010 Remi Collet <Fedora@famillecollet.com> - 0.43-1
89e5f4
- update to 0.43
89e5f4
89e5f4
* Wed Jul 07 2010 Remi Collet <Fedora@famillecollet.com> - 0.42-1
89e5f4
- update to 0.42
89e5f4
89e5f4
* Tue May 04 2010 Remi Collet <Fedora@famillecollet.com> - 0.40-1
89e5f4
- update to 0.40 (new soname for libmemcached.so.5)
89e5f4
- new URI (site + source)
89e5f4
89e5f4
* Sat Mar 13 2010 Remi Collet <Fedora@famillecollet.com> - 0.38-1
89e5f4
- update to 0.38
89e5f4
89e5f4
* Sat Feb 06 2010 Remi Collet <Fedora@famillecollet.com> - 0.37-1
89e5f4
- update to 0.37 (soname bump)
89e5f4
- new libhashkit (should be a separated project in the futur)
89e5f4
89e5f4
* Sun Sep 13 2009 Remi Collet <Fedora@famillecollet.com> - 0.31-1
89e5f4
- update to 0.31
89e5f4
89e5f4
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.30-2
89e5f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
89e5f4
89e5f4
* Sun Jun 14 2009 Remi Collet <Fedora@famillecollet.com> - 0.30-1
89e5f4
- update to 0.30
89e5f4
89e5f4
* Tue May 19 2009 Remi Collet <Fedora@famillecollet.com> - 0.29-1
89e5f4
- update to 0.29
89e5f4
89e5f4
* Fri May 01 2009 Remi Collet <Fedora@famillecollet.com> - 0.28-2
89e5f4
- add upstream patch to disable nonfree hsieh hash method
89e5f4
89e5f4
* Sat Apr 25 2009 Remi Collet <Fedora@famillecollet.com> - 0.28-1
89e5f4
- Initial RPM from Brian Aker spec
89e5f4
- create -devel subpackage
89e5f4
- add %%post %%postun %%check section
89e5f4