summaryrefslogtreecommitdiffstats
path: root/libmemcached-last.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-03-24 15:58:20 +0100
committerRemi Collet <fedora@famillecollet.com>2014-03-24 15:58:20 +0100
commit5ae1a74fef05d393929cba9db140982c0245529f (patch)
tree47dc1d8a4bea944667c6d6158fbf2c7c607dc891 /libmemcached-last.spec
parent35eeedcddc76d5aaa1d09e3f9cac0f7dc9c46fbc (diff)
libmemcached: allow SCL build
Diffstat (limited to 'libmemcached-last.spec')
-rw-r--r--libmemcached-last.spec46
1 files changed, 42 insertions, 4 deletions
diff --git a/libmemcached-last.spec b/libmemcached-last.spec
index bde3aaf..5994967 100644
--- a/libmemcached-last.spec
+++ b/libmemcached-last.spec
@@ -10,16 +10,20 @@
%global with_tests %{?_witht_tests:1}%{!?_with_tests:0}
%global with_sasl 1
%global libname libmemcached
+%{?scl: %scl_package %{libname}}
# libmemcached >= 1.0.16 have soname 11
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
-Name: libmemcached
+# Standard build
+Name: %{libname}
%else
-Name: %{libname}-last
+# Build for parallel install
+%{?scl:Name: %{?scl_prefix}%{libname}}
+%{!?scl:Name: %{libname}-last}
%endif
Summary: Client library and command line tools for memcached server
Version: 1.0.18
-Release: 2%{?dist}
+Release: 3%{?dist}
License: BSD
Group: Applications/System
URL: http://libmemcached.org/
@@ -42,13 +46,19 @@ BuildRequires: memcached
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
BuildRequires: systemtap-sdt-devel
%endif
-BuildRequires: libevent-devel
+%if 0%{?scl:1}
+BuildRequires: %{?scl_prefix}runtime
+BuildRequires: %{?scl_prefix}libevent-devel > 2
+%else
+BuildRequires: libevent-devel > 2
%if "%{libname}" != "%{name}"
Conflicts: %{libname} < %{version}
Provides: %{libname} = %{version}-%{release}
Provides: %{libname}%{?_isa} = %{version}-%{release}
%endif
+%endif
+
Provides: bundled(bobjenkins-hash)
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
@@ -85,11 +95,13 @@ Requires: pkgconfig
%if %{with_sasl}
Requires: cyrus-sasl-devel%{?_isa}
%endif
+%if ! 0%{?scl:1}
%if "%{libname}" != "%{name}"
Conflicts: %{libname}-devel < %{version}
Provides: %{libname}-devel = %{version}-%{release}
Provides: %{libname}-devel%{?_isa} = %{version}-%{release}
%endif
+%endif
%description devel
This package contains the header files and development libraries
@@ -101,6 +113,15 @@ you will need to install %{name}-devel.
Summary: %{libname} libraries
Group: System Environment/Libraries
+%if 0%{?scl:1}
+Requires: %{?scl_prefix}libevent%{_isa} > 2
+Requires: openssl%{?_isa}
+Requires: libstdc++%{?_isa}
+%if %{with_sasl}
+Requires: cyrus-sasl-lib%{?_isa}
+%endif
+%endif
+
%description libs
This package contains the %{libname} libraries version %{version}.
%if "%{libname}" != "%{name}"
@@ -108,6 +129,15 @@ This package is designed to be installed beside %{libname}.
%endif
+%if 0%{?scl:1}
+# Filter in the SCL collection
+%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so}
+%{?filter_requires_in: %filter_requires_in %{_libdir}/.*\.so}
+%{?filter_requires_in: %filter_requires_in %{_bindir}/.*}
+%{?filter_setup}
+%endif
+
+
%prep
%setup -q -n %{libname}-%{version}
%patch0 -p1
@@ -117,6 +147,8 @@ cp -p tests/*.{cc,h} examples/
%build
+%{?scl: . %{_scl_scripts}/enable}
+
# option --with-memcached=false to disable server binary check (as we don't run test)
%configure \
%if %{with_tests}
@@ -144,6 +176,9 @@ make %{_smp_mflags} V=1
%install
rm -rf %{buildroot}
+
+%{?scl: . %{_scl_scripts}/enable}
+
make install DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS=""
# Hack: when sphinx-build too old (fedora < 14 and rhel < 7)
@@ -210,6 +245,9 @@ rm -rf %{buildroot}
%changelog
+* Sun Mar 23 2014 Remi Collet <remi@fedoraproject.org> - 1.0.18-3
+- allow SCL build
+
* Wed Feb 19 2014 Remi Collet <remi@fedoraproject.org> - 1.0.18-2
- cleanups