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