Rebased on Proton 0.6.

- Update spec to delete ruby and perl5 directories if Cmake creates them.
- Removed Java sub-packages - those will be packaged separate in future.
epel9
Darryl L. Pierce 11 years ago
parent 7c9c753bed
commit 54dec04ca8

1
.gitignore vendored

@ -1,3 +1,4 @@
/qpid-proton-c-0.3.tar.gz
/qpid-proton-0.4.tar.gz
/qpid-proton-0.5.tar.gz
/qpid-proton-0.6.tar.gz

@ -1,50 +0,0 @@
From 47a7169e007de34d720a50f415b70006664634f6 Mon Sep 17 00:00:00 2001
From: mcpierce <mcpierce@13f79535-47bb-0310-9956-ffa450edef68>
Date: Mon, 26 Aug 2013 20:07:22 +0000
Subject: [PATCH] PROTON-412: Fix the include and lib directories in
libqpid-proton.pc
If the paths aren't passed in from the command line as absolute then
prepends them with CMAKE_INSTALL_PREFIX before generated the package
config file.
git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/trunk@1517673 13f79535-47bb-0310-9956-ffa450edef68
---
proton-c/CMakeLists.txt | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/proton-c/CMakeLists.txt b/proton-c/CMakeLists.txt
index dacc9f8..42211ba 100644
--- a/proton-c/CMakeLists.txt
+++ b/proton-c/CMakeLists.txt
@@ -331,11 +331,22 @@ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/include/proton/version.h
DESTINATION ${INCLUDE_INSTALL_DIR}/proton)
# Pkg config file
-# Compatible variable names used in the pkg config files also for autoconf
-get_filename_component (PREFIX ${CMAKE_INSTALL_PREFIX} ABSOLUTE)
-get_filename_component (EXEC_PREFIX ${CMAKE_INSTALL_PREFIX} ABSOLUTE)
-get_filename_component (LIBDIR ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR} ABSOLUTE)
-get_filename_component (INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR} ABSOLUTE)
+# make sure the install prefix is absolute
+set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
+
+macro (pn_pkgconfig_dir NAME VALUE PREFIX)
+ if(IS_ABSOLUTE ${VALUE})
+ set(${NAME} "${VALUE}")
+ else(IS_ABSOLUTE ${VALUE})
+ set(${NAME} "${PREFIX}/${VALUE}")
+ endif(IS_ABSOLUTE ${VALUE})
+ get_filename_component(${NAME} ${${NAME}} ABSOLUTE)
+endmacro(pn_pkgconfig_dir)
+
+pn_pkgconfig_dir(PREFIX ${INSTALL_PREFIX} ${INSTALL_PREFIX})
+pn_pkgconfig_dir(EXEC_PREFIX ${INSTALL_PREFIX} ${INSTALL_PREFIX})
+pn_pkgconfig_dir(LIBDIR ${LIB_INSTALL_DIR} ${INSTALL_PREFIX})
+pn_pkgconfig_dir(INCLUDEDIR ${INCLUDE_INSTALL_DIR} ${INSTALL_PREFIX})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/libqpid-proton.pc.in
${CMAKE_CURRENT_BINARY_DIR}/libqpid-proton.pc @ONLY)
--
1.8.3.1

