From 12ad48237220460cb63cd8fc9b0c32e0f8070cff Mon Sep 17 00:00:00 2001 From: Nicolas Torres Date: Thu, 3 Dec 2020 17:30:47 +0100 Subject: [PATCH 1/4] add rpm to cpack config --- CMakeLists.txt | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 905e8ebf..45374d98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -176,13 +176,46 @@ endif() ## Packaging set(CPACK_PACKAGE_VENDOR "Franka Emika GmbH") -set(CPACK_GENERATOR "DEB;TGZ") +set(CPACK_GENERATOR "DEB;TGZ;RPM") set(CPACK_PACKAGE_VERSION ${libfranka_VERSION}) set(CPACK_SYSTEM_NAME ${CMAKE_HOST_SYSTEM_PROCESSOR}) +# Default permissions for directories created implicitly during installation of files by install() and file(INSTALL). +set(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS + OWNER_READ + OWNER_WRITE + OWNER_EXECUTE + GROUP_READ + GROUP_EXECUTE + WORLD_READ + WORLD_EXECUTE +) + +# shared package info +set(PACKAGE_RELEASE 1) # adds build info MAJOR.MINOR.PATCH-RELEASE +set(PACKAGE_MAINTAINER "Franka Emika GmbH") + +# RPM package info +set(CPACK_RPM_PACKAGE_RELEASE_DIST "%{dist}") +set(CPACK_RPM_PACKAGE_RELEASE ${PACKAGE_RELEASE}) +set(CPACK_RPM_PACKAGE_MAINTAINER ${PACKAGE_MAINTAINER}) +set(CPACK_RPM_PACKAGE_DEPENDS "poco-devel") +set(CPACK_RPM_PACKAGE_CONFLICTS "ros-libfranka-devel") + +# Debian +find_program(DPKG_PROG dpkg DOC "'dpkg' executable") +if(DPKG_PROG) + execute_process(COMMAND ${DPKG_PROG} --print-architecture + OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + # Change system name to use the correct architecture in file name + set(CPACK_SYSTEM_NAME ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}) +endif() + # Debian versions require a dash -set(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}-1) -set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Franka Emika GmbH") +set(CPACK_DEBIAN_PACKAGE_RELEASE ${PACKAGE_RELEASE}) +set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${PACKAGE_MAINTAINER}) set(CPACK_DEBIAN_PACKAGE_DEPENDS "libpoco-dev") set(CPACK_DEBIAN_PACKAGE_CONFLICTS "ros-kinetic-libfranka, ros-melodic-libfranka, ros-noetic-libfranka, ros-foxy-libfranka") include(CPack) From 1bdcd4c7b79f508345a6bb84bdcbaa3dc08f58ab Mon Sep 17 00:00:00 2001 From: Nicolas Torres Date: Fri, 4 Dec 2020 15:36:45 +0100 Subject: [PATCH 2/4] remove outdated comment --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 45374d98..402a8e04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -213,7 +213,6 @@ if(DPKG_PROG) set(CPACK_SYSTEM_NAME ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}) endif() -# Debian versions require a dash set(CPACK_DEBIAN_PACKAGE_RELEASE ${PACKAGE_RELEASE}) set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${PACKAGE_MAINTAINER}) set(CPACK_DEBIAN_PACKAGE_DEPENDS "libpoco-dev") From 4a6000b4b03f5a38b1fcfe8ac2a9973c78face55 Mon Sep 17 00:00:00 2001 From: Nicolas Torres Date: Fri, 4 Dec 2020 18:00:02 +0100 Subject: [PATCH 3/4] add rpm dep to dockerfiles for the build --- .ci/Dockerfile.bionic | 1 + .ci/Dockerfile.focal | 1 + 2 files changed, 2 insertions(+) diff --git a/.ci/Dockerfile.bionic b/.ci/Dockerfile.bionic index 4c28eb97..6af02f5d 100644 --- a/.ci/Dockerfile.bionic +++ b/.ci/Dockerfile.bionic @@ -11,6 +11,7 @@ RUN apt-get update && apt-get install -y \ libeigen3-dev \ libpoco-dev \ rename \ + rpm \ valgrind \ lsb-release \ dpkg \ diff --git a/.ci/Dockerfile.focal b/.ci/Dockerfile.focal index 92a7a609..a149c8ce 100644 --- a/.ci/Dockerfile.focal +++ b/.ci/Dockerfile.focal @@ -12,6 +12,7 @@ RUN apt-get update && apt-get install -y \ libeigen3-dev \ libpoco-dev \ rename \ + rpm \ valgrind \ lsb-release \ dpkg \ From a71c5047b44b5ed91213b099c9f3948d7a7ab67a Mon Sep 17 00:00:00 2001 From: Nicolas Torres Date: Mon, 7 Dec 2020 12:31:38 +0100 Subject: [PATCH 4/4] remove redundant setting for CPACK_DEBIAN_PACKAGE_ARCHITECTURE --- CMakeLists.txt | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 402a8e04..f99fc0dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -203,16 +203,6 @@ set(CPACK_RPM_PACKAGE_DEPENDS "poco-devel") set(CPACK_RPM_PACKAGE_CONFLICTS "ros-libfranka-devel") # Debian -find_program(DPKG_PROG dpkg DOC "'dpkg' executable") -if(DPKG_PROG) - execute_process(COMMAND ${DPKG_PROG} --print-architecture - OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - # Change system name to use the correct architecture in file name - set(CPACK_SYSTEM_NAME ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}) -endif() - set(CPACK_DEBIAN_PACKAGE_RELEASE ${PACKAGE_RELEASE}) set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${PACKAGE_MAINTAINER}) set(CPACK_DEBIAN_PACKAGE_DEPENDS "libpoco-dev")