From 9b8633a5f30d725a0d95079d330c8bffd2128636 Mon Sep 17 00:00:00 2001 From: Rich Mattes Date: Aug 05 2020 00:16:35 +0000 Subject: Update to release 1.0.1 Fix CMake FTBFS (1863360) --- diff --git a/.gitignore b/.gitignore index 68315c7..25c9763 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /console_bridge-0.2.5-2f5e9c6.tar.gz /console_bridge-0.2.7-b264091.tar.gz /console_bridge-0.3.2-ed29e63.tar.gz +/console-bridge-1.0.1.tar.gz diff --git a/console-bridge-0.2.7-gnuinstalldirs.patch b/console-bridge-0.2.7-gnuinstalldirs.patch deleted file mode 100644 index 9d961e0..0000000 --- a/console-bridge-0.2.7-gnuinstalldirs.patch +++ /dev/null @@ -1,103 +0,0 @@ -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-1.0.1-exportheader.patch b/console-bridge-1.0.1-exportheader.patch new file mode 100644 index 0000000..c15e48f --- /dev/null +++ b/console-bridge-1.0.1-exportheader.patch @@ -0,0 +1,12 @@ +diff -up ./CMakeLists.txt.exportheader ./CMakeLists.txt +--- ./CMakeLists.txt.exportheader 2020-08-04 20:01:15.813549694 -0400 ++++ ./CMakeLists.txt 2020-08-04 20:01:28.052466746 -0400 +@@ -70,7 +70,7 @@ install(DIRECTORY include/ + FILES_MATCHING PATTERN "*.h") + + install(FILES ${PROJECT_BINARY_DIR}/${PROJECT_NAME}_export.h +- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}) + + if(WIN32 AND NOT CYGWIN) + set(CMAKE_CONFIG_INSTALL_DIR CMake) diff --git a/console-bridge.spec b/console-bridge.spec index 3e44ea7..53b684e 100644 --- a/console-bridge.spec +++ b/console-bridge.spec @@ -1,18 +1,21 @@ -%global commit ed29e639dfaefbe16db182d360af0d03417e7cd8 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%undefine __cmake_in_source_build %global realname console_bridge -Name: console-bridge -Version: 0.3.2 -Release: 16%{?dist} -Summary: Lightweight set of macros used for reporting information in libraries +%global libversion 1.0 -License: BSD -URL: http://ros.org/wiki/console_bridge -Source0: https://github.com/ros/%{realname}/archive/%{commit}/%{realname}-%{version}-%{shortcommit}.tar.gz +Name: console-bridge +Version: 1.0.1 +Release: 1%{?dist} +Summary: Lightweight set of macros used for reporting information in libraries + +License: BSD +URL: http://ros.org/wiki/console_bridge +Source0: https://github.com/ros/%{realname}/archive/%{version}/%{name}-%{version}.tar.gz +# Install the generated export header to the same location as the rest of the package's headers. +Patch0: console-bridge-1.0.1-exportheader.patch BuildRequires: gcc BuildRequires: gcc-c++ -BuildRequires: cmake +BuildRequires: cmake %description A very lightweight set of macros that can be used for reporting information @@ -27,22 +30,21 @@ The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep -%setup -qn %{realname}-%{commit} +%setup -qn %{realname}-%{version} +%patch0 -p0 -b .exportheader %build -mkdir build; pushd build -%cmake .. -DUSE_GNU_INSTALL_DIRS=ON -popd -make -C build %{?_smp_mflags} - +%cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON +%cmake_build %install -make -C build install DESTDIR=%{buildroot} +%cmake_install -%ldconfig_scriptlets +%check +%ctest || /bin/true %files -%{_libdir}/*.so.* +%{_libdir}/*.so.%{libversion} %files devel %{_includedir}/%{realname} @@ -51,6 +53,10 @@ make -C build install DESTDIR=%{buildroot} %{_libdir}/%{realname} %changelog +* Tue Aug 04 2020 Rich Mattes - 1.0.1-1 +- Update to release 1.0.1 +- Fix CMake FTBFS (1863360) + * Sat Aug 01 2020 Fedora Release Engineering - 0.3.2-16 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 4b89527..eece5e1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -152a648939578b644a7789c0a8efdd6b console_bridge-0.3.2-ed29e63.tar.gz +SHA512 (console-bridge-1.0.1.tar.gz) = 913b7ee1d5401c6324eaaab1f8a54d5ff6df4eedb119a1cd00712f223750d69313047344aec5887920497c7b456cf6cb88e5f756bfbbb5ed8223ec758cdfd021