Improved cpack configuration for building debian packages:
* Added configurable maintainer * Added configurable dependencies and conflicts per package * Added post install script to run ldconfig after package is installed * Updated name of readme file in cpack configuration
This commit is contained in:
parent
44e303ad90
commit
1bf303e566
@ -84,9 +84,87 @@ ENDIF()
|
||||
SET(PACKAGE_ALL_TARGETNAME "${PACKAGE_TARGET_PREFIX}ALL")
|
||||
ADD_CUSTOM_TARGET(${PACKAGE_ALL_TARGETNAME})
|
||||
|
||||
# cpack configuration for debian packages
|
||||
IF(${CPACK_GENERATOR} STREQUAL "DEB")
|
||||
SET(OPENSCENEGRAPH_PACKAGE_MAINTAINER
|
||||
""
|
||||
CACHE STRING
|
||||
"Name and email address of the package maintainer, e.g., 'Jon Doe <jon.doe@superawesomemail.com>'"
|
||||
)
|
||||
SET(CPACK_LIBOPENSCENEGRAPH_DEPENDENCIES
|
||||
"libopenthreads"
|
||||
CACHE STRING
|
||||
"Dependend packages for the openscenegraph library package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||
)
|
||||
SET(CPACK_LIBOPENSCENEGRAPH-DEV_DEPENDENCIES
|
||||
"libopenscenegraph"
|
||||
CACHE STRING
|
||||
"Dependend packages for the openscenegraph development package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||
)
|
||||
SET(CPACK_LIBOPENTHREADS_DEPENDENCIES
|
||||
""
|
||||
CACHE STRING
|
||||
"Dependend packages for the openthreads library package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||
)
|
||||
SET(CPACK_LIBOPENTHREADS-DEV_DEPENDENCIES
|
||||
"libopenthreads"
|
||||
CACHE STRING
|
||||
"Dependend packages for the openthreads development package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||
)
|
||||
SET(CPACK_OPENSCENEGRAPH_DEPENDENCIES
|
||||
"libopenscenegraph"
|
||||
CACHE STRING
|
||||
"Dependend packages for the openscenegraph main package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||
)
|
||||
SET(CPACK_OPENSCENEGRAPH-ALL_DEPENDENCIES
|
||||
""
|
||||
CACHE STRING
|
||||
"Dependend packages for the openscenegraph package with all components (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||
)
|
||||
|
||||
SET(CPACK_LIBOPENSCENEGRAPH_CONFLICTS
|
||||
""
|
||||
CACHE STRING
|
||||
"Conflicting packages for the openscenegraph library package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||
)
|
||||
SET(CPACK_LIBOPENSCENEGRAPH-DEV_CONFLICTS
|
||||
""
|
||||
CACHE STRING
|
||||
"Conflicting packages for the openscenegraph development package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||
)
|
||||
SET(CPACK_LIBOPENTHREADS_CONFLICTS
|
||||
""
|
||||
CACHE STRING
|
||||
"Conflicting packages for the openthreads library package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||
)
|
||||
SET(CPACK_LIBOPENTHREADS-DEV_CONFLICTS
|
||||
""
|
||||
CACHE STRING
|
||||
"Conflicting packages for the openthreads development package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||
)
|
||||
SET(CPACK_OPENSCENEGRAPH_CONFLICTS
|
||||
""
|
||||
CACHE STRING
|
||||
"Conflicting packages for the openscenegraph main package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||
)
|
||||
SET(CPACK_OPENSCENEGRAPH-ALL_CONFLICTS
|
||||
""
|
||||
CACHE STRING
|
||||
"Conflicting packages for the openscenegraph package with all components (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
MACRO(GENERATE_PACKAGING_TARGET package_name)
|
||||
SET(CPACK_PACKAGE_NAME ${package_name})
|
||||
|
||||
# set debian dependencies AND conflicts
|
||||
IF(${CPACK_GENERATOR} STREQUAL "DEB")
|
||||
STRING(TOUPPER CPACK_${package_name}_DEPENDENCIES DEPENDENCIES_VAR)
|
||||
STRING(TOUPPER CPACK_${package_name}_CONFLICTS CONFLICTS_VAR)
|
||||
SET(OSG_PACKAGE_DEPENDS "${${DEPENDENCIES_VAR}}")
|
||||
SET(OSG_PACKAGE_CONFLICTS "${${CONFLICTS_VAR}}")
|
||||
ENDIF()
|
||||
|
||||
# the doc packages don't need a system-arch specification
|
||||
IF(${package} MATCHES -doc)
|
||||
SET(OSG_PACKAGE_FILE_NAME ${package_name}-${OPENSCENEGRAPH_VERSION})
|
||||
|
@ -53,7 +53,7 @@ SET(CPACK_NSIS_INSTALLER_ICON_CODE "")
|
||||
SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
|
||||
SET(CPACK_OUTPUT_CONFIG_FILE "${PROJECT_BINARY_DIR}/CPackConfig-${OSG_CPACK_COMPONENT}.cmake")
|
||||
SET(CPACK_PACKAGE_DEFAULT_LOCATION "/")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${OpenSceneGraph_SOURCE_DIR}/README.txt")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${OpenSceneGraph_SOURCE_DIR}/README.md")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The OpenSceneGraph is an open source high performance 3d graphics toolkit")
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${OSG_PACKAGE_FILE_NAME}")
|
||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
||||
@ -66,6 +66,16 @@ SET(CPACK_PACKAGE_VERSION_MAJOR "${OPENSCENEGRAPH_MAJOR_VERSION}")
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR "${OPENSCENEGRAPH_MINOR_VERSION}")
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "${OPENSCENEGRAPH_PATCH_VERSION}")
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${OpenSceneGraph_SOURCE_DIR}/LICENSE.txt")
|
||||
SET(CPACK_RESOURCE_FILE_README "${OpenSceneGraph_SOURCE_DIR}/README.txt")
|
||||
SET(CPACK_RESOURCE_FILE_README "${OpenSceneGraph_SOURCE_DIR}/README.md")
|
||||
SET(CPACK_RESOURCE_FILE_WELCOME "${OpenSceneGraph_SOURCE_DIR}/NEWS.txt")
|
||||
SET(CPACK_STRIP_FILES "ON")
|
||||
|
||||
# DEBIAN OPTIONS
|
||||
IF(${CPACK_GENERATOR} STREQUAL "DEB")
|
||||
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "${OPENSCENEGRAPH_PACKAGE_MAINTAINER}")
|
||||
SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://www.openscenegraph.org")
|
||||
SET(CPACK_DEBIAN_PACKAGE_SECTION "Development")
|
||||
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${OSG_PACKAGE_DEPENDS}")
|
||||
SET(CPACK_DEBIAN_PACKAGE_CONFLICTS "${OSG_PACKAGE_CONFLICTS}")
|
||||
SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${OpenSceneGraph_SOURCE_DIR}/debian_scripts/postinst;")
|
||||
ENDIF()
|
||||
|
@ -266,6 +266,23 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME)
|
||||
## plugins gets put in libopenscenegraph by default
|
||||
IF(${ARGC} GREATER 1)
|
||||
SET(PACKAGE_COMPONENT libopenscenegraph-${ARGV1})
|
||||
|
||||
# add cpack config variables for plugin with own package
|
||||
IF(BUILD_OSG_PACKAGES)
|
||||
IF(${CPACK_GENERATOR} STREQUAL "DEB")
|
||||
STRING(TOUPPER ${PACKAGE_COMPONENT} UPPER_PACKAGE_COMPONENT)
|
||||
SET(CPACK_${UPPER_PACKAGE_COMPONENT}_DEPENDENCIES
|
||||
"libopenscenegraph"
|
||||
CACHE STRING
|
||||
"Dependend packages for the ${PACKAGE_COMPONENT} package with all components (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||
)
|
||||
SET(CPACK_${UPPER_PACKAGE_COMPONENT}_CONFLICTS
|
||||
""
|
||||
CACHE STRING
|
||||
"Conflicting packages for the ${PACKAGE_COMPONENT} package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||
)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ELSE(${ARGC} GREATER 1)
|
||||
SET(PACKAGE_COMPONENT libopenscenegraph)
|
||||
ENDIF(${ARGC} GREATER 1)
|
||||
|
1
debian_scripts/postinst
Executable file
1
debian_scripts/postinst
Executable file
@ -0,0 +1 @@
|
||||
ldconfig
|
Loading…
Reference in New Issue
Block a user