@ -0,0 +1,382 @@
From 9b28009aa2cc117017ce03690ebaae73f17dbcf7 Mon Sep 17 00:00:00 2001
From: "Darryl L. Pierce" <mcpierce@gmail.com>
Date: Mon, 6 Jan 2014 14:00:21 -0500
Subject: [PATCH] PROTON-445: Dynamic languages honor CMAKE_INSTALL_PREFIX
All languages are installed to $CMAKE_INSTALL_PREFIX/bindings/$LANG by
default.
If the ASK_BINDINGS macro is set to 1 at the command line, then each
language is interrogated as to the location of where they will be
installed, and that path modified wit the install prefix.
Individual languages can be told to interrogate for the install path
with:
ASK_[LANG]=1
---
CMakeLists.txt | 21 +++++++++++
README | 28 +++++++++++++++
proton-c/bindings/perl/CMakeLists.txt | 63 +++++++++++++++++----------------
proton-c/bindings/php/CMakeLists.txt | 57 ++++++++++++++++-------------
proton-c/bindings/python/CMakeLists.txt | 23 +++++++-----
proton-c/bindings/ruby/CMakeLists.txt | 44 ++++++++---------------
6 files changed, 144 insertions(+), 92 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a41970a..5f567dd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,6 +69,27 @@ set (SYSCONF_INSTALL_DIR etc CACHE PATH "System read only configuration director
set (SHARE_INSTALL_DIR share CACHE PATH "Shared read only data directory")
set (MAN_INSTALL_DIR share/man CACHE PATH "Manpage directory")
+## LANGUAGE BINDINGS
+# If ASK_$LANG is 1 then the language is queried for the directory into which
+# those language bindings are to be installed. If it is 0 then the bindings
+# are installed to $CMAKE_INSTALL_PREFIX/bindings/$LANG
+#
+set (BINDINGS_DIR bindings CACHE PATH "Default directory for language bindings")
+set (ASK_PERL 0 CACHE INTEGER "Ask Perl for install directories")
+set (ASK_PHP 0 CACHE INTEGER "Ask PHP for install directories")
+set (ASK_PYTHON 0 CACHE INTEGER "Ask Python for install directories")
+set (ASK_RUBY 0 CACHE INTEGER "Ask Ruby for install directories")
+set (ASK_BINDINGS 0 CACHE INTEGER "If 1 then ask all languages for their directory")
+
+if (ASK_BINDINGS)
+ set (ASK_PERL 1)
+ set (ASK_PHP 1)
+ set (ASK_PYTHON 1)
+ set (ASK_RUBY 1)
+endif (ASK_BINDINGS)
+
+message(STATUS "PYTHON_ARCHLIB_DIR=${PYTHON_ARCHLIB_DIR}")
+
if (WIN32)
set (EXAMPLES_INSTALL_DIR proton/examples)
endif (WIN32)
diff --git a/README b/README
index eca7f08..b8e7ce7 100644
--- a/README
+++ b/README
@@ -100,6 +100,34 @@ For more on the use of DESTDIR, see the following:
http://www.gnu.org/prep/standards/html_node/DESTDIR.html
+== Specifying The Language Binding Install Directories ==
+
+Most dynamic languages provide a way for asking where to install libraries in
+order to place them in a default search path.
+
+By default, Proton installs all dynamic language bindings into a central,
+default location:
+
+ $CMAKE_INSTALL_PREFIX/bindings/$LANG
+
+In order to use these bindings, you'll need to modify any environment variable
+to include the appropriate directories. The environment variables to be set are:
+
+ * Perl - Add the bindings/perl and bindings/perl/lib path to PERL5PATH
+ * PHP - Set the PHPRC variable to point to bindings/php/ini/php.ini
+ * Python - Add the bindings/python path to PYTHONPATH
+ * Ruby - Add the bindings/ruby and bindings/ruby/lib path to RUBYLIB
+
+You can tell any single language to install to the correct path for that
+language with:
+
+ cmake -DASK_[LANGUAGE]=1 .
+
+where [LANGUAGE] is one of: PERL, PHP, PYTHON or RUBY. To tell the build system
+to ask ALL languages, use:
+
+ cmake -DASK_BINDINGS=1 .
+
== Disable Building The Language Bindings ==
To disable any language bindings, you can disable them individually with:
diff --git a/proton-c/bindings/perl/CMakeLists.txt b/proton-c/bindings/perl/CMakeLists.txt
index 3f16436..158fdc6 100644
--- a/proton-c/bindings/perl/CMakeLists.txt
+++ b/proton-c/bindings/perl/CMakeLists.txt
@@ -22,15 +22,29 @@ include_directories("${PERL_INCLUDE_PATH}")
# Need to pass in the same compiler flags used to build Perl itself
execute_process(COMMAND perl -MConfig -e "print \$Config{ccflags}"
OUTPUT_VARIABLE PERLCFLAGS)
-if (NOT PERL_VENDORLIB)
+
+if (ASK_PERL)
+
execute_process(COMMAND perl -V:installvendorlib
- OUTPUT_VARIABLE PERL_VENDORLIB_OUTPUT_VARIABLE
- RESULT_VARIABLE PERL_VENDORLIB_RESULT_VARIABLE)
- if (NOT PERL_VENDORLIB_RESULT_VARIABLE)
- string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_VENDORLIB ${PERL_VENDORLIB_OUTPUT_VARIABLE})
- file(TO_CMAKE_PATH "${PERL_VENDORLIB}" PERL_VENDORLIB)
- endif (NOT PERL_VENDORLIB_RESULT_VARIABLE)
-endif (NOT PERL_VENDORLIB)
+ OUTPUT_VARIABLE PERL_ARCHLIB_OUTPUT_VARIABLE
+ RESULT_VARIABLE PERL_ARCHLIB_RESULT_VARIABLE)
+ if (NOT PERL_ARCHLIB_RESULT_VARIABLE)
+ string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_ARCHLIB ${PERL_ARCHLIB_OUTPUT_VARIABLE})
+ file(TO_CMAKE_PATH "${PERL_ARCHLIB}" PERL_ARCHLIB_DIR)
+ endif (NOT PERL_ARCHLIB_RESULT_VARIABLE)
+
+ execute_process(COMMAND perl -V:installsitelib
+ OUTPUT_VARIABLE PERL_SITELIB_OUTPUT_VARIABLE
+ RESULT_VARIABLE PERL_SITELIB_RESULT_VARIABLE)
+ if (NOT PERL_SITELIB_RESULT_VARIABLE)
+ string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_SITELIB ${PERL_SITELIB_OUTPUT_VARIABLE})
+ file(TO_CMAKE_PATH "${PERL_SITELIB}" PERL_SITELIB_DIR)
+ endif (NOT PERL_SITELIB_RESULT_VARIABLE)
+
+else (ASK_PERL)
+ set (PERL_ARCHLIB_DIR ${BINDINGS_DIR}/perl/lib${LIB_SUFFIX} CACHE PATH "Perl platform code")
+ set (PERL_SITELIB_DIR ${BINDINGS_DIR}/perl/ CACHE PATH "Perl code")
+endif (ASK_PERL)
set (CMAKE_C_FLAGS ${PERLCFLAGS})
@@ -39,45 +53,32 @@ swig_link_libraries(cproton_perl ${BINDING_DEPS} ${PERL_LIBRARY})
if ((${CMAKE_MAJOR_VERSION} EQUAL 2) AND (${CMAKE_MINOR_VERSION} LESS 8))
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton_perl.so
- DESTINATION ${PERL_ARCHLIB}
+ DESTINATION ${PERL_ARCHLIB_DIR}
COMPONENT ${QPID_COMPONENT_CLIENT}
)
else()
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcproton_perl.so
RENAME cproton_perl.so
- DESTINATION ${PERL_ARCHLIB}
+ DESTINATION ${PERL_ARCHLIB_DIR}
COMPONENT ${QPID_COMPONENT_CLIENT}
)
endif ((${CMAKE_MAJOR_VERSION} EQUAL 2) AND (${CMAKE_MINOR_VERSION} LESS 8))
-set(PERL_LIBRARIES
- lib/qpid/proton/array_helper.pm
- lib/qpid/proton/Constants.pm
- lib/qpid/proton/Data.pm
- lib/qpid/proton/Mapping.pm
- lib/qpid/proton/Message.pm
- lib/qpid/proton/Messenger.pm
-)
-
# get the perl vendor library if it's not already defined
-#if (NOT PERL_VENDORLIB)
+#if (NOT PERL_ARCHLIB)
# execute_process(COMMAND ${PERL_EXECUTABLE} "-V:installvendorlib"
-# OUTPUT_VARIABLE PERL_VENDORLIB_OUTPUT_VARIABLE
-# RESULT_VARIABLE PERL_VENDORLIB_RESULT_VARIABLE)
-#endif (!DEFINED PERL_VENDORLIB)
+# OUTPUT_VARIABLE PERL_ARCHLIB_OUTPUT_VARIABLE
+# RESULT_VARIABLE PERL_ARCHLIB_RESULT_VARIABLE)
+#endif (!DEFINED PERL_ARCHLIB)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton_perl.pm
- DESTINATION ${PERL_ARCHLIB}
+ DESTINATION ${PERL_ARCHLIB_DIR}
COMPONENT Perl)
install(FILES lib/qpid_proton.pm
- DESTINATION ${PERL_VENDORLIB}
- COMPONENT Perl)
-
-INSTALL(FILES lib/qpid/proton.pm
- DESTINATION ${PERL_VENDORLIB}/qpid
+ DESTINATION ${PERL_SITELIB_DIR}
COMPONENT Perl)
-INSTALL(FILES ${PERL_LIBRARIES}
- DESTINATION ${PERL_VENDORLIB}/qpid/proton
+INSTALL(DIRECTORY lib/qpid
+ DESTINATION ${PERL_SITELIB_DIR}
COMPONENT Perl)
diff --git a/proton-c/bindings/php/CMakeLists.txt b/proton-c/bindings/php/CMakeLists.txt
index d64d568..9b6ee2c 100644
--- a/proton-c/bindings/php/CMakeLists.txt
+++ b/proton-c/bindings/php/CMakeLists.txt
@@ -39,35 +39,44 @@ set_target_properties(cproton
PREFIX ""
LINK_FLAGS "${ALLOW_UNDEFINED}")
-execute_process(COMMAND ${PHP_CONFIG_EXE} --extension-dir
- OUTPUT_VARIABLE PHP_EXT_DIR_DEFAULT
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-execute_process(COMMAND ${PHP_CONFIG_EXE} --prefix
- OUTPUT_VARIABLE QPHP_PREFIX
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-execute_process(COMMAND ${PHP_CONFIG_EXE} --config-options
- OUTPUT_VARIABLE PHP_OPTS
- OUTPUT_STRIP_TRAILING_WHITESPACE)
+if (ASK_PHP)
+ execute_process(COMMAND ${PHP_CONFIG_EXE} --extension-dir
+ OUTPUT_VARIABLE PHP_EXT_DIR_DEFAULT
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process(COMMAND ${PHP_CONFIG_EXE} --prefix
+ OUTPUT_VARIABLE QPHP_PREFIX
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process(COMMAND ${PHP_CONFIG_EXE} --config-options
+ OUTPUT_VARIABLE PHP_OPTS
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
-set(GET_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/get_include_dir.php)
-execute_process(COMMAND ${PHP_EXE} -n ${GET_INCLUDE_DIR} ${QPHP_PREFIX}
- OUTPUT_VARIABLE PHP_INCLUDE_DIR_DEFAULT
- OUTPUT_STRIP_TRAILING_WHITESPACE)
+ set(GET_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/get_include_dir.php)
+ execute_process(COMMAND ${PHP_EXE} -n ${GET_INCLUDE_DIR} ${QPHP_PREFIX}
+ OUTPUT_VARIABLE PHP_INCLUDE_DIR_DEFAULT
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ if ("${PHP_INCLUDE_DIR_DEFAULT}" STREQUAL "")
+ set(PHP_INCLUDE_DIR_DEFAULT "/usr/share/php")
+ endif()
+
+ string(REGEX MATCH "--with-config-file-scan-dir=([^ ]*)" PHP_OPT_MATCH ${PHP_OPTS})
+ set (PHP_INI_DIR_DEFAULT ${CMAKE_MATCH_1})
+
+ if ("${PHP_INI_DIR_DEFAULT}" STREQUAL "")
+ set(PHP_INI_DIR_DEFAULT "/etc/php.d")
+ endif()
-if ("${PHP_INCLUDE_DIR_DEFAULT}" STREQUAL "")
- set(PHP_INCLUDE_DIR_DEFAULT "/usr/share/php")
-endif()
+ set(PHP_EXT_DIR ${PHP_EXT_DIR_DEFAULT} CACHE PATH "PHP extensions directory.")
+ set(PHP_INI_DIR ${PHP_INI_DIR_DEFAULT} CACHE PATH "Directory scanned for PHP ini files.")
+ set(PHP_INCLUDE_DIR ${PHP_INCLUDE_DIR_DEFAULT} CACHE PATH "PHP include directory.")
-string(REGEX MATCH "--with-config-file-scan-dir=([^ ]*)" PHP_OPT_MATCH ${PHP_OPTS})
-set (PHP_INI_DIR_DEFAULT ${CMAKE_MATCH_1})
+else (ASK_PHP)
-if ("${PHP_INI_DIR_DEFAULT}" STREQUAL "")
- set(PHP_INI_DIR_DEFAULT "/etc/php.d")
-endif()
+ set (PHP_EXT_DIR ${BINDINGS_DIR}/php CACHE PATH "PHP extensions directory")
+ set (PHP_INCLUDE_DIR ${BINDINGS_DIR}/php/include CACHE PATH "PHP include directory")
+ set (PHP_INI_DIR ${BINDINGS_DIR}/php/ini CACHE PATH "PHP ini directory")
-set(PHP_EXT_DIR ${PHP_EXT_DIR_DEFAULT} CACHE PATH "PHP extensions directory.")
-set(PHP_INI_DIR ${PHP_INI_DIR_DEFAULT} CACHE PATH "Directory scanned for PHP ini files.")
-set(PHP_INCLUDE_DIR ${PHP_INCLUDE_DIR_DEFAULT} CACHE PATH "PHP include directory.")
+endif (ASK_PHP)
install(TARGETS cproton
DESTINATION ${PHP_EXT_DIR}
diff --git a/proton-c/bindings/python/CMakeLists.txt b/proton-c/bindings/python/CMakeLists.txt
index a61277a..b63b6fd 100644
--- a/proton-c/bindings/python/CMakeLists.txt
+++ b/proton-c/bindings/python/CMakeLists.txt
@@ -30,12 +30,19 @@ set_target_properties(_cproton
find_package(PythonInterp REQUIRED)
-if (NOT PYTHON_SITEARCH_PACKAGES)
- execute_process(COMMAND ${PYTHON_EXECUTABLE}
- -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True)"
- OUTPUT_VARIABLE PYTHON_SITEARCH_PACKAGES
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-endif ()
+if (ASK_PYTHON)
+
+ if (NOT PYTHON_SITEARCH_PACKAGES)
+ execute_process(COMMAND ${PYTHON_EXECUTABLE}
+ -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True)"
+ OUTPUT_VARIABLE PYTHON_ARCHLIB_DIR
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ else (NOT PYTHON_SITEARCH_PACKAGES)
+ set (PYTHON_ARCHLIB_DIR "${PYTHON_SITEARCH_PACKAGES}")
+ endif ()
+else (ASK_PYTHON)
+ set (PYTHON_ARCHLIB_DIR ${BINDINGS_DIR}/python/lib${LIB_SUFFIX} CACHE PATH "Python platform code")
+endif (ASK_PYTHON)
install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile cproton.py
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
@@ -64,8 +71,8 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton.py
${CMAKE_CURRENT_SOURCE_DIR}/proton.py
${CMAKE_CURRENT_SOURCE_DIR}/proton.pyc
${CMAKE_CURRENT_SOURCE_DIR}/proton.pyo
- DESTINATION ${PYTHON_SITEARCH_PACKAGES}
+ DESTINATION ${PYTHON_ARCHLIB_DIR}
COMPONENT Python)
install(TARGETS _cproton
- DESTINATION ${PYTHON_SITEARCH_PACKAGES}
+ DESTINATION ${PYTHON_ARCHLIB_DIR}
COMPONENT Python)
diff --git a/proton-c/bindings/ruby/CMakeLists.txt b/proton-c/bindings/ruby/CMakeLists.txt
index 4d62819..5768907 100644
--- a/proton-c/bindings/ruby/CMakeLists.txt
+++ b/proton-c/bindings/ruby/CMakeLists.txt
@@ -26,38 +26,16 @@ set_target_properties(cproton-ruby
OUTPUT_NAME "cproton"
LINK_FLAGS "${CATCH_UNDEFINED}" )
-install(TARGETS cproton-ruby
- DESTINATION ${RUBY_ARCH_DIR}
- COMPONENT Ruby)
-
-# Install the Ruby libraries
-set(RUBY_LIBRARIES
- lib/qpid_proton/array.rb
- lib/qpid_proton/data.rb
- lib/qpid_proton/described.rb
- lib/qpid_proton/exception_handling.rb
- lib/qpid_proton/exceptions.rb
- lib/qpid_proton/hash.rb
- lib/qpid_proton/mapping.rb
- lib/qpid_proton/message_format.rb
- lib/qpid_proton/message.rb
- lib/qpid_proton/messenger.rb
- lib/qpid_proton/subscription.rb
- lib/qpid_proton/tracker.rb
- lib/qpid_proton/tracker_status.rb
-)
+if (ASK_RUBY)
-set(RUBY_ARCHLIB_DIR "${RUBY_VENDORLIB_DIR}")
-
-if (NOT RUBY_ARCHLIB_DIR)
execute_process(COMMAND ${RUBY_EXECUTABLE}
- -r rbconfig -e "print RbConfig::CONFIG['vendorarchdir'] || ''"
+ -r rbconfig -e "print RbConfig::CONFIG['vendorarchdir'] || ''"
RESULT_VARIABLE RESULT_RUBY_ARCHLIB_DIR
OUTPUT_VARIABLE OUTPUT_RUBY_ARCHLIB_DIR)
if(OUTPUT_RUBY_ARCHLIB_DIR STREQUAL "")
execute_process(COMMAND ${RUBY_EXECUTABLE}
- -r rbconfig -e "print RbConfig::CONFIG['sitearchdir'] || ''"
+ -r rbconfig -e "print RbConfig::CONFIG['archdir'] || ''"
RESULT_VARIABLE RESULT_RUBY_ARCHLIB_DIR
OUTPUT_VARIABLE OUTPUT_RUBY_ARCHLIB_DIR)
@@ -65,12 +43,20 @@ if (NOT RUBY_ARCHLIB_DIR)
set(RUBY_ARCHLIB_DIR "${OUTPUT_RUBY_ARCHLIB_DIR}")
-endif ()
+else (ASK_RUBY)
+
+ set (RUBY_SITELIB_DIR ${BINDINGS_DIR}/ruby CACHE PATH "Ruby portable code")
+ set (RUBY_ARCHLIB_DIR ${BINDINGS_DIR}/ruby/lib${LIB_SUFFIX} CACHE PATH "Ruby platform code")
+
+endif (ASK_RUBY)
+
+install(TARGETS cproton-ruby
+ DESTINATION ${RUBY_ARCHLIB_DIR}
+ COMPONENT Ruby)
install(FILES lib/qpid_proton.rb
DESTINATION ${RUBY_ARCHLIB_DIR}
COMPONENT Ruby)
-
-install(FILES ${RUBY_LIBRARIES}
- DESTINATION ${RUBY_ARCHLIB_DIR}/qpid_proton
+install(DIRECTORY lib/qpid_proton
+ DESTINATION ${RUBY_ARCHLIB_DIR}
COMPONENT Ruby)
--
1.8.4.2

@ -0,0 +1,34 @@
From 8dbabe96f2363893b83ac0bc4fa124bca0e46bf4 Mon Sep 17 00:00:00 2001
From: "Darryl L. Pierce" <mcpierce@gmail.com>
Date: Thu, 19 Dec 2013 09:47:57 -0500
Subject: [PATCH] PROTON-482: Fix the Ruby install directory.
Use vendorarchdir rather than vendorlibdir.
---
proton-c/bindings/ruby/CMakeLists.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/proton-c/bindings/ruby/CMakeLists.txt b/proton-c/bindings/ruby/CMakeLists.txt
index 65c71f1..4d62819 100644
--- a/proton-c/bindings/ruby/CMakeLists.txt
+++ b/proton-c/bindings/ruby/CMakeLists.txt
@@ -51,13 +51,13 @@ set(RUBY_ARCHLIB_DIR "${RUBY_VENDORLIB_DIR}")
if (NOT RUBY_ARCHLIB_DIR)
execute_process(COMMAND ${RUBY_EXECUTABLE}
- -r rbconfig -e "print RbConfig::CONFIG['vendorlibdir']"
+ -r rbconfig -e "print RbConfig::CONFIG['vendorarchdir'] || ''"
RESULT_VARIABLE RESULT_RUBY_ARCHLIB_DIR
OUTPUT_VARIABLE OUTPUT_RUBY_ARCHLIB_DIR)
- if(NOT RESULT_RUBY_ARCHLIB_DIR AND OUTPUT_RUBY_ARCHLIB_DIR )
+ if(OUTPUT_RUBY_ARCHLIB_DIR STREQUAL "")
execute_process(COMMAND ${RUBY_EXECUTABLE}
- -r rbconfig -e "print RbConfig::CONFIG['sitearchdir']"
+ -r rbconfig -e "print RbConfig::CONFIG['sitearchdir'] || ''"
RESULT_VARIABLE RESULT_RUBY_ARCHLIB_DIR
OUTPUT_VARIABLE OUTPUT_RUBY_ARCHLIB_DIR)
--
1.8.3.1

@ -1,14 +1,16 @@
%global proton_datadir %{_datadir}/proton-%{version}
Name: qpid-proton
Version: 0.5
Release: 3%{?dist}
Version: 0.6
Release: 1%{?dist}
Summary: A high performance, lightweight messaging library
License: ASL 2.0
URL: http://qpid.apache.org/proton/
Source0: http://www.apache.org/dist/qpid/proton/%{version}/%{name}-%{version}.tar.gz
Patch1: 01-PROTON-445-Dynamic-languages-honor-CMAKE_INSTALL_PRE.patch
BuildRequires: cmake >= 2.6
BuildRequires: swig
BuildRequires: pkgconfig
@ -18,13 +20,7 @@ BuildRequires: openssl-devel
BuildRequires: python-devel
BuildRequires: epydoc
# Java
BuildRequires: maven-local
BuildRequires: mockito
BuildRequires: bouncycastle
# BZ#1000620
Patch1: 01-PROTON-412-Fix-the-include-and-lib-directories-in-li.patch
%description
Proton is a high performance, lightweight messaging library. It can be used in
@ -34,8 +30,9 @@ standard. Using Proton it is trivial to integrate with the AMQP 1.0 ecosystem
from any platform, environment, or language.
%package -n qpid-proton-c
Summary: C librarys for Qpid Proton
Summary: C libraries for Qpid Proton
Obsoletes: qpid-proton < %{version}-%{release}
Provides: qpid-proton = %{version}-%{release}
@ -62,6 +59,7 @@ Provides: qpid-proton = %{version}-%{release}
%postun -n qpid-proton-c -p /sbin/ldconfig
%package -n qpid-proton-c-devel
Requires: qpid-proton-c%{?_isa} = %{version}-%{release}
Summary: Development libraries for writing messaging apps with Qpid Proton
@ -78,6 +76,8 @@ Provides: qpid-proton-devel = %{version}-%{release}
%{_includedir}/proton
%{_libdir}/libqpid-proton.so
%{_libdir}/pkgconfig/libqpid-proton.pc
%{_datadir}/proton/examples
%package -n qpid-proton-c-devel-doc
@ -89,9 +89,7 @@ BuildArch: noarch
%files -n qpid-proton-c-devel-doc
%defattr(-,root,root,-)
%{proton_datadir}/docs/api-c
%{_datadir}/proton/examples
%doc %{proton_datadir}/docs/api-c
@ -102,7 +100,6 @@ Requires: qpid-proton-c%{?_isa} = %{version}-%{release}
Requires: python
%description -n python-qpid-proton
%{summary}.
@ -114,6 +111,7 @@ Requires: python
%{python_sitearch}/proton.*
%package -n python-qpid-proton-doc
Summary: Documentation for the Python language bindings for Qpid Proton
BuildArch: noarch
@ -125,60 +123,40 @@ BuildArch: noarch
%files -n python-qpid-proton-doc
%defattr(-,root,root,-)
%{proton_datadir}/docs
%package -n qpid-proton-java
Summary: Java libraries for Qpid Proton
%description -n qpid-proton-java
Java language bindings for the Qpid Proton messaging framework
%package -n qpid-proton-javadoc
Summary: Javadocs for Qpid Proton
%description -n qpid-proton-javadoc
This package contains the API documentation for %{name}.
%files -n qpid-proton-java -f .mfiles
%dir %{_javadir}/%{name}
%files -n qpid-proton-javadoc -f .mfiles-javadoc
%doc %{proton_datadir}/docs/api-py
%prep
%setup -q -n %{name}-%{version}
%patch1 -p1
sed -i 's|bcpkix-jdk15on|bcprov-jdk16|' proton-j/proton/pom.xml
%pom_disable_module "contrib/proton-hawtdispatch" proton-j/pom.xml
%pom_disable_module "tests"
%build
%cmake -DPROTON_DISABLE_RPATH=true .
%cmake \
-DPROTON_DISABLE_RPATH=true \
-DPYTHON_ARCHLIB_DIR=%{python_sitearch} \
.
make all docs %{?_smp_mflags}
%mvn_build
%install
%make_install
%mvn_install
chmod +x %{buildroot}%{python_sitearch}/_cproton.so
# clean up files that are not shipped
rm -rf %{buildroot}%{_libdir}/perl5
rm -rf %{buildroot}%{_libdir}/php
rm -rf %{buildroot}%{_libdir}/ruby
rm -rf %{buildroot}%{_libdir}/java/*.jar
rm -rf %{buildroot}%{_exec_prefix}/bindings
rm -rf %{buildroot}%{_libdir}/java
rm -rf %{buildroot}%{_libdir}/libproton-jni.so
rm -rf %{buildroot}%{_datarootdir}/php
rm -rf %{buildroot}%{_datarootdir}/java/*.jar
rm -rf %{buildroot}%{_sysconfdir}/php.d
rm -rf %{buildroot}%{_datarootdir}/java
rm -rf %{buildroot}%{_libdir}/proton.cmake
%changelog
* Thu Jan 16 2014 Darryl L. Pierce <dpierce@redhat.com> - 0.6-1
- Rebased on Proton 0.6.
- Update spec to delete ruby and perl5 directories if Cmake creates them.
- Removed Java sub-packages - those will be packaged separate in future.
* Thu Sep 12 2013 Marek Goldmann <mgoldman@redhat.com> - 0.5-3
- Add java bindings
@ -201,7 +179,7 @@ rm -rf %{buildroot}%{_sysconfdir}/php.d
- Provide examples for qpid-proton-c
- Resolves: BZ#975723
* Fri Apr 4 2013 Darryl L. Pierce <dpierce@redhat.com> - 0.4-2.2
* Fri Apr 5 2013 Darryl L. Pierce <dpierce@redhat.com> - 0.4-2.2
- Added Obsoletes and Provides for packages whose names changed.
- Resolves: BZ#948784

@ -1 +1 @@
fb2dc704e4d2727d664966f301bfb017 qpid-proton-0.5.tar.gz
8987587270dd8208cab072daa44cdc37 qpid-proton-0.6.tar.gz

Loading…
Cancel
Save