[libmemcached/f19] - move libraries in new libs sub packages - add provides for bundled(bobjenkins-hash) #1041351 - app

Remi Collet remi at fedoraproject.org
Sat Dec 14 06:51:59 UTC 2013


commit 9b5c0eaf07113de70e0a90d8951fb4a1f4c1e936
Author: Remi Collet <remi at fedoraproject.org>
Date:   Sat Dec 14 07:51:59 2013 +0100

    - move libraries in new libs sub packages
    - add provides for bundled(bobjenkins-hash) #1041351
    - apply libpthread workaround #1037707
    - spec cleanups

 libmemcached-fix-linking-with-libpthread.patch |   19 +++++++
 libmemcached.spec                              |   67 ++++++++++++++---------
 2 files changed, 60 insertions(+), 26 deletions(-)
---
diff --git a/libmemcached-fix-linking-with-libpthread.patch b/libmemcached-fix-linking-with-libpthread.patch
new file mode 100644
index 0000000..e5e21c4
--- /dev/null
+++ b/libmemcached-fix-linking-with-libpthread.patch
@@ -0,0 +1,19 @@
+diff -up libmemcached-1.0.16/build-aux/ltmain.sh.orig libmemcached-1.0.16/build-aux/ltmain.sh
+--- libmemcached-1.0.16/build-aux/ltmain.sh.orig	2013-12-03 16:36:53.222107642 +0100
++++ libmemcached-1.0.16/build-aux/ltmain.sh	2013-12-03 16:37:35.770132249 +0100
+@@ -5664,6 +5664,15 @@ func_mode_link ()
+ 	    *" $arg "*) ;;
+ 	    * ) func_append new_inherited_linker_flags " $arg" ;;
+ 	esac
++	# As we are forced to pass -nostdlib to g++ during linking, the option
++	# -pthread{,s} is not in effect;  add the -lpthread to $deplist
++	# explicitly to link correctly.
++	if test "$tagname" = CXX -a x"$with_gcc" = xyes; then
++	  case "$arg" in
++	    -pthread*) func_append deplibs " -lpthread" ;;
++	  esac
++	fi
++
+ 	continue
+ 	;;
+ 
diff --git a/libmemcached.spec b/libmemcached.spec
index b81ce74..22fdbab 100644
--- a/libmemcached.spec
+++ b/libmemcached.spec
@@ -1,13 +1,13 @@
-# Regression tests take a long time, you can skip 'em with this
-%{!?runselftest: %{expand: %%global runselftest 1}}
+# Regression tests take a long time, you can skip 'em using --without tests
+%global with_tests       %{?_without_tests:0}%{!?_without_tests:1}
 %global with_sasl        1
 
 Name:      libmemcached
 Summary:   Client library and command line tools for memcached server
 Version:   1.0.16
-Release:   1%{?dist}
+Release:   2%{?dist}
 License:   BSD
-Group:     System Environment/Libraries
+Group:     Applications/System
 URL:       http://libmemcached.org/
 # Original sources:
 #   http://launchpad.net/libmemcached/1.0/%{version}/+download/libmemcached-%{version}.tar.gz
@@ -17,7 +17,6 @@ URL:       http://libmemcached.org/
 # "-exhsieh" tarball.
 Source0:   libmemcached-%{version}-exhsieh.tar.gz
 
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 %if %{with_sasl}
 BuildRequires: cyrus-sasl-devel
 %endif
@@ -30,6 +29,10 @@ BuildRequires: systemtap-sdt-devel
 %endif
 BuildRequires: libevent-devel
 
+Provides:      bundled(bobjenkins-hash)
+Requires:      %{name}-libs%{?_isa} = %{version}-%{release}
+
+Patch0: libmemcached-fix-linking-with-libpthread.patch
 
 %description
 libmemcached is a C/C++ client library and tools for the memcached server
@@ -55,12 +58,12 @@ memtouch    Touches a key
 
 
 %package devel
