From cf100cabff8ac2d967f4ccf57f628b5e07e79ce1 Mon Sep 17 00:00:00 2001 From: Rich Mattes Date: Aug 23 2014 16:32:27 +0000 Subject: Update to release 0.2.7 --- diff --git a/.gitignore b/.gitignore index ef72959..dd10c98 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /ros-console_bridge-0.1.4-0-g96c8951.tar.gz /console_bridge-0.2.4-e54b38b.tar.gz /console_bridge-0.2.5-2f5e9c6.tar.gz +/console_bridge-0.2.7-b264091.tar.gz diff --git a/console-bridge-0.2.7-gnuinstalldirs.patch b/console-bridge-0.2.7-gnuinstalldirs.patch new file mode 100644 index 0000000..9d961e0 --- /dev/null +++ b/console-bridge-0.2.7-gnuinstalldirs.patch @@ -0,0 +1,103 @@ +From 626bc580272cba6ea11b81f14762dc61c4a88f9d Mon Sep 17 00:00:00 2001 +From: Rich Mattes +Date: Sat, 23 Aug 2014 12:07:14 -0400 +Subject: [PATCH] Add option to enable GNU Install Dirs + +This commit adds an option to enable the GNUInstallDirs.cmake script and +use it to define console_bridge's installation directories. When +enabled, libraries, headers, and data are installed to paths defined by +the GNUInstallDirs.cmake script. Otherwise, the hard-coded "lib", +"share", and "include" strings are used, resulting in no change in +functionality after this commit is applied. + +The option is diabled by default. + +Signed-off-by: Rich Mattes +--- + CMakeLists.txt | 22 +++++++++++++++++----- + console_bridge-config.cmake.in | 2 +- + console_bridge.pc.in | 4 ++-- + 3 files changed, 20 insertions(+), 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ab0ad99..2c1980b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -30,21 +30,33 @@ if(NOT DEFINED BUILD_SHARED_LIBS) + option(BUILD_SHARED_LIBS "Build dynamically-linked binaries" ON) + endif() + ++option(USE_GNU_INSTALL_DIRS "Use GNU Install Directories when installing" OFF) ++ ++if (USE_GNU_INSTALL_DIRS) ++ include(GNUInstallDirs) ++else() ++ set(CMAKE_INSTALL_DATAROOTDIR "share") ++ set(CMAKE_INSTALL_INCLUDEDIR "include") ++ set(CMAKE_INSTALL_LIBDIR "lib") ++endif() ++ + add_library(${PROJECT_NAME} src/console.cpp) + target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES}) + + install(TARGETS ${PROJECT_NAME} +- DESTINATION lib/) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + install(DIRECTORY include/ +- DESTINATION include +- FILES_MATCHING PATTERN "*.h") ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ++ FILES_MATCHING PATTERN "*.h") + + set(PKG_NAME ${PROJECT_NAME}) + set(PKG_LIBRARIES ${PROJECT_NAME}) + set(cmake_conf_file "${PROJECT_NAME}-config.cmake") + configure_file("${cmake_conf_file}.in" "${CMAKE_BINARY_DIR}/${cmake_conf_file}" @ONLY) +-install(FILES "${CMAKE_BINARY_DIR}/${cmake_conf_file}" DESTINATION share/${PROJECT_NAME}/cmake/ COMPONENT cmake) ++install(FILES "${CMAKE_BINARY_DIR}/${cmake_conf_file}" ++ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake/ ++ COMPONENT cmake) + + if (NOT MSVC) + set(PKG_DESC "Console Bridge") +@@ -52,7 +64,7 @@ if (NOT MSVC) + set(pkg_conf_file "console_bridge.pc") + configure_file("${pkg_conf_file}.in" "${CMAKE_BINARY_DIR}/${pkg_conf_file}" @ONLY) + install(FILES "${CMAKE_BINARY_DIR}/${pkg_conf_file}" +- DESTINATION lib/pkgconfig/ COMPONENT pkgconfig) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/ COMPONENT pkgconfig) + endif() + + SET_DIRECTORY_PROPERTIES(PROPERTIES +diff --git a/console_bridge-config.cmake.in b/console_bridge-config.cmake.in +index a64762b..c7a55fb 100644 +--- a/console_bridge-config.cmake.in ++++ b/console_bridge-config.cmake.in +@@ -8,7 +8,7 @@ set(@PKG_NAME@_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include") + foreach(lib @PKG_LIBRARIES@) + set(onelib "${lib}-NOTFOUND") + find_library(onelib ${lib} +- PATHS "@CMAKE_INSTALL_PREFIX@/lib" ++ PATHS "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@" + NO_DEFAULT_PATH + ) + if(NOT onelib) +diff --git a/console_bridge.pc.in b/console_bridge.pc.in +index 443963e..1e8bebc 100644 +--- a/console_bridge.pc.in ++++ b/console_bridge.pc.in +@@ -1,8 +1,8 @@ + # This file was generated by CMake for @PROJECT_NAME@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=${prefix} +-libdir=${prefix}/lib +-includedir=${prefix}/include ++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ + + Name: @PKG_NAME@ + Description: @PKG_DESC@ +-- +2.0.4 + diff --git a/console-bridge.spec b/console-bridge.spec index d25803d..82b6699 100644 --- a/console-bridge.spec +++ b/console-bridge.spec @@ -1,15 +1,18 @@ -%global commit 2f5e9c683e3b9700ffb1d0ff83174f1015b4b9ff +%global commit b264091d223c396594a573e06aa63731cf694bce %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global realname console_bridge Name: console-bridge -Version: 0.2.5 -Release: 4%{?dist} +Version: 0.2.7 +Release: 1%{?dist} Summary: Lightweight set of macros used for reporting information in libraries Group: Development/Libraries License: BSD URL: http://ros.org/wiki/console_bridge Source0: https://github.com/ros/%{realname}/archive/%{commit}/%{realname}-%{version}-%{shortcommit}.tar.gz +# Add support for lib64 +# https://github.com/ros/console_bridge/pull/19 +Patch0: %{name}-0.2.7-gnuinstalldirs.patch BuildRequires: cmake BuildRequires: boost-devel @@ -28,10 +31,11 @@ developing applications that use %{name}. %prep %setup -qn %{realname}-%{commit} +%patch0 -p1 -b .gnuinstalldirs %build mkdir build; pushd build -%cmake .. +%cmake .. -DUSE_GNU_INSTALL_DIRS=ON popd make -C build %{?_smp_mflags} @@ -44,16 +48,18 @@ make -C build install DESTDIR=%{buildroot} %postun -p /sbin/ldconfig %files -%{_libdir}/*.so.* +%{_libdir}/*.so %files devel -%{_libdir}/*.so %{_includedir}/%{realname} %{_libdir}/pkgconfig/*.pc %{_datadir}/%{realname} %changelog +* Sat Aug 23 2014 Rich Mattes - 0.2.7-1 +- Update to release 0.2.7 + * Sat Aug 16 2014 Fedora Release Engineering - 0.2.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild diff --git a/sources b/sources index 7f90206..a40d59c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -084db62fa3a95cc9af4d3b9d2afdea5a console_bridge-0.2.5-2f5e9c6.tar.gz +3baedf4bc788aa01aa2cd56a49eada70 console_bridge-0.2.7-b264091.tar.gz