summaryrefslogtreecommitdiffstats
path: root/libmemcached-last.spec
diff options
context:
space:
mode:
Diffstat (limited to 'libmemcached-last.spec')
-rw-r--r--libmemcached-last.spec101
1 files changed, 46 insertions, 55 deletions
diff --git a/libmemcached-last.spec b/libmemcached-last.spec
index 0e7fdbc..6b3e022 100644
--- a/libmemcached-last.spec
+++ b/libmemcached-last.spec
@@ -1,5 +1,5 @@
-# remirepo spec file for libmemcached-last and <scl>-libmemcached
-# renamed for parallel/SCL installation, from:
+# remirepo spec file for libmemcached-opt
+# renamed for parallel installation, from:
#
# Fedora spec file for libmemcached
#
@@ -13,32 +13,22 @@
%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
-# Standard build
-Name: %{libname}
-
-%else
-# Build for parallel install - SCL
-%if 0%{?scl:1}
-%if "%{scl}" == "rh-php56"
-%global sub_prefix more-php56-
+%if 0%{?rhel} == 6 || 0%{?rhel} == 7
+%global move_to_opt 1
+Name: %{libname}-opt
+%global _prefix /opt/%{libname}
+%global __arch_install_post /bin/true
%else
-%global sub_prefix %{scl_prefix}
+%global move_to_opt 1
+Name: %{libname}
%endif
-Name: %{sub_prefix}%{libname}
-%else
-# Build for parallel install - last
-Name: %{libname}-last
-%endif
-%endif
Summary: Client library and command line tools for memcached server
Version: 1.0.18
-Release: 13%{?dist}
+Release: 1%{?dist}
License: BSD
URL: http://libmemcached.org/
# Original sources:
@@ -60,22 +50,18 @@ BuildRequires: python-sphinx
BuildRequires: memcached
BuildRequires: systemtap-sdt-devel
-%if 0%{?scl:1}
-BuildRequires: %{sub_prefix}libevent-devel > 2
+%if 0%{?rhel} == 6
+Requires: libevent2-devel
%else
BuildRequires: libevent-devel > 2
-%if "%{libname}" != "%{name}"
-Obsoletes: %{libname}10 < %{version}
-Conflicts: %{libname} < %{version}
-Provides: %{libname} = %{version}-%{release}
-Provides: %{libname}%{?_isa} = %{version}-%{release}
-%endif
%endif
Provides: bundled(bobjenkins-hash)
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Patch0: libmemcached-fix-linking-with-libpthread.patch
+# Fix: ISO C++ forbids comparison between pointer and integer [-fpermissive]
+Patch1: %{libname}-build.patch
%description
libmemcached is a C/C++ client library and tools for the memcached server
@@ -107,14 +93,6 @@ Requires: pkgconfig
%if %{with_sasl}
Requires: cyrus-sasl-devel%{?_isa}
%endif
-%if ! 0%{?scl:1}
-%if "%{libname}" != "%{name}"
-Obsoletes: %{libname}10-devel < %{version}
-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
@@ -125,9 +103,12 @@ you will need to install %{name}-devel.
%package libs
Summary: %{libname} libraries
-%if 0%{?scl:1}
-Requires: %{scl}-runtime
-Requires: %{sub_prefix}libevent%{_isa} > 2
+%if %{move_to_opt}
+%if 0%{?rhel} == 6
+Requires: libevent2%{_isa}
+%else
+Requires: libevent%{_isa} > 2
+%endif
Requires: openssl%{?_isa}
Requires: libstdc++%{?_isa}
%if %{with_sasl}
@@ -142,8 +123,8 @@ This package is designed to be installed beside %{libname}.
%endif
-%if 0%{?scl:1}
-# Filter in the SCL collection
+%if %{move_to_opt}
+# Filter in the /opt installation
%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so}
%{?filter_requires_in: %filter_requires_in %{_libdir}/.*\.so}
%{?filter_requires_in: %filter_requires_in %{_bindir}/.*}
@@ -153,22 +134,14 @@ This package is designed to be installed beside %{libname}.
%prep
%setup -q -n %{libname}-%{version}
-%patch0 -p1
+%patch0 -p1 -b .link
+%patch1 -p1 -b .build
mkdir examples
cp -p tests/*.{cc,h} examples/
%build
-%if 0%{?scl:1}
-. %{_scl_scripts}/enable
-export PKG_CONFIG_PATH=%{_libdir}/pkgconfig
-export LD_LIBRARY_PATH=%{_libdir}
-export CFLAGS=" %{optflags} $(pkg-config --cflags libevent)"
-export CXXFLAGS="%{optflags} $(pkg-config --cflags libevent)"
-export LDFLAGS="$(pkg-config --libs-only-L libevent)"
-%endif
-
# option --with-memcached=false to disable server binary check (as we don't run test)
%configure \
%if %{with_tests}
@@ -195,8 +168,6 @@ make %{_smp_mflags} V=1
%install
-%{?scl: . %{_scl_scripts}/enable}
-
make install DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS=""
# Hack: when sphinx-build too old (fedora < 14 and rhel < 7)
@@ -225,12 +196,24 @@ make test
%files
+%if %{move_to_opt}
+%dir %{_bindir}
+%dir %{_mandir}/man1
+%endif
%{_bindir}/mem*
%exclude %{_libdir}/lib*.la
%{_mandir}/man1/mem*
%files libs
-%doc AUTHORS COPYING README THANKS TODO ChangeLog
+%{!?_licensedir:%global license %%doc}
+%doc AUTHORS README THANKS TODO ChangeLog
+%license COPYING
+%if %{move_to_opt}
+%dir %{_prefix}
+%dir %{_datadir}
+%dir %{_mandir}
+%dir %{_libdir}
+%endif
%{_libdir}/libhashkit.so.2*
%{_libdir}/libmemcached.so.11*
%{_libdir}/libmemcachedprotocol.so.0*
@@ -238,6 +221,12 @@ make test
%files devel
%doc examples
+%if %{move_to_opt}
+%dir %{_includedir}
+%dir %{_datadir}/aclocal
+%dir %{_mandir}/man3
+%dir %{_libdir}/pkgconfig
+%endif
%{_includedir}/libmemcached
%{_includedir}/libmemcached-1.0
%{_includedir}/libhashkit
@@ -255,8 +244,10 @@ make test
%{_mandir}/man3/memcached*
%{_mandir}/man3/hashkit*
-
%changelog
+* Tue Nov 20 2018 Remi Collet <remi@remirepo.net> - 1.0.18-1
+- rename to libmemcached-opt and install in /opt/libmemcached
+
* Tue Feb 20 2018 Remi Collet <remi@remirepo.net> - 1.0.18-13
- missing BR on C/C++ compilers
- drop ldconfig scriptlets (F28+)