-Summary: Header files and development libraries for %{name}
-Group: Development/Libraries
-Requires: %{name}%{?_isa} = %{version}-%{release}
-Requires: pkgconfig
+Summary:    Header files and development libraries for %{name}
+Group:      Development/Libraries
+Requires:   %{name}%{?_isa} = %{version}-%{release}
+Requires:   pkgconfig
 %if %{with_sasl}
-Requires: cyrus-sasl-devel%{?_isa}
+Requires:   cyrus-sasl-devel%{?_isa}
 %endif
 
 %description devel
@@ -68,9 +71,17 @@ This package contains the header files and development libraries
 for %{name}. If you like to develop programs using %{name}, 
 you will need to install %{name}-devel.
 
+%package libs
+Summary:    %{name} libraries
+Group:      System Environment/Libraries
+
+%description libs
+This package contains the %{name} libraries version %{version}.
+
 
 %prep
 %setup -q
+%patch0 -p1
 
 mkdir examples
 cp -p tests/*.{cc,h} examples/
@@ -79,7 +90,7 @@ cp -p tests/*.{cc,h} examples/
 %build
 # option --with-memcached=false to disable server binary check (as we don't run test)
 %configure \
-%if %{runselftest}
+%if %{with_tests}
    --with-memcached=%{_bindir}/memcached \
 %else
    --with-memcached=false \
@@ -99,11 +110,10 @@ cp -p tests/*.{cc,h} examples/
 sed -e 's/-Werror//' -i Makefile
 %endif
 
-make %{_smp_mflags}
+make %{_smp_mflags} V=1
 
 
 %install
-rm -rf %{buildroot}
 make install  DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS=""
 
 # Hack: when sphinx-build too old (fedora < 14 and rhel < 7)
@@ -117,7 +127,7 @@ fi
 
 
 %check
-%if %{runselftest}
+%if %{with_tests}
 make test 2>&1 | tee rpmtests.log
 # Ignore test result for memaslap (XFAIL but PASS)
 # https://bugs.launchpad.net/libmemcached/+bug/1115357
@@ -127,33 +137,29 @@ then
 else
   exit 1
 fi
+%else
+: Skip test suite
 %endif
 
 
-%clean
-rm -rf %{buildroot}
+%post   libs -p /sbin/ldconfig
 
+%postun libs -p /sbin/ldconfig
 
-%post -p /sbin/ldconfig
-
-
-%postun -p /sbin/ldconfig
- 
 
 %files
-%defattr (-,root,root,-) 
-%doc AUTHORS COPYING README THANKS TODO ChangeLog
 %{_bindir}/mem*
 %exclude %{_libdir}/lib*.la
+%{_mandir}/man1/mem*
+
+%files libs
+%doc AUTHORS COPYING README THANKS TODO ChangeLog
 %{_libdir}/libhashkit.so.2*
 %{_libdir}/libmemcached.so.11*
 %{_libdir}/libmemcachedprotocol.so.0*
 %{_libdir}/libmemcachedutil.so.2*
-%{_mandir}/man1/mem*
-
 
 %files devel
-%defattr (-,root,root,-) 
 %doc examples
 %{_includedir}/libmemcached
 %{_includedir}/libmemcached-1.0
@@ -174,6 +180,15 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Sat Dec 14 2013 Remi Collet <remi at fedoraproject.org> - 1.0.16-2
+- move libraries in new libs sub packages
+- add provides for bundled(bobjenkins-hash) #1041351
+- apply libpthread workaround #1037707
+- spec cleanups
+
+* Tue Dec 03 2013 Ruben Kerkhof <ruben at rubenkerkhof.com> 1.0.16-2
+- Fix linking against libpthread as a workaround for libtool bug #661333
+
 * Mon Feb  4 2013 Remi Collet <remi at fedoraproject.org> - 1.0.16-1
 - update to 1.0.16
 - ignore test result for memaslap (XFAIL but PASS)


More information about the scm-commits mailing list