summaryrefslogtreecommitdiffstats
path: root/librabbitmq.spec
diff options
context:
space:
mode:
Diffstat (limited to 'librabbitmq.spec')
-rw-r--r--librabbitmq.spec55
1 files changed, 32 insertions, 23 deletions
diff --git a/librabbitmq.spec b/librabbitmq.spec
index 166b800..fb471ce 100644
--- a/librabbitmq.spec
+++ b/librabbitmq.spec
@@ -1,4 +1,7 @@
-# spec file for librabbitmq
+# remirepo spec file for librabbitmq-last
+# renamed to allow parallel installation
+#
+# Fedora spec file for librabbitmq
#
# Copyright (c) 2012-2015 Remi Collet
# License: CC-BY-SA
@@ -7,10 +10,14 @@
# Please, preserve the changelog entries
#
+%global gh_commit 4dde30ce8d984edda540349f57eb7995a87ba9de
+%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
+%global gh_owner alanxz
+%global gh_project rabbitmq-c
+%global libname librabbitmq
# soname 4 since 0.6.0 (Fedora 23)
# soname 1 up to 0.5.2
-%global libname librabbitmq
-%global soname 4
+%global soname 4
%if 0%{?fedora} < 23
Name: %{libname}-last
@@ -18,16 +25,20 @@ Name: %{libname}-last
Name: %{libname}
%endif
Summary: Client library for AMQP
-Version: 0.6.0
+Version: 0.7.0
Release: 1%{?dist}
License: MIT
Group: System Environment/Libraries
URL: https://github.com/alanxz/rabbitmq-c
-Source0: https://github.com/alanxz/rabbitmq-c/releases/download/v%{version}/rabbitmq-c-%{version}.tar.gz
+Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: libtool
+%if 0%{?rhel} == 5
+BuildRequires: cmake28
+%else
+BuildRequires: cmake > 2.8
+%endif
BuildRequires: openssl-devel
# For tools
%if 0%{?rhel} == 5
@@ -52,7 +63,7 @@ Summary: Header files and development libraries for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%if "%{name}" != %{libname}
-Conflicts: %{libname}-devel
+Conflicts: %{libname}-devel < %{version}
Provides: %{libname}-devel = %{version}-%{release}
%endif
@@ -66,7 +77,7 @@ Summary: Example tools built using the librabbitmq package
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}
%if "%{name}" != %{libname}
-Conflicts: %{libname}-tools
+Conflicts: %{libname}-tools < %{version}
Provides: %{libname}-tools = %{version}-%{release}
%endif
@@ -82,27 +93,21 @@ amqp-publish Publish a message on an AMQP server
%prep
-%setup -q -n rabbitmq-c-%{version}
+%setup -q -n %{gh_project}-%{gh_commit}
# Copy sources to be included in -devel docs.
cp -pr examples Examples
%build
+# static lib required for tests
%if 0%{?rhel} == 5
-: keep upstream configure
+%cmake28 \
%else
-autoreconf -i
+%cmake \
%endif
-
-%configure \
- --enable-tools \
- --enable-docs \
- --with-ssl=openssl
-
-# rpath removal
-sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
-sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+ -DBUILD_TOOLS_DOCS:BOOL=ON \
+ -DBUILD_STATIC_LIBS:BOOL=ON
make %{_smp_mflags}
@@ -110,7 +115,7 @@ make %{_smp_mflags}
%install
make install DESTDIR="%{buildroot}"
-rm %{buildroot}%{_libdir}/%{libname}.la
+rm %{buildroot}%{_libdir}/%{libname}.a
%check
@@ -118,8 +123,7 @@ rm %{buildroot}%{_libdir}/%{libname}.la
grep @ %{buildroot}%{_libdir}/pkgconfig/librabbitmq.pc && exit 1
: upstream tests
-export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
-make check
+make test
%clean
@@ -154,6 +158,11 @@ rm -rf %{buildroot}
%changelog
+* Fri Jul 3 2015 Remi Collet <remi@fedoraproject.org> - 0.7.0-1
+- update to 0.7.0
+- swicth to cmake
+- switch from upstream tarball to github sources
+
* Mon Apr 20 2015 Remi Collet <remi@fedoraproject.org> - 0.6.0-1
- update to 0.6.0
- soname changed to .4