aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt64
-rw-r--r--libdash/CMakeLists.txt98
-rw-r--r--scripts/build-package.sh2
3 files changed, 97 insertions, 67 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 11b2f5fe..fdd6dbf0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,16 +36,16 @@ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/viper DESTINATION ${CMAKE_INSTALL_P
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
@@ -53,29 +53,31 @@ 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 "qt57base, qt57svg, qt57charts-no-lgpl, qt57multimedia, libqtav-dev, libicnet, libavcodec-dev, libavformat-dev, libswscale-dev, libavresample-dev, libdash, libqml-module-qtav, qt57quickcontrols, qt57quickcontrols2")
- SET(CPACK_${TYPE}_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/scripts/postinst;")
+ set(TYPE "DEBIAN")
+ set(GENERATOR "DEB")
+ set(CPACK_PACKAGE_FILE_NAME "${PACKAGE_NAME}_${PACKAGE_VERSION}_${ARCHITECTURE}")
+ set(CPACK_${TYPE}_PACKAGE_SHLIBDEPS ON)
+ set(CPACK_${TYPE}_PACKAGE_DEPENDS "qt57base, qt57svg, qt57charts-no-lgpl, qt57multimedia, libqtav1, libicnet, libavcodec-ffmpeg56, libavformat-ffmpeg56, libswscale-ffmpeg3, libavresample-ffmpeg2, libdash, libqml-module-qtav, qt57quickcontrols, qt57quickcontrols2")
+ set(CPACK_${TYPE}_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/scripts/postinst;")
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 "")
+ 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_AUTOREQ ON)
+ set(CPACK_${TYPE}_PACKAGE_REQUIRES "")
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 "Video player able to test adaptation video streaming using the ICN protocol stack.")
-SET(CPACK_${TYPE}_PACKAGE_HOMEPAGE "https://wiki.fd.io/view/Viper")
+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 "Video player able to test adaptation video streaming using the ICN protocol stack.")
+set(CPACK_${TYPE}_PACKAGE_HOMEPAGE "https://wiki.fd.io/view/Viper")
-INCLUDE(CPack)
+include(CPack)
diff --git a/libdash/CMakeLists.txt b/libdash/CMakeLists.txt
index 7913a03f..08e48635 100644
--- a/libdash/CMakeLists.txt
+++ b/libdash/CMakeLists.txt
@@ -170,53 +170,81 @@ add_library(dash SHARED ${SOURCE_FILES})
set_target_properties(dash PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(dash ${CURL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBXML2_LIBRARIES})
message("libxml ${LIBXML2_LIBRARIES} ${LIBXML2_INCLUDE_DIR}")
-install(TARGETS dash DESTINATION ${CMAKE_INSTALL_PREFIX}/lib PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ)
-install(FILES ${HEADER_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/libdash)
+install(TARGETS dash DESTINATION ${CMAKE_INSTALL_PREFIX}/lib PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ COMPONENT library)
+install(FILES ${HEADER_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/libdash COMPONENT headers)
# Generate DEB / RPM packages
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")
+string(TOLOWER ${CMAKE_PROJECT_NAME} PACKAGE_NAME)
+set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
+set(CPACK_PACKAGE_VENDOR ${VENDOR})
+set(CPACK_PACKAGE_CONTACT ${CONTACT})
+set(CPACK_COMPONENTS_ALL library headers documentation)
# Get the version
-execute_process(COMMAND bash ${CMAKE_SOURCE_DIR}/../scripts/version
- OUTPUT_VARIABLE PACKAGE_VERSION)
-string(STRIP ${PACKAGE_VERSION} PACKAGE_VERSION)
+execute_process(COMMAND bash ${CMAKE_SOURCE_DIR}/scripts/version
+ OUTPUT_VARIABLE PACKAGE_VERSION)
+
+if (PACKAGE_VERSION)
+ string(STRIP ${PACKAGE_VERSION} PACKAGE_VERSION)
+else()
+ set(PACKAGE_VERSION 1.0)
+endif()
if(DEB_PACKAGE)
- SET(TYPE "DEBIAN")
- SET(GENERATOR "DEB")
- SET(CPACK_PACKAGE_FILE_NAME "${PACKAGE_NAME}_${PACKAGE_VERSION}_${ARCHITECTURE}")
- SET(CPACK_${TYPE}_PACKAGE_DEPENDS "zlib1g, git-core, libxml2, libcurl4-openssl-dev")
+ set(TYPE "DEBIAN")
+ set(GENERATOR "DEB")
+
+ set(CPACK_${TYPE}_LIBRARY_PACKAGE_NAME "${PACKAGE_NAME}")
+ set(CPACK_${TYPE}_HEADERS_PACKAGE_NAME "${PACKAGE_NAME}-dev")
+ set(CPACK_${TYPE}_DOCUMENTATION_PACKAGE_NAME "${PACKAGE_NAME}-doc")
+
+ set(CPACK_${TYPE}_LIBRARY_FILE_NAME "${PACKAGE_NAME}_${PACKAGE_VERSION}_${ARCHITECTURE}.deb")
+ set(CPACK_${TYPE}_HEADERS_FILE_NAME "${PACKAGE_NAME}-dev_${PACKAGE_VERSION}_${ARCHITECTURE}.deb")
+ set(CPACK_${TYPE}_DOCUMENTATION_FILE_NAME "${PACKAGE_NAME}-doc_${PACKAGE_VERSION}_${ARCHITECTURE}.deb")
+
+ set(CPACK_${TYPE}_PACKAGE_SHLIBDEPS ON)
+ set(CPACK_${TYPE}_LIBRARY_PACKAGE_DEPENDS "")
+ set(CPACK_${TYPE}_HEADERS_PACKAGE_DEPENDS "libdash (>= 1.0), libxml2-dev, libcurl4-openssl-dev")
+ set(CPACK_${TYPE}_DOCUMENTATION_PACKAGE_DEPENDS "")
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 "libxml2, libcurl, zlib")
+ set(TYPE "RPM")
+ set(GENERATOR "RPM")
+
+ set(CPACK_${TYPE}_LIBRARY_PACKAGE_NAME "${PACKAGE_NAME}")
+ set(CPACK_${TYPE}_HEADERS_PACKAGE_NAME "${PACKAGE_NAME}-devel")
+ set(CPACK_${TYPE}_DOCUMENTATION_PACKAGE_NAME "${PACKAGE_NAME}-doc")
+
+ set(CPACK_${TYPE}_LIBRARY_FILE_NAME "${PACKAGE_NAME}-${PACKAGE_VERSION}.${ARCHITECTURE}.rpm")
+ set(CPACK_${TYPE}_HEADERS_FILE_NAME "${PACKAGE_NAME}-devel-${PACKAGE_VERSION}.${ARCHITECTURE}.rpm")
+ set(CPACK_${TYPE}_DOCUMENTATION_FILE_NAME "${PACKAGE_NAME}-doc-${PACKAGE_VERSION}.${ARCHITECTURE}.rpm")
+
+ set(CPACK_${TYPE}_PACKAGE_AUTOREQ ON)
+ set(CPACK_${TYPE}_LIBRARY_PACKAGE_REQUIRES "")
+ set(CPACK_${TYPE}_HEADERS_PACKAGE_REQUIRES "libdash >= 1.0, libxml2-devel, libcurl-openssl-devel")
+ set(CPACK_${TYPE}_DOCUMENTATION_PACKAGE_REQUIRES "")
+
+ set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/etc" "/usr/lib/python2.7" "/usr/lib/python2.7/site-packages")
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 "Open-source library that provides an object orient (OO) interface to the MPEG-DASH standard")
+set(CPACK_GENERATOR ${GENERATOR})
+set(CPACK_${GENERATOR}_COMPONENT_INSTALL ON)
+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 "Open-source library that provides an object orient (OO) interface to the MPEG-DASH standard")
-INCLUDE(CPack)
+include(CPack)
diff --git a/scripts/build-package.sh b/scripts/build-package.sh
index 700b5dc0..39b396c0 100644
--- a/scripts/build-package.sh
+++ b/scripts/build-package.sh
@@ -9,7 +9,7 @@ apt_get=${APT_PATH:-"/usr/local/bin/apt-get"}
PACKAGE_NAME="VIPER"
VIPER_DEPS_UBUNTU="zlib1g-dev git-core build-essential libxml2-dev libcurl4-openssl-dev \
- qt57base qt57svg qt57charts-no-lgpl qt57multimedia libqtav-dev libicnet \
+ qt57base qt57svg qt57charts-no-lgpl qt57multimedia libqtav-dev libicnet-dev \
libavcodec-dev libavformat-dev libswscale-dev libavresample-dev libqml-module-qtav \
qt57quickcontrols qt57quickcontrols2 libboost-system-dev"