diff options
author | Mauro Sardara <msardara+fdio@cisco.com> | 2017-04-29 22:08:23 +0200 |
---|---|---|
committer | Mauro Sardara <msardara+fdio@cisco.com> | 2017-04-29 21:50:52 +0000 |
commit | fbcf0d957d90cf5ab969de3bb8a6dc74327205e4 (patch) | |
tree | cd8d77151c3eb16c15d68385b8c91cd7a07785cf | |
parent | 8eb99c48f492a311753113ac75fb99892b79ae39 (diff) |
Fixing build dependencies to dev packages
Change-Id: Ic2c932d86a68c284fbfe3d9cce56a452f3d8ff04
Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
-rw-r--r-- | CMakeLists.txt | 64 | ||||
-rw-r--r-- | scripts/build-package.sh | 6 |
2 files changed, 34 insertions, 36 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c6823cea..da9bbc37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,17 +57,17 @@ install(TARGETS http-server DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) 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} 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} 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 @@ -75,28 +75,28 @@ execute_process(COMMAND bash ${CMAKE_SOURCE_DIR}/scripts/version string(STRIP ${PACKAGE_VERSION} PACKAGE_VERSION) 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), libboost-system-dev (>= 1.53), libboost-regex-dev (>= 1.53), libboost-filesystem-dev (>= 1.53), libicnet (>= 1.0)") + 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), libboost-system-dev (>= 1.53), libboost-regex-dev (>= 1.53), libboost-filesystem-dev (>= 1.53), libicnet (>= 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") - SET(CPACK_${TYPE}_PACKAGE_REQUIRES "longbow >= 1.0, libevent >= 2.0, openssl >= 1.0, libparc >= 1.0, libccnx-common >= 1.0, boost-system >= 1.53, boost-regex >= 1.53, boost-filesystem >= 1.53, libicnet >= 1.0") + 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") + set(CPACK_${TYPE}_PACKAGE_REQUIRES "longbow >= 1.0, libevent >= 2.0, openssl >= 1.0, libparc >= 1.0, libccnx-common >= 1.0, boost-system >= 1.53, boost-regex >= 1.53, boost-filesystem >= 1.53, libicnet >= 1.0") else () - RETURN() + return() endif () -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 "Implementation of a HTTP server able to serve client requests using both TCP and ICN as transport protocol.") -SET(CPACK_${TYPE}_PACKAGE_HOMEPAGE "https://wiki.fd.io/view/Http-server") - -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 "Implementation of a HTTP server able to serve client requests using both TCP and ICN as transport protocol.") +set(CPACK_${TYPE}_PACKAGE_HOMEPAGE "https://wiki.fd.io/view/Http-server") + +include(CPack) diff --git a/scripts/build-package.sh b/scripts/build-package.sh index 6ea9aab0..e459c969 100644 --- a/scripts/build-package.sh +++ b/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 libicnet libboost-system-dev libboost-regex-dev libboost-filesystem-dev " +DEPS_UBUNTU="$LIBSSL_LIBEVENT_UBUNTU longbow-dev libparc-dev libccnx-common-dev libccnx-transport-rta-dev libicnet-dev libboost-system-dev libboost-regex-dev libboost-filesystem-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 libicnet boost-devel" +DEPS_CENTOS="$LIBSSL_LIBEVENT_CENTOS longbow-devel libparc-devel libccnx-common-devel libccnx-transport-rta-devel libicnet-devel boost-devel" # Parameters: # $1 = Distribution [Trusty / CentOS] @@ -119,7 +118,6 @@ EOF echo "Distribution $DISTRIB_CODENAME is not supported" exit -1 fi - } setup() { |