[qpid-cpp/master-move-to-cmake] Renamed the patch files to be consistent with the patch numbers.
Darryl L. Pierce
mcpierce at fedoraproject.org
Tue Jul 24 13:46:56 UTC 2012
commit cdd2c8a17c55fceadfaafeaf53d5aaf8b9718dbd
Author: Darryl L. Pierce <dpierce at redhat.com>
Date: Mon Jul 23 11:49:32 2012 -0400
Renamed the patch files to be consistent with the patch numbers.
- Removed the library so version macro.
- Move the build system to use Cmake.
- Removed perl-qpid as a subpackage since it's a separate standalone package.
...ch => 00-make-BrokerImportExport.h-public.patch | 0
...tch => 01-Remove-colons-from-conditionals.patch | 0
...-encoding.patch => 02-Fix-string-encoding.patch | 0
03-Fixes-Cmake-for-ruby-1.9.patch | 71 +++
04-Fixes-unsigned-16-bit-ints.patch | 27 ++
05-Store-looks-for-libs-under-Cmake.patch | 31 ++
06-Fix-python-sitearch-directory.patch | 57 +++
07-Adds-LIB_INSTALL_DIR-to-Cmake.patch | 37 ++
08-Move-Cmake-installed-files.patch | 239 ++++++++++
09-Add-CMake-files-to-examples.patch | 475 ++++++++++++++++++++
10-Updated-the-library-so-versions.patch | 42 ++
qpid-cpp.spec | 145 +++----
12 files changed, 1043 insertions(+), 81 deletions(-)
---
diff --git a/01-make-BrokerImportExport.h-public.patch b/00-make-BrokerImportExport.h-public.patch
similarity index 100%
rename from 01-make-BrokerImportExport.h-public.patch
rename to 00-make-BrokerImportExport.h-public.patch
diff --git a/02-Remove-colons-from-conditionals.patch b/01-Remove-colons-from-conditionals.patch
similarity index 100%
rename from 02-Remove-colons-from-conditionals.patch
rename to 01-Remove-colons-from-conditionals.patch
diff --git a/03-Fix-string-encoding.patch b/02-Fix-string-encoding.patch
similarity index 100%
rename from 03-Fix-string-encoding.patch
rename to 02-Fix-string-encoding.patch
diff --git a/03-Fixes-Cmake-for-ruby-1.9.patch b/03-Fixes-Cmake-for-ruby-1.9.patch
new file mode 100644
index 0000000..318e840
--- /dev/null
+++ b/03-Fixes-Cmake-for-ruby-1.9.patch
@@ -0,0 +1,71 @@
+From a22d7f6bba97f732f059d9824509cbfa2013d858 Mon Sep 17 00:00:00 2001
+From: "Darryl L. Pierce" <dpierce at redhat.com>
+Date: Fri, 29 Jun 2012 16:41:18 -0400
+Subject: [PATCH] Fixes the Cmake build process for the Ruby language
+ bindings.
+
+There were two errors before:
+ * a typo - RUBY_INCLUDE_DIR instead of RUBY_INCLUDE_DIRS
+ * the include paths were not being set properly
+---
+ qpid/cpp/bindings/qmf/ruby/CMakeLists.txt | 3 ++-
+ qpid/cpp/bindings/qmf2/ruby/CMakeLists.txt | 5 ++---
+ qpid/cpp/bindings/qpid/ruby/CMakeLists.txt | 4 ++--
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/qpid/cpp/bindings/qmf/ruby/CMakeLists.txt b/qpid/cpp/bindings/qmf/ruby/CMakeLists.txt
+index 4b6ba2c..edb5d88 100644
+--- a/qpid/cpp/bindings/qmf/ruby/CMakeLists.txt
++++ b/qpid/cpp/bindings/qmf/ruby/CMakeLists.txt
+@@ -21,7 +21,8 @@
+ ## Use Swig to generate a literal binding to the C++ API
+ ##------------------------------------------------------
+ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES CPLUSPLUS ON)
+-set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include")
++
++INCLUDE_DIRECTORIES(${RUBY_INCLUDE_DIRS} ${qpid-cpp_SOURCE_DIR}/include)
+
+ swig_add_module(qmfengine_ruby ruby ${CMAKE_CURRENT_SOURCE_DIR}/ruby.i)
+ swig_link_libraries(qmfengine_ruby qmf qmfconsole ${RUBY_LIBRARY})
+diff --git a/qpid/cpp/bindings/qmf2/ruby/CMakeLists.txt b/qpid/cpp/bindings/qmf2/ruby/CMakeLists.txt
+index 3bc97cf..3a34143 100644
+--- a/qpid/cpp/bindings/qmf2/ruby/CMakeLists.txt
++++ b/qpid/cpp/bindings/qmf2/ruby/CMakeLists.txt
+@@ -21,13 +21,12 @@
+ ## Use Swig to generate a literal binding to the C++ API
+ ##------------------------------------------------------
+ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES CPLUSPLUS ON)
+-set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include")
++INCLUDE_DIRECTORIES(${RUBY_INCLUDE_DIRS} ${qpid-cpp_SOURCE_DIR}/include)
++
+
+ swig_add_module(cqmf2_ruby ruby ${CMAKE_CURRENT_SOURCE_DIR}/ruby.i)
+ swig_link_libraries(cqmf2_ruby qmf2 ${RUBY_LIBRARY})
+
+-set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-I${RUBY_INCLUDE_DIR} -I${qpid-cpp_SOURCE_DIR}/include")
+-
+ ##----------------------------------
+ ## Install the complete Ruby binding
+ ##----------------------------------
+diff --git a/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt b/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt
+index 8a8c88b..186e307 100644
+--- a/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt
++++ b/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt
+@@ -30,12 +30,12 @@ set(GEM_OUTPUT_FILE ${GEM_OUTPUT_PATH}/pkg/qpid-${qpidc_version}.0.gem)
+ ## Use Swig to generate a literal binding to the C++ API
+ ##------------------------------------------------------
+ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES CPLUSPLUS ON)
+-set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include")
++INCLUDE_DIRECTORIES(${RUBY_INCLUDE_DIRS} ${qpid-cpp_SOURCE_DIR}/include)
+
+ swig_add_module(cqpid_ruby ruby ${CMAKE_CURRENT_SOURCE_DIR}/ruby.i)
+ swig_link_libraries(cqpid_ruby qpidmessaging qpidtypes qmf2 ${RUBY_LIBRARY})
+
+-set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I${RUBY_INCLUDE_DIR} -I${qpid-cpp_SOURCE_DIR}/include")
++set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing")
+
+ ##----------------------------------
+ ## Install the complete Ruby binding
+--
+1.7.10.4
+
diff --git a/04-Fixes-unsigned-16-bit-ints.patch b/04-Fixes-unsigned-16-bit-ints.patch
new file mode 100644
index 0000000..46fb85a
--- /dev/null
+++ b/04-Fixes-unsigned-16-bit-ints.patch
@@ -0,0 +1,27 @@
+From f4173a43723e9d27cbb21488725736ee0379c6b3 Mon Sep 17 00:00:00 2001
+From: tross <tross at 13f79535-47bb-0310-9956-ffa450edef68>
+Date: Mon, 16 Apr 2012 15:40:36 +0000
+Subject: [PATCH] QPID-3926 - Fixes how unsigned 16 bit ints are assigned in
+ the UUID test. Applied patch from Darryl Pierce.
+
+git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1326654 13f79535-47bb-0310-9956-ffa450edef68
+---
+ qpid/cpp/src/tests/Uuid.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/qpid/cpp/src/tests/Uuid.cpp b/qpid/cpp/src/tests/Uuid.cpp
+index 0195455..f85a297 100644
+--- a/qpid/cpp/src/tests/Uuid.cpp
++++ b/qpid/cpp/src/tests/Uuid.cpp
+@@ -48,7 +48,7 @@ QPID_AUTO_TEST_CASE(testUuidCtor) {
+ for_each(uuids.begin(), uuids.end(), unique);
+ }
+
+-boost::array<uint8_t, 16> sample = {{'\x1b', '\x4e', '\x28', '\xba', '\x2f', '\xa1', '\x11', '\xd2', '\x88', '\x3f', '\xb9', '\xa7', '\x61', '\xbd', '\xe3', '\xfb'}};
++boost::array<uint8_t, 16> sample = {{0x1b, 0x4e, 0x28, 0xba, 0x2f, 0xa1, 0x11, 0xd2, 0x88, 0x3f, 0xb9, 0xa7, 0x61, 0xbd, 0xe3, 0xfb}};
+ const string sampleStr("1b4e28ba-2fa1-11d2-883f-b9a761bde3fb");
+ const string zeroStr("00000000-0000-0000-0000-000000000000");
+
+--
+1.7.10.4
+
diff --git a/05-Store-looks-for-libs-under-Cmake.patch b/05-Store-looks-for-libs-under-Cmake.patch
new file mode 100644
index 0000000..153b8f2
--- /dev/null
+++ b/05-Store-looks-for-libs-under-Cmake.patch
@@ -0,0 +1,31 @@
+From 202539d3e075cde67a9fa352a52b380b182d9f66 Mon Sep 17 00:00:00 2001
+From: "Darryl L. Pierce" <dpierce at redhat.com>
+Date: Mon, 9 Jul 2012 10:41:19 -0400
+Subject: [PATCH] Modifies how the store looks for Qpid libraries during Cmake
+ builds.
+
+---
+ configure.ac | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4ed71dd..d167c4a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -102,11 +102,12 @@ if test x$with_qpid_checkout != x; then
+ QPID_DIR=$with_qpid_checkout
+ QPID_BLD=$QPID_DIR/cpp
+ QPID_SRC=$QPID_DIR/cpp/src
++ QPID_LIB=$QPID_DIR/cpp/src
+ test -f $QPID_SRC/qpid/broker/MessageStore.h || \
+ AC_MSG_ERROR([$QPID_DIR does not appear to be a valid qpid checkout.])
+ test -d $QPID_DIR/python -a -d $QPID_DIR/specs || \
+ AC_MSG_ERROR([$QPID_DIR does not have python and specs directories.])
+- QPID_LIBS="$QPID_SRC/libqpidbroker.la $QPID_SRC/libqpidcommon.la"
++ QPID_LIBS="-L$QPID_LIB -lqpidbroker -lqpidcommon"
+ QPID_CXXFLAGS="-I$QPID_DIR/cpp/include -I$QPID_SRC"
+ else
+ QPID_PREFIX=$with_qpid_prefix
+--
+1.7.10.4
+
diff --git a/06-Fix-python-sitearch-directory.patch b/06-Fix-python-sitearch-directory.patch
new file mode 100644
index 0000000..d783076
--- /dev/null
+++ b/06-Fix-python-sitearch-directory.patch
@@ -0,0 +1,57 @@
+From 6b3f38c5a75a3041ef6ae34187ed59e10dde5f8e Mon Sep 17 00:00:00 2001
+From: "Darryl L. Pierce" <dpierce at redhat.com>
+Date: Tue, 10 Jul 2012 14:41:02 -0400
+Subject: [PATCH 3/4] Fixes the Python qpid install location to be
+ platform-specific.
+
+On 64-bit systems, this must be installed to /usr/lib64/site-packages.
+In order to get this properly, we must specify plat_specific=1 when
+getting the lib directories.
+---
+ qpid/cpp/bindings/qmf/python/CMakeLists.txt | 2 +-
+ qpid/cpp/bindings/qmf2/python/CMakeLists.txt | 2 +-
+ qpid/cpp/bindings/qpid/python/CMakeLists.txt | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/qpid/cpp/bindings/qmf/python/CMakeLists.txt b/qpid/cpp/bindings/qmf/python/CMakeLists.txt
+index 9bc6b2e..6558444 100644
+--- a/qpid/cpp/bindings/qmf/python/CMakeLists.txt
++++ b/qpid/cpp/bindings/qmf/python/CMakeLists.txt
+@@ -31,7 +31,7 @@ set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_F
+ ##------------------------------------
+ ## Install the complete Python binding
+ ##------------------------------------
+-execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
++execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(plat_specific=1)" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
+ install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile qmfengine.py
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
+ install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile qmfengine.py
+diff --git a/qpid/cpp/bindings/qmf2/python/CMakeLists.txt b/qpid/cpp/bindings/qmf2/python/CMakeLists.txt
+index 2e71ca3..989822e 100644
+--- a/qpid/cpp/bindings/qmf2/python/CMakeLists.txt
++++ b/qpid/cpp/bindings/qmf2/python/CMakeLists.txt
+@@ -31,7 +31,7 @@ set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_F
+ ##------------------------------------
+ ## Install the complete Python binding
+ ##------------------------------------
+-execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
++execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(plat_specific=1)" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
+ install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile cqmf2.py
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
+ install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile cqmf2.py
+diff --git a/qpid/cpp/bindings/qpid/python/CMakeLists.txt b/qpid/cpp/bindings/qpid/python/CMakeLists.txt
+index 9cb4016..46a3cb9 100644
+--- a/qpid/cpp/bindings/qpid/python/CMakeLists.txt
++++ b/qpid/cpp/bindings/qpid/python/CMakeLists.txt
+@@ -31,7 +31,7 @@ set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_F
+ ##------------------------------------
+ ## Install the complete Python binding
+ ##------------------------------------
+-execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
++execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(plat_specific=1)" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
+ install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile cqpid.py
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
+ install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile cqpid.py
+--
+1.7.10.4
+
diff --git a/07-Adds-LIB_INSTALL_DIR-to-Cmake.patch b/07-Adds-LIB_INSTALL_DIR-to-Cmake.patch
new file mode 100644
index 0000000..4354a10
--- /dev/null
+++ b/07-Adds-LIB_INSTALL_DIR-to-Cmake.patch
@@ -0,0 +1,37 @@
+From 04e2968e218f894f8e4c28952ca5f4ad4e846ba8 Mon Sep 17 00:00:00 2001
+From: "Darryl L. Pierce" <dpierce at redhat.com>
+Date: Mon, 9 Jul 2012 16:51:41 -0400
+Subject: [PATCH 1/4] Added LIB_INSTALL_DIR to the commandline.
+
+By default it will use the value "lib", which reflects the previous
+usage. But 64-bit systems can use this argument to specify a different
+value for installing libraries.
+---
+ qpid/cpp/BuildInstallSettings.cmake | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/qpid/cpp/BuildInstallSettings.cmake b/qpid/cpp/BuildInstallSettings.cmake
+index 3da1d89..49f4ab1 100644
+--- a/qpid/cpp/BuildInstallSettings.cmake
++++ b/qpid/cpp/BuildInstallSettings.cmake
+@@ -134,8 +134,15 @@ if (UNIX)
+ "Directory to install HTML documentation")
+ set (QPID_INSTALL_INCLUDEDIR include CACHE STRING
+ "Directory to install programming header files")
+- set (QPID_INSTALL_LIBDIR lib CACHE STRING
+- "Directory to install library files")
++
++ if ("${LIB_INSTALL_DIR}" STREQUAL "")
++ set (QPID_INSTALL_LIBDIR lib CACHE STRING
++ "Directory to install library files")
++ else()
++ set (QPID_INSTALL_LIBDIR ${LIB_INSTALL_DIR} CACHE STRING
++ "Directory to install library files")
++ endif()
++
+ set (QPID_INSTALL_SBINDIR sbin CACHE STRING
+ "Directory to install system admin executables")
+ set (QPIDC_MODULE_DIR ${QPID_INSTALL_LIBDIR}/qpid/client CACHE STRING
+--
+1.7.10.4
+
diff --git a/08-Move-Cmake-installed-files.patch b/08-Move-Cmake-installed-files.patch
new file mode 100644
index 0000000..3f315d0
--- /dev/null
+++ b/08-Move-Cmake-installed-files.patch
@@ -0,0 +1,239 @@
+From 6566272b1948f43a7f32e35c3b67da94a9ce04f2 Mon Sep 17 00:00:00 2001
+From: "Darryl L. Pierce" <dpierce at redhat.com>
+Date: Tue, 10 Jul 2012 08:19:41 -0400
+Subject: [PATCH 2/4] Moved the Cmake installed files to their expected
+ locations.
+
+The qpid and sasl2 configuration files weren't given an absolute prefix
+on Unix systems. So they were being installed under /usr rather than off
+of the root.
+
+The examples were expected to be under /usr/share/qpidc.
+
+The old API examples were not being installed. They will now be
+installed to /usr/share/qpidc/examples/old_api via the
+add_old_api_example macro.
+
+Documentation is properly installed.
+---
+ qpid/cpp/BuildInstallSettings.cmake | 10 +++++-----
+ qpid/cpp/CMakeLists.txt | 2 +-
+ qpid/cpp/docs/api/CMakeLists.txt | 2 +-
+ qpid/cpp/etc/CMakeLists.txt | 2 +-
+ qpid/cpp/examples/CMakeLists.txt | 16 ++++++++++++++++
+ qpid/cpp/examples/old_api/CMakeLists.txt | 1 +
+ qpid/cpp/examples/old_api/direct/CMakeLists.txt | 6 +++---
+ qpid/cpp/examples/old_api/failover/CMakeLists.txt | 6 +++---
+ qpid/cpp/examples/old_api/fanout/CMakeLists.txt | 4 ++--
+ qpid/cpp/examples/old_api/pub-sub/CMakeLists.txt | 4 ++--
+ .../examples/old_api/request-response/CMakeLists.txt | 4 ++--
+ qpid/cpp/examples/old_api/tradedemo/CMakeLists.txt | 6 +++---
+ qpid/cpp/managementgen/CMakeLists.txt | 4 ++--
+ 13 files changed, 42 insertions(+), 25 deletions(-)
+
+diff --git a/qpid/cpp/BuildInstallSettings.cmake b/qpid/cpp/BuildInstallSettings.cmake
+index 49f4ab1..3b2cda9 100644
+--- a/qpid/cpp/BuildInstallSettings.cmake
++++ b/qpid/cpp/BuildInstallSettings.cmake
+@@ -122,15 +122,15 @@ if (UNIX)
+
+ set (QPID_INSTALL_BINDIR bin CACHE STRING
+ "Directory to install user executables")
+- set (QPID_INSTALL_CONFDIR etc/qpid CACHE STRING
++ set (QPID_INSTALL_CONFDIR /etc CACHE STRING
+ "Directory to install configuration files")
+ set (QPID_INSTALL_DATADIR share/qpid CACHE STRING
+ "Directory to install read-only arch.-independent data root")
+- set (QPID_INSTALL_SASLDIR etc/sasl2 CACHE STRING
++ set (QPID_INSTALL_SASLDIR /etc/sasl2 CACHE STRING
+ "Directory to install SASL configuration files")
+- set (QPID_INSTALL_EXAMPLESDIR share/examples CACHE STRING
++ set (QPID_INSTALL_EXAMPLESDIR share/qpidc/examples CACHE STRING
+ "Directory to install programming examples in")
+- set (QPID_INSTALL_HTMLDIR html CACHE STRING
++ set (QPID_INSTALL_HTMLDIR share/doc CACHE STRING
+ "Directory to install HTML documentation")
+ set (QPID_INSTALL_INCLUDEDIR include CACHE STRING
+ "Directory to install programming header files")
+@@ -153,6 +153,6 @@ if (UNIX)
+ "Directory for executables used by qpid libs")
+ set (QPID_LOCALSTATE_DIR var CACHE STRING
+ "Directory to store local state data")
+- set (QPID_MAN_DIR man CACHE STRING
++ set (QPID_MAN_DIR share/man CACHE STRING
+ "Directory to install manual files")
+ endif (UNIX)
+diff --git a/qpid/cpp/CMakeLists.txt b/qpid/cpp/CMakeLists.txt
+index 4c83540..a1f4c48 100644
+--- a/qpid/cpp/CMakeLists.txt
++++ b/qpid/cpp/CMakeLists.txt
+@@ -59,7 +59,7 @@ set (QPIDC_CONF_FILE ${QPID_INSTALL_CONFDIR}/qpidc.conf CACHE STRING
+ set (QPIDD_CONF_FILE ${QPID_INSTALL_CONFDIR}/qpidd.conf CACHE STRING
+ "Name of the Qpid broker configuration file")
+
+-install(FILES LICENSE NOTICE DESTINATION ${CMAKE_INSTALL_PREFIX})
++install(FILES LICENSE NOTICE DESTINATION ${QPID_INSTALL_DATADIR})
+ install(FILES xml/cluster.xml DESTINATION ${QPID_INSTALL_DATADIR})
+
+ if (WIN32)
+diff --git a/qpid/cpp/docs/api/CMakeLists.txt b/qpid/cpp/docs/api/CMakeLists.txt
+index 21e6f51..fd9827e 100644
+--- a/qpid/cpp/docs/api/CMakeLists.txt
++++ b/qpid/cpp/docs/api/CMakeLists.txt
+@@ -33,7 +33,7 @@ if (GEN_DOXYGEN)
+
+ # HTML files are generated to ./html - put those in the install.
+ install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
+- DESTINATION ${QPID_INSTALL_HTMLDIR}
++ DESTINATION ${QPID_INSTALL_HTMLDIR}/qpid-cpp-client-devel-docs-${qpidc_version}/html
+ COMPONENT ${QPID_COMPONENT_CLIENT_INCLUDE})
+ if (CPACK_GENERATOR STREQUAL "NSIS")
+ set (CPACK_NSIS_MENU_LINKS
+diff --git a/qpid/cpp/etc/CMakeLists.txt b/qpid/cpp/etc/CMakeLists.txt
+index 014842c..4b262f1 100644
+--- a/qpid/cpp/etc/CMakeLists.txt
++++ b/qpid/cpp/etc/CMakeLists.txt
+@@ -18,7 +18,7 @@
+ #
+
+ install(FILES qpidc.conf
+- DESTINATION ${QPID_INSTALL_CONFDIR}
++ DESTINATION ${QPID_INSTALL_CONFDIR}/qpid
+ COMPONENT ${QPID_COMPONENT_CLIENT})
+ install(FILES qpidd.conf
+ DESTINATION ${QPID_INSTALL_CONFDIR}
+diff --git a/qpid/cpp/examples/CMakeLists.txt b/qpid/cpp/examples/CMakeLists.txt
+index 728ab0e..28aadbb 100644
+--- a/qpid/cpp/examples/CMakeLists.txt
++++ b/qpid/cpp/examples/CMakeLists.txt
+@@ -81,6 +81,22 @@ macro(add_installed_example subdir example)
+
+ endmacro(add_installed_example)
+
++macro(add_old_api_example subdir example)
++ add_example(${subdir} ${example} ${ARGN})
++
++ # For installs, don't install the built example; that would be pointless.
++ # Install the things a user needs to build the example on-site.
++ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${example}.cpp
++ DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/old_api/${subdir}
++ COMPONENT ${QPID_COMPONENT_EXAMPLES})
++ if (MSVC)
++ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}_${example}.vcproj
++ DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/old_api/${subdir}
++ COMPONENT ${QPID_COMPONENT_EXAMPLES})
++ endif (MSVC)
++
++endmacro(add_old_api_example)
++
+ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.txt
+ DESTINATION ${QPID_INSTALL_EXAMPLESDIR}
+ COMPONENT ${QPID_COMPONENT_EXAMPLES})
+diff --git a/qpid/cpp/examples/old_api/CMakeLists.txt b/qpid/cpp/examples/old_api/CMakeLists.txt
+index 701f9be..c0f3e43 100644
+--- a/qpid/cpp/examples/old_api/CMakeLists.txt
++++ b/qpid/cpp/examples/old_api/CMakeLists.txt
+@@ -16,6 +16,7 @@
+ # specific language governing permissions and limitations
+ # under the License.
+ #
++
+ add_subdirectory(direct)
+ add_subdirectory(failover)
+ add_subdirectory(fanout)
+diff --git a/qpid/cpp/examples/old_api/direct/CMakeLists.txt b/qpid/cpp/examples/old_api/direct/CMakeLists.txt
+index 2ec1b2b..1629f6b 100644
+--- a/qpid/cpp/examples/old_api/direct/CMakeLists.txt
++++ b/qpid/cpp/examples/old_api/direct/CMakeLists.txt
+@@ -17,6 +17,6 @@
+ # under the License.
+ #
+
+-add_example(direct declare_queues)
+-add_example(direct direct_producer)
+-add_example(direct listener)
++add_old_api_example(direct declare_queues)
++add_old_api_example(direct direct_producer)
++add_old_api_example(direct listener)
+diff --git a/qpid/cpp/examples/old_api/failover/CMakeLists.txt b/qpid/cpp/examples/old_api/failover/CMakeLists.txt
+index 05db8fa..a0413c4 100644
+--- a/qpid/cpp/examples/old_api/failover/CMakeLists.txt
++++ b/qpid/cpp/examples/old_api/failover/CMakeLists.txt
+@@ -17,6 +17,6 @@
+ # under the License.
+ #
+
+-add_example(failover declare_queues)
+-add_example(failover resuming_receiver)
+-add_example(failover replaying_sender)
++add_old_api_example(failover declare_queues)
++add_old_api_example(failover resuming_receiver)
++add_old_api_example(failover replaying_sender)
+diff --git a/qpid/cpp/examples/old_api/fanout/CMakeLists.txt b/qpid/cpp/examples/old_api/fanout/CMakeLists.txt
+index 3f89d67..5cda887 100644
+--- a/qpid/cpp/examples/old_api/fanout/CMakeLists.txt
++++ b/qpid/cpp/examples/old_api/fanout/CMakeLists.txt
+@@ -17,5 +17,5 @@
+ # under the License.
+ #
+
+-add_example(fanout fanout_producer)
+-add_example(fanout listener)
++add_old_api_example(fanout fanout_producer)
++add_old_api_example(fanout listener)
+diff --git a/qpid/cpp/examples/old_api/pub-sub/CMakeLists.txt b/qpid/cpp/examples/old_api/pub-sub/CMakeLists.txt
+index 961de06..11671a8 100644
+--- a/qpid/cpp/examples/old_api/pub-sub/CMakeLists.txt
++++ b/qpid/cpp/examples/old_api/pub-sub/CMakeLists.txt
+@@ -17,5 +17,5 @@
+ # under the License.
+ #
+
+-add_example(pub-sub topic_listener)
+-add_example(pub-sub topic_publisher)
++add_old_api_example(pub-sub topic_listener)
++add_old_api_example(pub-sub topic_publisher)
+diff --git a/qpid/cpp/examples/old_api/request-response/CMakeLists.txt b/qpid/cpp/examples/old_api/request-response/CMakeLists.txt
+index 873a0cf..c53f6f4 100644
+--- a/qpid/cpp/examples/old_api/request-response/CMakeLists.txt
++++ b/qpid/cpp/examples/old_api/request-response/CMakeLists.txt
+@@ -17,5 +17,5 @@
+ # under the License.
+ #
+
+-add_example(request-response client)
+-add_example(request-response server)
++add_old_api_example(request-response client)
++add_old_api_example(request-response server)
+diff --git a/qpid/cpp/examples/old_api/tradedemo/CMakeLists.txt b/qpid/cpp/examples/old_api/tradedemo/CMakeLists.txt
+index e61fc14..00743c2 100644
+--- a/qpid/cpp/examples/old_api/tradedemo/CMakeLists.txt
++++ b/qpid/cpp/examples/old_api/tradedemo/CMakeLists.txt
+@@ -17,6 +17,6 @@
+ # under the License.
+ #
+
+-add_example(tradedemo topic_listener)
+-add_example(tradedemo topic_publisher)
+-add_example(tradedemo declare_queues)
++add_old_api_example(tradedemo topic_listener)
++add_old_api_example(tradedemo topic_publisher)
++add_old_api_example(tradedemo declare_queues)
+diff --git a/qpid/cpp/managementgen/CMakeLists.txt b/qpid/cpp/managementgen/CMakeLists.txt
+index 2511b74..9b01762 100644
+--- a/qpid/cpp/managementgen/CMakeLists.txt
++++ b/qpid/cpp/managementgen/CMakeLists.txt
+@@ -19,8 +19,8 @@
+ project(qpidc-qmfgen)
+ cmake_minimum_required(VERSION 2.4.0 FATAL_ERROR)
+
+-install(PROGRAMS qmf-gen DESTINATION managementgen
++install(PROGRAMS qmf-gen DESTINATION ${QPID_INSTALL_BINDIR}
+ COMPONENT ${QPID_COMPONENT_QMF})
+-install(DIRECTORY qmfgen DESTINATION managementgen
++install(DIRECTORY qmfgen DESTINATION /usr/lib/python2.7/site-packages
+ COMPONENT ${QPID_COMPONENT_QMF}
+ PATTERN ".svn" EXCLUDE PATTERN "*.pyc" EXCLUDE)
+--
+1.7.10.4
+
diff --git a/09-Add-CMake-files-to-examples.patch b/09-Add-CMake-files-to-examples.patch
new file mode 100644
index 0000000..326f87d
--- /dev/null
+++ b/09-Add-CMake-files-to-examples.patch
@@ -0,0 +1,475 @@
+From c36fe9a3c7fec92d863e3427d67dc697de8353c2 Mon Sep 17 00:00:00 2001
+From: "Darryl L. Pierce" <dpierce at redhat.com>
+Date: Thu, 19 Jul 2012 16:29:24 -0400
+Subject: [PATCH 4/4] Moved the examples from using autotools to using CMake
+ when installed.
+
+The old install system would generate a Makefile for the appropriate
+platform. But this is not easily done from within a CMake environment.
+So the example projects have been migrated over to using CMake as well.
+That way a single project file can be versioned and used on all
+platforms.
+---
+ qpid/cpp/examples/CMakeLists.txt | 6 +++
+ qpid/cpp/examples/messaging/CMakeLists.txt | 15 +++++-
+ qpid/cpp/examples/messaging/example-CMakeLists.txt | 49 ++++++++++++++++++++
+ .../examples/old_api/direct/example-CMakeLists.txt | 40 ++++++++++++++++
+ qpid/cpp/examples/old_api/example-CMakeLists.txt | 49 ++++++++++++++++++++
+ .../old_api/failover/example-CMakeLists.txt | 40 ++++++++++++++++
+ .../examples/old_api/fanout/example-CMakeLists.txt | 39 ++++++++++++++++
+ .../old_api/pub-sub/example-CMakeLists.txt | 39 ++++++++++++++++
+ .../request-response/example-CMakeLists.txt | 39 ++++++++++++++++
+ .../old_api/tradedemo/example-CMakeLists.txt | 40 ++++++++++++++++
+ 10 files changed, 355 insertions(+), 1 deletion(-)
+ create mode 100644 qpid/cpp/examples/messaging/example-CMakeLists.txt
+ create mode 100644 qpid/cpp/examples/old_api/direct/example-CMakeLists.txt
+ create mode 100644 qpid/cpp/examples/old_api/example-CMakeLists.txt
+ create mode 100644 qpid/cpp/examples/old_api/failover/example-CMakeLists.txt
+ create mode 100644 qpid/cpp/examples/old_api/fanout/example-CMakeLists.txt
+ create mode 100644 qpid/cpp/examples/old_api/pub-sub/example-CMakeLists.txt
+ create mode 100644 qpid/cpp/examples/old_api/request-response/example-CMakeLists.txt
+ create mode 100644 qpid/cpp/examples/old_api/tradedemo/example-CMakeLists.txt
+
+diff --git a/qpid/cpp/examples/CMakeLists.txt b/qpid/cpp/examples/CMakeLists.txt
+index 28aadbb..5ff424a 100644
+--- a/qpid/cpp/examples/CMakeLists.txt
++++ b/qpid/cpp/examples/CMakeLists.txt
+@@ -89,6 +89,12 @@ macro(add_old_api_example subdir example)
+ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${example}.cpp
+ DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/old_api/${subdir}
+ COMPONENT ${QPID_COMPONENT_EXAMPLES})
++
++ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/example-CMakeLists.txt
++ RENAME CMakeLists.txt
++ DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/old_api/${subdir}
++ COMPONENT ${QPID_COMPONENT_EXAMPLES})
++
+ if (MSVC)
+ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}_${example}.vcproj
+ DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/old_api/${subdir}
+diff --git a/qpid/cpp/examples/messaging/CMakeLists.txt b/qpid/cpp/examples/messaging/CMakeLists.txt
+index 03ed2da..c436d48 100644
+--- a/qpid/cpp/examples/messaging/CMakeLists.txt
++++ b/qpid/cpp/examples/messaging/CMakeLists.txt
+@@ -21,14 +21,16 @@
+ # sure that lib is linked in.
+
+ macro(add_messaging_example example)
++
+ add_executable(${example} ${example}.cpp OptionParser.cpp)
+ set_target_properties(${example} PROPERTIES OUTPUT_NAME ${example})
+ target_link_libraries(${example} qpidmessaging ${_boost_libs_needed})
+ # For installs, don't install the built example; that would be pointless.
+ # Install the things a user needs to build the example on-site.
+- install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${example}.cpp ${CMAKE_CURRENT_SOURCE_DIR}/OptionParser.h ${CMAKE_CURRENT_SOURCE_DIR}/OptionParser.cpp
++ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${example}.cpp
+ DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/messaging
+ COMPONENT ${QPID_COMPONENT_EXAMPLES})
++
+ if (MSVC)
+ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/messaging_${example}.vcproj
+ DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/messaging
+@@ -46,6 +48,17 @@ add_messaging_example(map_sender)
+ add_messaging_example(client)
+ add_messaging_example(server)
+
++install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/OptionParser.h
++ ${CMAKE_CURRENT_SOURCE_DIR}/OptionParser.cpp
++ DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/messaging
++ COMPONENT ${QPID_COMPONENT_EXAMPLES})
++
++install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/example-CMakeLists.txt
++ RENAME CMakeLists.txt
++ DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/messaging
++ COMPONENT ${QPID_COMPONENT_EXAMPLES})
++
++
+ # These don't need Boost or OptionParser
+ add_executable(hello_world hello_world.cpp)
+ set_target_properties(hello_world PROPERTIES OUTPUT_NAME hello_world)
+diff --git a/qpid/cpp/examples/messaging/example-CMakeLists.txt b/qpid/cpp/examples/messaging/example-CMakeLists.txt
+new file mode 100644
+index 0000000..ead4b2e
+--- /dev/null
++++ b/qpid/cpp/examples/messaging/example-CMakeLists.txt
+@@ -0,0 +1,49 @@
++#
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements. See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership. The ASF licenses this file
++# to you under the Apache License, Version 2.0 (the
++# "License"); you may not use this file except in compliance
++# with the License. You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing,
++# software distributed under the License is distributed on an
++# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++# KIND, either express or implied. See the License for the
++# specific language governing permissions and limitations
++# under the License.
++#
++
++cmake_minimum_required(VERSION 2.6)
++
++project(messaging-examples)
++
++include(FindPkgConfig)
++
++pkg_check_modules(QPID REQUIRED qpid)
++
++include_directories(${PROJECT_SOURCE_DIR}
++ ${QPID_INCLUDE_DIR})
++link_directories(${QPID_LIBRARY_DIRS})
++
++macro(add_example name)
++ add_executable(${name}
++ ${CMAKE_CURRENT_SOURCE_DIR}/${name}.cpp
++ ${CMAKE_CURRENT_SOURCE_DIR}/OptionParser.cpp)
++ target_link_libraries(${name} ${QPID_LIBRARIES})
++endmacro(add_example)
++
++add_example(hello_world hello_world.cpp)
++add_example(hello_xml hello_xml.cpp)
++
++add_example(client client.cpp)
++add_example(server server.cpp)
++
++add_example(spout spout.cpp)
++add_example(drain drain.cpp)
++
++add_example(map_sender map_sender.cpp)
++add_example(map_receiver map_receiver.cpp)
+diff --git a/qpid/cpp/examples/old_api/direct/example-CMakeLists.txt b/qpid/cpp/examples/old_api/direct/example-CMakeLists.txt
+new file mode 100644
+index 0000000..6e9040d
+--- /dev/null
++++ b/qpid/cpp/examples/old_api/direct/example-CMakeLists.txt
+@@ -0,0 +1,40 @@
++#
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements. See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership. The ASF licenses this file
++# to you under the Apache License, Version 2.0 (the
++# "License"); you may not use this file except in compliance
++# with the License. You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing,
++# software distributed under the License is distributed on an
++# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++# KIND, either express or implied. See the License for the
++# specific language governing permissions and limitations
++# under the License.
++#
++
++cmake_minimum_required(VERSION 2.6)
++
++project(direct)
++
++include(FindPkgConfig)
++
++pkg_check_modules(QPID REQUIRED qpid)
++
++include_directories(${PROJECT_SOURCE_DIR}
++ ${QPID_INCLUDE_DIR})
++link_directories(${QPID_LIBRARY_DIRS})
++
++macro(add_trade_demo_example name)
++ add_executable(${name} ${name}.cpp)
++ target_link_libraries(${name} qpidmessaging qpidclient qpidcommon)
++endmacro(add_trade_demo_example)
++
++add_trade_demo_example(direct_producer)
++add_trade_demo_example(listener)
++add_trade_demo_example(declare_queues)
++
+diff --git a/qpid/cpp/examples/old_api/example-CMakeLists.txt b/qpid/cpp/examples/old_api/example-CMakeLists.txt
+new file mode 100644
+index 0000000..ead4b2e
+--- /dev/null
++++ b/qpid/cpp/examples/old_api/example-CMakeLists.txt
+@@ -0,0 +1,49 @@
++#
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements. See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership. The ASF licenses this file
++# to you under the Apache License, Version 2.0 (the
++# "License"); you may not use this file except in compliance
++# with the License. You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing,
++# software distributed under the License is distributed on an
++# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++# KIND, either express or implied. See the License for the
++# specific language governing permissions and limitations
++# under the License.
++#
++
++cmake_minimum_required(VERSION 2.6)
++
++project(messaging-examples)
++
++include(FindPkgConfig)
++
++pkg_check_modules(QPID REQUIRED qpid)
++
++include_directories(${PROJECT_SOURCE_DIR}
++ ${QPID_INCLUDE_DIR})
++link_directories(${QPID_LIBRARY_DIRS})
++
++macro(add_example name)
++ add_executable(${name}
++ ${CMAKE_CURRENT_SOURCE_DIR}/${name}.cpp
++ ${CMAKE_CURRENT_SOURCE_DIR}/OptionParser.cpp)
++ target_link_libraries(${name} ${QPID_LIBRARIES})
++endmacro(add_example)
++
++add_example(hello_world hello_world.cpp)
++add_example(hello_xml hello_xml.cpp)
++
++add_example(client client.cpp)
++add_example(server server.cpp)
++
++add_example(spout spout.cpp)
++add_example(drain drain.cpp)
++
++add_example(map_sender map_sender.cpp)
++add_example(map_receiver map_receiver.cpp)
+diff --git a/qpid/cpp/examples/old_api/failover/example-CMakeLists.txt b/qpid/cpp/examples/old_api/failover/example-CMakeLists.txt
+new file mode 100644
+index 0000000..759a5f8
+--- /dev/null
++++ b/qpid/cpp/examples/old_api/failover/example-CMakeLists.txt
+@@ -0,0 +1,40 @@
++#
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements. See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership. The ASF licenses this file
++# to you under the Apache License, Version 2.0 (the
++# "License"); you may not use this file except in compliance
++# with the License. You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing,
++# software distributed under the License is distributed on an
++# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++# KIND, either express or implied. See the License for the
++# specific language governing permissions and limitations
++# under the License.
++#
++
++cmake_minimum_required(VERSION 2.6)
++
++project(failover)
++
++include(FindPkgConfig)
++
++pkg_check_modules(QPID REQUIRED qpid)
++
++include_directories(${PROJECT_SOURCE_DIR}
++ ${QPID_INCLUDE_DIR})
++link_directories(${QPID_LIBRARY_DIRS})
++
++macro(add_trade_demo_example name)
++ add_executable(${name} ${name}.cpp)
++ target_link_libraries(${name} qpidmessaging qpidclient qpidcommon)
++endmacro(add_trade_demo_example)
++
++add_trade_demo_example(resuming_receiver)
++add_trade_demo_example(replaying_sender)
++add_trade_demo_example(declare_queues)
++
+diff --git a/qpid/cpp/examples/old_api/fanout/example-CMakeLists.txt b/qpid/cpp/examples/old_api/fanout/example-CMakeLists.txt
+new file mode 100644
+index 0000000..54649db
+--- /dev/null
++++ b/qpid/cpp/examples/old_api/fanout/example-CMakeLists.txt
+@@ -0,0 +1,39 @@
++#
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements. See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership. The ASF licenses this file
++# to you under the Apache License, Version 2.0 (the
++# "License"); you may not use this file except in compliance
++# with the License. You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing,
++# software distributed under the License is distributed on an
++# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++# KIND, either express or implied. See the License for the
++# specific language governing permissions and limitations
++# under the License.
++#
++
++cmake_minimum_required(VERSION 2.6)
++
++project(failover)
++
++include(FindPkgConfig)
++
++pkg_check_modules(QPID REQUIRED qpid)
++
++include_directories(${PROJECT_SOURCE_DIR}
++ ${QPID_INCLUDE_DIR})
++link_directories(${QPID_LIBRARY_DIRS})
++
++macro(add_trade_demo_example name)
++ add_executable(${name} ${name}.cpp)
++ target_link_libraries(${name} qpidmessaging qpidclient qpidcommon)
++endmacro(add_trade_demo_example)
++
++add_trade_demo_example(fanout_producer)
++add_trade_demo_example(listener)
++
+diff --git a/qpid/cpp/examples/old_api/pub-sub/example-CMakeLists.txt b/qpid/cpp/examples/old_api/pub-sub/example-CMakeLists.txt
+new file mode 100644
+index 0000000..1404e5a
+--- /dev/null
++++ b/qpid/cpp/examples/old_api/pub-sub/example-CMakeLists.txt
+@@ -0,0 +1,39 @@
++#
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements. See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership. The ASF licenses this file
++# to you under the Apache License, Version 2.0 (the
++# "License"); you may not use this file except in compliance
++# with the License. You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing,
++# software distributed under the License is distributed on an
++# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++# KIND, either express or implied. See the License for the
++# specific language governing permissions and limitations
++# under the License.
++#
++
++cmake_minimum_required(VERSION 2.6)
++
++project(failover)
++
++include(FindPkgConfig)
++
++pkg_check_modules(QPID REQUIRED qpid)
++
++include_directories(${PROJECT_SOURCE_DIR}
++ ${QPID_INCLUDE_DIR})
++link_directories(${QPID_LIBRARY_DIRS})
++
++macro(add_trade_demo_example name)
++ add_executable(${name} ${name}.cpp)
++ target_link_libraries(${name} qpidmessaging qpidclient qpidcommon)
++endmacro(add_trade_demo_example)
++
++add_trade_demo_example(topic_listener)
++add_trade_demo_example(topic_publisher)
++
+diff --git a/qpid/cpp/examples/old_api/request-response/example-CMakeLists.txt b/qpid/cpp/examples/old_api/request-response/example-CMakeLists.txt
+new file mode 100644
+index 0000000..bdd3e37
+--- /dev/null
++++ b/qpid/cpp/examples/old_api/request-response/example-CMakeLists.txt
+@@ -0,0 +1,39 @@
++#
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements. See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership. The ASF licenses this file
++# to you under the Apache License, Version 2.0 (the
++# "License"); you may not use this file except in compliance
++# with the License. You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing,
++# software distributed under the License is distributed on an
++# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++# KIND, either express or implied. See the License for the
++# specific language governing permissions and limitations
++# under the License.
++#
++
++cmake_minimum_required(VERSION 2.6)
++
++project(failover)
++
++include(FindPkgConfig)
++
++pkg_check_modules(QPID REQUIRED qpid)
++
++include_directories(${PROJECT_SOURCE_DIR}
++ ${QPID_INCLUDE_DIR})
++link_directories(${QPID_LIBRARY_DIRS})
++
++macro(add_trade_demo_example name)
++ add_executable(${name} ${name}.cpp)
++ target_link_libraries(${name} qpidmessaging qpidclient qpidcommon)
++endmacro(add_trade_demo_example)
++
++add_trade_demo_example(client)
++add_trade_demo_example(server)
++
+diff --git a/qpid/cpp/examples/old_api/tradedemo/example-CMakeLists.txt b/qpid/cpp/examples/old_api/tradedemo/example-CMakeLists.txt
+new file mode 100644
+index 0000000..c88be82
+--- /dev/null
++++ b/qpid/cpp/examples/old_api/tradedemo/example-CMakeLists.txt
+@@ -0,0 +1,40 @@
++#
++# Licensed to the Apache Software Foundation (ASF) under one
++# or more contributor license agreements. See the NOTICE file
++# distributed with this work for additional information
++# regarding copyright ownership. The ASF licenses this file
++# to you under the Apache License, Version 2.0 (the
++# "License"); you may not use this file except in compliance
++# with the License. You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing,
++# software distributed under the License is distributed on an
++# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++# KIND, either express or implied. See the License for the
++# specific language governing permissions and limitations
++# under the License.
++#
++
++cmake_minimum_required(VERSION 2.6)
++
++project(tradedemo)
++
++include(FindPkgConfig)
++
++pkg_check_modules(QPID REQUIRED qpid)
++
++include_directories(${PROJECT_SOURCE_DIR}
++ ${QPID_INCLUDE_DIR})
++link_directories(${QPID_LIBRARY_DIRS})
++
++macro(add_trade_demo_example name)
++ add_executable(${name} ${name}.cpp)
++ target_link_libraries(${name} qpidmessaging qpidclient qpidcommon)
++endmacro(add_trade_demo_example)
++
++add_trade_demo_example(topic_listener)
++add_trade_demo_example(topic_publisher)
++add_trade_demo_example(declare_queues)
++
+--
+1.7.10.4
+
diff --git a/10-Updated-the-library-so-versions.patch b/10-Updated-the-library-so-versions.patch
new file mode 100644
index 0000000..887b90d
--- /dev/null
+++ b/10-Updated-the-library-so-versions.patch
@@ -0,0 +1,42 @@
+From aa3cbe48ddbd0763f6152ec88a214651c55fadcc Mon Sep 17 00:00:00 2001
+From: "Darryl L. Pierce" <dpierce at redhat.com>
+Date: Mon, 23 Jul 2012 11:41:14 -0400
+Subject: [PATCH] Updated the library SO versions.
+
+---
+ qpid/cpp/src/versions.cmake | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/qpid/cpp/src/versions.cmake b/qpid/cpp/src/versions.cmake
+index d7120c6..8e16e5a 100644
+--- a/qpid/cpp/src/versions.cmake
++++ b/qpid/cpp/src/versions.cmake
+@@ -24,15 +24,15 @@
+ # Bump if implementation changes but API/ABI doesn't
+ # AGE => Number of API/ABI versions this is backward compatible with
+
+-set (qmf_version 1.0.0)
++set (qmf_version 4.0.0)
+ set (qmf2_version 1.0.0)
+-set (qmfconsole_version 2.0.0)
+-set (qmfengine_version 1.1.0)
+-set (qpidbroker_version 2.0.0)
+-set (qpidclient_version 2.0.0)
+-set (qpidcommon_version 2.0.0)
+-set (qpidmessaging_version 2.0.0)
+-set (qpidtypes_version 1.0.0)
+-set (rdmawrap_version 2.0.0)
+-set (sslcommon_version 2.0.0)
++set (qmfconsole_version 5.0.0)
++set (qmfengine_version 4.0.0)
++set (qpidbroker_version 5.0.0)
++set (qpidclient_version 5.0.0)
++set (qpidcommon_version 5.0.0)
++set (qpidmessaging_version 4.0.1)
++set (qpidtypes_version 3.0.2)
++set (rdmawrap_version 5.0.0)
++set (sslcommon_version 5.0.0)
+
+--
+1.7.10.4
+
diff --git a/qpid-cpp.spec b/qpid-cpp.spec
index 34527f0..2fc17bb 100644
--- a/qpid-cpp.spec
+++ b/qpid-cpp.spec
@@ -12,31 +12,17 @@
%global store_svnrev 4509
# Change this release number for each build of the same qpid_svnrev, otherwise set back to 1.
-# LIBRARY VERSIONS
-%global QPIDCOMMON_VERSION_INFO 5:0:0
-%global QPIDTYPES_VERSION_INFO 3:0:2
-%global QPIDBROKER_VERSION_INFO 5:0:0
-%global QPIDCLIENT_VERSION_INFO 5:0:0
-%global QPIDMESSAGING_VERSION_INFO 4:0:1
-%global QMF_VERSION_INFO 4:0:0
-%global QMF2_VERSION_INFO 1:0:0
-%global QMFENGINE_VERSION_INFO 4:0:0
-%global QMFCONSOLE_VERSION_INFO 5:0:0
-%global RDMAWRAP_VERSION_INFO 5:0:0
-%global SSLCOMMON_VERSION_INFO 5:0:0
-
-# Single var with all lib version params (except store) for make
-%global LIB_VERSION_MAKE_PARAMS QPIDCOMMON_VERSION_INFO=%{QPIDCOMMON_VERSION_INFO} QPIDBROKER_VERSION_INFO=%{QPIDBROKER_VERSION_INFO} QPIDCLIENT_VERSION_INFO=%{QPIDCLIENT_VERSION_INFO} QPIDMESSAGING_VERSION_INFO=%{QPIDMESSAGING_VERSION_INFO} QMF_VERSION_INFO=%{QMF_VERSION_INFO} QMFENGINE_VERSION_INFO=%{QMFENGINE_VERSION_INFO} QMFCONSOLE_VERSION_INFO=%{QMFCONSOLE_VERSION_INFO} RDMAWRAP_VERSION_INFO=%{RDMAWRAP_VERSION_INFO} SSLCOMMON_VERSION_INFO=%{SSLCOMMON_VERSION_INFO}
+%global store_release store-%{version}.%{store_svnrev}
Name: qpid-cpp
Version: 0.16
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Libraries for Qpid C++ client applications
License: ASL 2.0
URL: http://qpid.apache.org
Source0: qpid-%{version}.tar.gz
-Source1: store-%{version}.%{store_svnrev}.tar.gz
+Source1: %{store_release}.tar.gz
BuildRequires: boost-devel
BuildRequires: libtool
@@ -64,9 +50,17 @@ BuildRequires: xerces-c-devel
BuildRequires: db4-devel
BuildRequires: libaio-devel
-Patch0: 01-make-BrokerImportExport.h-public.patch
-Patch1: 02-Remove-colons-from-conditionals.patch
-patch2: 03-Fix-string-encoding.patch
+Patch0: 00-make-BrokerImportExport.h-public.patch
+Patch1: 01-Remove-colons-from-conditionals.patch
+patch2: 02-Fix-string-encoding.patch
+Patch3: 03-Fixes-Cmake-for-ruby-1.9.patch
+Patch4: 04-Fixes-unsigned-16-bit-ints.patch
+Patch5: 05-Store-looks-for-libs-under-Cmake.patch
+Patch6: 06-Fix-python-sitearch-directory.patch
+Patch7: 07-Adds-LIB_INSTALL_DIR-to-Cmake.patch
+Patch8: 08-Move-Cmake-installed-files.patch
+Patch9: 09-Add-CMake-files-to-examples.patch
+Patch10: 10-Updated-the-library-so-versions.patch
%description
@@ -139,7 +133,6 @@ in C++ using Qpid. Qpid implements the AMQP messaging specification.
%{_includedir}/qpid/messaging
%{_includedir}/qpid/agent
%{_includedir}/qpid/types
-%{_includedir}/qmf
%{_libdir}/libqpidcommon.so
%{_libdir}/libqpidclient.so
%{_libdir}/libqpidtypes.so
@@ -178,7 +171,6 @@ format for easy browsing.
%package -n qpid-cpp-server
Summary: An AMQP message broker daemon
-Obsoletes: qpid-cpp-server-devel < %{version}-%{release}
Requires: qpid-cpp-client = %{version}-%{release}
Requires: cyrus-sasl
@@ -471,7 +463,7 @@ with Berkeley DB.
%files -n qpid-cpp-server-store
%defattr(-,root,root,-)
-%doc ../store-%{version}.%{store_svnrev}/README
+%doc ../%{store_release}/README
%{_libdir}/qpid/daemon/msgstore.so*
%{python_sitearch}/qpidstore/__init__.py*
%{python_sitearch}/qpidstore/jerr.py*
@@ -515,22 +507,6 @@ Management and diagnostic tools for Apache Qpid brokers and clients.
-%package -n perl-qpid
-Summary: Perl bindings for Apache Qpid Messaging
-
-# turns off rpmlint warning: private-shared-object-provides
-%{?perl_default_filter}
-
-%description -n perl-qpid
-%{summary}.
-
-%files -n perl-qpid
-%defattr(-,root,root,-)
-%doc cpp/bindings/qpid/examples/perl/*
-%{perl_vendorarch}/*
-
-
-
%prep
%setup -q -n qpid-%{version}
%setup -q -T -D -b 1 -n qpid-%{version}
@@ -538,6 +514,17 @@ Summary: Perl bindings for Apache Qpid Messaging
%patch0 -p2
%patch1 -p2
%patch2 -p2
+%patch3 -p2
+%patch4 -p2
+%patch6 -p2
+%patch7 -p2
+%patch8 -p2
+%patch9 -p2
+%patch10 -p2
+
+pushd ../%{store_release}
+%patch5 -p1
+popd
%global perftests "qpid-perftest qpid-topic-listener qpid-topic-publisher qpid-latency-test qpid-client-test qpid-txtest"
@@ -547,39 +534,29 @@ Summary: Perl bindings for Apache Qpid Messaging
%build
pushd cpp
-./bootstrap
-
-CXXFLAGS="%{optflags} -DNDEBUG -O3 -Wno-unused-result" \
-%configure --disable-static --with-swig --with-sasl --with-ssl --without-help2man \
---with-swig \
---with-rdma \
---without-cpg \
---with-xml
-ECHO=echo make %{LIB_VERSION_MAKE_PARAMS} %{?_smp_mflags}
-
-# Make perftest utilities
-pushd src/tests
-for ptest in %{perftests}; do
- ECHO=echo make $ptest
-done
-
+%cmake . -DLIB_INSTALL_DIR=%{_lib}
+make %{?_smp_mflags}
+make %{?_smp_mflags} qpidd docs-user-api
popd
-pushd ../python
+pushd python
./setup.py build
popd
-pushd ../tools
+pushd tools
./setup.py build
popd
-pushd ../extras/qmf
+pushd extras/qmf
./setup.py build
popd
# Store
-pushd ../../store-%{version}.%{store_svnrev}
+pushd ../%{store_release}
export CXXFLAGS="%{optflags} -DNDEBUG"
./bootstrap
-%configure --disable-static --disable-rpath --disable-dependency-tracking --with-qpid-checkout=%{_builddir}/qpid-%{version}
+%configure --disable-static \
+ --disable-rpath \
+ --disable-dependency-tracking \
+ --with-qpid-checkout=%{_builddir}/qpid-%{version}
make %{?_smp_mflags}
popd
@@ -589,8 +566,8 @@ mkdir -p -m0755 %{buildroot}/%{_bindir}
(cd python; %{__python} setup.py install --skip-build --install-purelib %{python_sitearch} --root %{buildroot})
(cd extras/qmf; %{__python} setup.py install --skip-build --install-purelib %{python_sitearch} --root %{buildroot})
-pushd %{_builddir}/qpid-%{version}/cpp
-make install DESTDIR=%{buildroot}
+pushd cpp
+make install DESTDIR=$RPM_BUILD_ROOT
install -Dp -m0755 etc/qpidd %{buildroot}%{_initrddir}/qpidd
install -d -m0755 %{buildroot}%{_localstatedir}/lib/qpidd
@@ -602,13 +579,10 @@ for ptest in %{perftests}; do
libtool --mode=install install -m755 $ptest %{buildroot}/%{_bindir}
done
-popd
-pushd docs/api
-make html
+pushd ../../../tools
+./setup.py install --skip-build --root $RPM_BUILD_ROOT
popd
-pushd ../tools
-./setup.py install --skip-build --root $RPM_BUILD_ROOT
popd
# remove things we don't want to package
@@ -622,6 +596,10 @@ rm -f %{buildroot}%{_libdir}/qpid/daemon/*.la
rm -f %{buildroot}%{_libdir}/libcqpid_perl.so
rm -rf %{buildroot}%{ruby_sitearch}
rm -rf %{buildroot}%{ruby_sitelib}
+rm -f %{buildroot}%{_datadir}/qpid/cluster.xml
+rm -f %{buildroot}%{_datadir}/qpid/LICENSE
+rm -f %{buildroot}%{_datadir}/qpid/NOTICE
+rm -f %{buildroot}%{_libdir}/qpid/daemon/store.so*
# this should be fixed in the examples Makefile (make install)
rm -f %{buildroot}%{_datadir}/qpidc/examples/Makefile
@@ -641,11 +619,11 @@ rm -rf %{buildroot}%{_bindir}/qpid-ha
install -d %{buildroot}%{python_sitearch}
install -pm 644 %{_builddir}/qpid-%{version}/cpp/bindings/qpid/python/cqpid.py %{buildroot}%{python_sitearch}
-install -pm 644 %{_builddir}/qpid-%{version}/cpp/bindings/qpid/python/.libs/_cqpid.so %{buildroot}%{python_sitearch}
+install -pm 644 %{_builddir}/qpid-%{version}/cpp/bindings/qpid/python/_cqpid_python.so %{buildroot}%{python_sitearch}/_cqpid.so
install -pm 644 %{_builddir}/qpid-%{version}/cpp/bindings/qmf/python/*.py %{buildroot}%{python_sitearch}
-install -pm 644 %{_builddir}/qpid-%{version}/cpp/bindings/qmf/python/.libs/_qmfengine.so %{buildroot}%{python_sitearch}
+install -pm 644 %{_builddir}/qpid-%{version}/cpp/bindings/qmf/python/_qmfengine_python.so %{buildroot}%{python_sitearch}/_qmfengine.so
install -pm 644 %{_builddir}/qpid-%{version}/cpp/bindings/qmf2/python/*.py %{buildroot}%{python_sitearch}
-install -pm 644 %{_builddir}/qpid-%{version}/cpp/bindings/qmf2/python/.libs/_cqmf2.so %{buildroot}%{python_sitearch}
+install -pm 644 %{_builddir}/qpid-%{version}/cpp/bindings/qmf2/python/_cqmf2_python.so %{buildroot}%{python_sitearch}/_cqmf2.so
chmod +x %{buildroot}%{python_sitelib}/qpidtoollibs/disp.py
chmod +x %{buildroot}%{python_sitearch}/*.so
@@ -660,23 +638,25 @@ rm -rf %{buildroot}%{python_sitelib}/qmfengine.py*
rm -rf %{buildroot}%{python_sitearch}/_cqmf2.la
rm -rf %{buildroot}%{python_sitearch}/_cqpid.la
rm -rf %{buildroot}%{python_sitearch}/_qmfengine.la
-rm -rf %{buildroot}%{python_sitearch}/.libs
install -d %{buildroot}%{ruby_vendorlibdir}
install -d %{buildroot}%{ruby_vendorarchdir}
install -pm 644 %{_builddir}/qpid-%{version}/cpp/bindings/qmf/ruby/qmf.rb %{buildroot}%{ruby_vendorlibdir}
install -pm 644 %{_builddir}/qpid-%{version}/cpp/bindings/qmf2/ruby/qmf2.rb %{buildroot}%{ruby_vendorlibdir}
-install -pm 755 %{_builddir}/qpid-%{version}/cpp/bindings/qpid/ruby/.libs/cqpid.so %{buildroot}%{ruby_vendorarchdir}
-install -pm 755 %{_builddir}/qpid-%{version}/cpp/bindings/qmf/ruby/.libs/qmfengine.so %{buildroot}%{ruby_vendorarchdir}
-install -pm 755 %{_builddir}/qpid-%{version}/cpp/bindings/qmf2/ruby/.libs/cqmf2.so %{buildroot}%{ruby_vendorarchdir}
+install -pm 755 %{_builddir}/qpid-%{version}/cpp/bindings/qpid/ruby/libcqpid_ruby.so %{buildroot}%{ruby_vendorarchdir}/cqpid.so
+install -pm 755 %{_builddir}/qpid-%{version}/cpp/bindings/qmf/ruby/libqmfengine_ruby.so %{buildroot}%{ruby_vendorarchdir}/qmfengine.so
+install -pm 755 %{_builddir}/qpid-%{version}/cpp/bindings/qmf2/ruby/libcqmf2_ruby.so %{buildroot}%{ruby_vendorarchdir}/cqmf2.so
+rm -rf %{buildroot}/%{_libdir}/ruby/cqpid.so
+rm -rf %{buildroot}/%{_libdir}/ruby/cqmf2.so
+rm -rf %{buildroot}/%{_libdir}/ruby/qmfengine.so
rm -f %{buildroot}%{_libdir}/_*
rm -rf %{buildroot}%{_libdir}/qpid/tests
rm -rf %{buildroot}%{_libexecdir}/qpid/tests
popd
#Store
-pushd %{_builddir}/store-%{version}.%{store_svnrev}
+pushd %{_builddir}/%{store_release}
make install DESTDIR=%{buildroot}
install -d -m0775 %{buildroot}%{_localstatedir}/rhm
install -d -m0755 %{buildroot}%{_libdir}/qpid/daemon
@@ -685,14 +665,11 @@ rm -f %{buildroot}%{_libdir}/qpid/daemon/*.la
rm -f %{buildroot}%{_libdir}/*.a
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_sysconfdir}/rhmd.conf
+rm -rf %{buildroot}%{_includedir}/qmf
popd
-# Perl bindings
-pushd %{_builddir}/qpid-%{version}
-install -d -m 755 %{buildroot}%{perl_vendorarch}/
-install -p -m 644 cpp/bindings/qpid/perl/cqpid_perl.pm %{buildroot}%{perl_vendorarch}/
-install -p -m 755 cpp/bindings/qpid/perl/blib/arch/auto/cqpid_perl/cqpid_perl.so %{buildroot}%{perl_vendorarch}/
-popd
+# remove the perl bindings
+rm -rf %{buildroot}%{_libdir}/perl5
%clean
rm -rf %{buildroot}
@@ -708,6 +685,12 @@ rm -rf %{buildroot}
%changelog
+* Mon Jul 23 2012 Darryl L. Pierce <dpierce at redhat.com> - 0.16-4
+- Renamed the patch files to be consistent with the patch numbers.
+- Removed the library so version macro.
+- Move the build system to use Cmake.
+- Removed perl-qpid as a subpackage since it's a separate standalone package.
+
* Fri Jun 29 2012 Darryl L. Pierce <dpierce at redhat.com> - 0.16-3
- Removed colons from conditions in QMF Ruby.
- Fixed string encoding for Ruby.
More information about the scm-commits
mailing list