aboutsummaryrefslogtreecommitdiffstats
path: root/metis
diff options
context:
space:
mode:
authorMauro Sardara <msardara+fdio@cisco.com>2017-04-29 23:54:56 +0200
committerMauro Sardara <msardara+fdio@cisco.com>2017-04-30 00:16:21 +0200
commit77323a5c646ad0c6919d0848d63b9791a745c90b (patch)
treec0f24e3dc2f3fcd995cbe047c032effc45506947 /metis
parent9e8e5c18fb03f7eb2d4348355b5a07b235f6e672 (diff)
Fixing dependencies for dev packages
Change-Id: I6e98f02c5cd35024dc336269b0187592f7d8f126 Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
Diffstat (limited to 'metis')
-rw-r--r--metis/.gitignore1
-rw-r--r--metis/CMakeLists.txt50
-rw-r--r--metis/scripts/build-package.sh5
3 files changed, 29 insertions, 27 deletions
diff --git a/metis/.gitignore b/metis/.gitignore
index 0bf52c18..b8c1f591 100644
--- a/metis/.gitignore
+++ b/metis/.gitignore
@@ -1,3 +1,4 @@
+VERSION
metis-*tar.gz
config.cache
diff --git a/metis/CMakeLists.txt b/metis/CMakeLists.txt
index a2f81b4b..aa209d49 100644
--- a/metis/CMakeLists.txt
+++ b/metis/CMakeLists.txt
@@ -92,17 +92,17 @@ add_subdirectory(ccnx/forwarder/metis)
option(DEB_PACKAGE "Create deb package" OFF)
option(RPM_PACKAGE "Create deb package" OFF)
-SET(VENDOR "Cisco Systems" CACHE STRING "Vendor")
-SET(CONTACT "msardara@cisco.com" CACHE STRING "Contact")
-SET(DISTRIBUTION "xenial" CACHE STRING "Distribution")
-SET(ARCHITECTURE "amd64" CACHE STRING "Architecture")
-SET(PACKAGE_MAINTAINER "Mauro Sardara (msardara@cisco.com)" CACHE STRING "Maintainer")
-SET(BUILD_NUMBER "1" CACHE STRING "Build Number")
-STRING(TOLOWER ${CMAKE_PROJECT_NAME}-forwarder PACKAGE_NAME)
-
-SET(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
-SET(CPACK_PACKAGE_VENDOR ${VENDOR})
-SET(CPACK_PACKAGE_CONTACT ${CONTACT})
+set(VENDOR "Cisco Systems" CACHE STRING "Vendor")
+set(CONTACT "msardara@cisco.com" CACHE STRING "Contact")
+set(DISTRIBUTION "xenial" CACHE STRING "Distribution")
+set(ARCHITECTURE "amd64" CACHE STRING "Architecture")
+set(PACKAGE_MAINTAINER "Mauro Sardara (msardara@cisco.com)" CACHE STRING "Maintainer")
+set(BUILD_NUMBER "1" CACHE STRING "Build Number")
+string(TOLOWER ${CMAKE_PROJECT_NAME}-forwarder PACKAGE_NAME)
+
+set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
+set(CPACK_PACKAGE_VENDOR ${VENDOR})
+set(CPACK_PACKAGE_CONTACT ${CONTACT})
# Get the version
execute_process(COMMAND bash ${CMAKE_SOURCE_DIR}/scripts/version
@@ -113,13 +113,15 @@ if(DEB_PACKAGE)
SET(TYPE "DEBIAN")
SET(GENERATOR "DEB")
SET(CPACK_PACKAGE_FILE_NAME "${PACKAGE_NAME}_${PACKAGE_VERSION}_${ARCHITECTURE}")
- SET(CPACK_${TYPE}_PACKAGE_DEPENDS "longbow (>= 1.0), libevent-2.0-5, libssl1.0.0, libparc (>= 1.0), libccnx-common (>= 1.0), libccnx-transport-rta (>= 1.0), libccnx-portal (>= 1.0)")
+ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
+ SET(CPACK_${TYPE}_PACKAGE_DEPENDS "longbow (>= 1.0), libparc (>= 1.0), libccnx-common (>= 1.0), libccnx-transport-rta (>= 1.0), libccnx-portal (>= 1.0)")
elseif(RPM_PACKAGE)
SET(TYPE "RPM")
SET(GENERATOR "RPM")
SET(CPACK_PACKAGE_FILE_NAME "${PACKAGE_NAME}-${PACKAGE_VERSION}.${ARCHITECTURE}")
SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/etc" "/usr/lib/python2.7" "/usr/lib/python2.7/site-packages" "/lib/systemd/system" "/lib" "/lib/systemd")
- SET(CPACK_${TYPE}_PACKAGE_REQUIRES "longbow >= 1.0, libevent >= 2.0, openssl >= 1.0, libparc >= 1.0, libccnx-common >= 1.0, libccnx-transport-rta >= 1.0, libccnx-portal >= 1.0")
+ set(CPACK_${TYPE}_PACKAGE_AUTOREQ ON)
+ SET(CPACK_${TYPE}_PACKAGE_REQUIRES "longbow >= 1.0, libparc >= 1.0, libccnx-common >= 1.0, libccnx-transport-rta >= 1.0, libccnx-portal >= 1.0")
else()
RETURN()
endif()
@@ -131,14 +133,14 @@ set (METIS_SERVICE ${PROJECT_SOURCE_DIR}/config/metis-forwarder.service)
install(FILES ${METIS_CONFIG} DESTINATION /etc/ccnx)
install(FILES ${METIS_SERVICE} DESTINATION /lib/systemd/system)
-SET(CPACK_GENERATOR ${GENERATOR})
-SET(CPACK_${TYPE}_PACKAGE_MAINTAINER ${PACKAGE_MAINTAINER})
-SET(CPACK_${TYPE}_PACKAGE_NAME ${PACKAGE_NAME})
-SET(CPACK_${TYPE}_PACKAGE_VERSION ${PACKAGE_VERSION})
-SET(CPACK_${TYPE}_PACKAGE_ARCHITECTURE ${ARCHITECTURE})
-SET(CPACK_${TYPE}_PACKAGE_RELEASE 1)
-SET(CPACK_${TYPE}_PACKAGE_VENDOR ${VENDOR})
-SET(CPACK_${TYPE}_PACKAGE_DESCRIPTION "Metis is a CCNx socket based forwarder")
-SET(CPACK_${TYPE}_PACKAGE_HOMEPAGE "https://wiki.fd.io/view/Sb-forwarder")
-
-INCLUDE(CPack)
+set(CPACK_GENERATOR ${GENERATOR})
+set(CPACK_${TYPE}_PACKAGE_MAINTAINER ${PACKAGE_MAINTAINER})
+set(CPACK_${TYPE}_PACKAGE_NAME ${PACKAGE_NAME})
+set(CPACK_${TYPE}_PACKAGE_VERSION ${PACKAGE_VERSION})
+set(CPACK_${TYPE}_PACKAGE_ARCHITECTURE ${ARCHITECTURE})
+set(CPACK_${TYPE}_PACKAGE_RELEASE 1)
+set(CPACK_${TYPE}_PACKAGE_VENDOR ${VENDOR})
+set(CPACK_${TYPE}_PACKAGE_DESCRIPTION "Metis is a CCNx socket based forwarder")
+set(CPACK_${TYPE}_PACKAGE_HOMEPAGE "https://wiki.fd.io/view/Sb-forwarder")
+
+include(CPack)
diff --git a/metis/scripts/build-package.sh b/metis/scripts/build-package.sh
index d61249be..f6413e39 100644
--- a/metis/scripts/build-package.sh
+++ b/metis/scripts/build-package.sh
@@ -1,5 +1,4 @@
#!/bin/bash
-# basic build script example
set -euxo pipefail
IFS=$'\n\t'
@@ -9,12 +8,12 @@ apt_get=${APT_PATH:-"/usr/local/bin/apt-get"}
BUILD_TOOLS_UBUNTU="build-essential cmake"
LIBSSL_LIBEVENT_UBUNTU="libevent-dev libssl-dev"
-DEPS_UBUNTU="$LIBSSL_LIBEVENT_UBUNTU longbow libparc libccnx-common libccnx-transport-rta libccnx-portal "
+DEPS_UBUNTU="$LIBSSL_LIBEVENT_UBUNTU longbow-dev libparc-dev libccnx-common-dev libccnx-transport-rta-dev libccnx-portal-dev"
BUILD_TOOLS_GROUP_CENTOS="'Development Tools'"
BUILD_TOOLS_SINGLE_CENTOS="cmake"
LIBSSL_LIBEVENT_CENTOS="libevent-devel openssl-devel"
-DEPS_CENTOS="$LIBSSL_LIBEVENT_CENTOS longbow libparc libccnx-common libccnx-transport-rta libccnx-portal"
+DEPS_CENTOS="$LIBSSL_LIBEVENT_CENTOS longbow-devel libparc-devel libccnx-common-devel libccnx-transport-rta-devel libccnx-portal-devel"
# Parameters:
# $1 = Distribution [Trusty / CentOS]