aboutsummaryrefslogtreecommitdiffstats
path: root/metis/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'metis/CMakeLists.txt')
-rw-r--r--metis/CMakeLists.txt50
1 files changed, 26 insertions, 24 deletions
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)