BUG: rename DEBIAN_PACKAGE_* variables to CPACK_DEBIAN_PACKAGE_* variables
to make them actually work Alex
This commit is contained in:
parent
fec600550e
commit
2d1bcf806f
|
@ -20,63 +20,63 @@ ENDIF(NOT UNIX)
|
||||||
# DEBIAN/control
|
# DEBIAN/control
|
||||||
# debian policy enforce lower case for package name
|
# debian policy enforce lower case for package name
|
||||||
# Package: (mandatory)
|
# Package: (mandatory)
|
||||||
IF(NOT DEBIAN_PACKAGE_NAME)
|
IF(NOT CPACK_DEBIAN_PACKAGE_NAME)
|
||||||
STRING(TOLOWER "${CPACK_PACKAGE_NAME}" DEBIAN_PACKAGE_NAME)
|
STRING(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_DEBIAN_PACKAGE_NAME)
|
||||||
ENDIF(NOT DEBIAN_PACKAGE_NAME)
|
ENDIF(NOT CPACK_DEBIAN_PACKAGE_NAME)
|
||||||
|
|
||||||
# Version: (mandatory)
|
# Version: (mandatory)
|
||||||
IF(NOT DEBIAN_PACKAGE_VERSION)
|
IF(NOT CPACK_DEBIAN_PACKAGE_VERSION)
|
||||||
IF(NOT CPACK_PACKAGE_VERSION)
|
IF(NOT CPACK_PACKAGE_VERSION)
|
||||||
MESSAGE(FATAL_ERROR "Debian package requires a package version")
|
MESSAGE(FATAL_ERROR "Debian package requires a package version")
|
||||||
ENDIF(NOT CPACK_PACKAGE_VERSION)
|
ENDIF(NOT CPACK_PACKAGE_VERSION)
|
||||||
SET(DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
|
SET(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
|
||||||
ENDIF(NOT DEBIAN_PACKAGE_VERSION)
|
ENDIF(NOT CPACK_DEBIAN_PACKAGE_VERSION)
|
||||||
|
|
||||||
# Architecture: (mandatory)
|
# Architecture: (mandatory)
|
||||||
IF(NOT DEBIAN_PACKAGE_ARCHITECTURE)
|
IF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
|
||||||
# There is no such thing as i686 architecture on debian, you should use i386 instead
|
# There is no such thing as i686 architecture on debian, you should use i386 instead
|
||||||
# $ dpkg --print-architecture
|
# $ dpkg --print-architecture
|
||||||
SET(DEBIAN_PACKAGE_ARCHITECTURE i386)
|
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
|
||||||
ENDIF(NOT DEBIAN_PACKAGE_ARCHITECTURE)
|
ENDIF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
|
||||||
|
|
||||||
# have a look at GET_PROPERTY(result GLOBAL ENABLED_FEATURES), this returns
|
# have a look at GET_PROPERTY(result GLOBAL ENABLED_FEATURES), this returns
|
||||||
# the successful FIND_PACKAGE() calls, maybe this can help
|
# the successful FIND_PACKAGE() calls, maybe this can help
|
||||||
# Depends:
|
# Depends:
|
||||||
IF(NOT DEBIAN_PACKAGE_DEPENDS)
|
IF(NOT CPACK_DEBIAN_PACKAGE_DEPENDS)
|
||||||
MESSAGE(STATUS "DEBIAN_PACKAGE_DEPENDS not set, the package will have no dependencies.")
|
MESSAGE(STATUS "CPACK_DEBIAN_PACKAGE_DEPENDS not set, the package will have no dependencies.")
|
||||||
ENDIF(NOT DEBIAN_PACKAGE_DEPENDS)
|
ENDIF(NOT CPACK_DEBIAN_PACKAGE_DEPENDS)
|
||||||
|
|
||||||
# Maintainer: (mandatory)
|
# Maintainer: (mandatory)
|
||||||
IF(NOT DEBIAN_PACKAGE_MAINTAINER)
|
IF(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER)
|
||||||
IF(NOT CPACK_PACKAGE_CONTACT)
|
IF(NOT CPACK_PACKAGE_CONTACT)
|
||||||
MESSAGE(FATAL_ERROR "Debian package requires a maintainer for a package, set CPACK_PACKAGE_CONTACT or DEBIAN_PACKAGE_MAINTAINER")
|
MESSAGE(FATAL_ERROR "Debian package requires a maintainer for a package, set CPACK_PACKAGE_CONTACT or CPACK_DEBIAN_PACKAGE_MAINTAINER")
|
||||||
ENDIF(NOT CPACK_PACKAGE_CONTACT)
|
ENDIF(NOT CPACK_PACKAGE_CONTACT)
|
||||||
SET(DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT})
|
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT})
|
||||||
ENDIF(NOT DEBIAN_PACKAGE_MAINTAINER)
|
ENDIF(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER)
|
||||||
|
|
||||||
# Description: (mandatory)
|
# Description: (mandatory)
|
||||||
IF(NOT DEBIAN_PACKAGE_DESCRIPTION)
|
IF(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
|
||||||
IF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
IF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
||||||
MESSAGE(FATAL_ERROR "Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or DEBIAN_PACKAGE_DESCRIPTION")
|
MESSAGE(FATAL_ERROR "Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION")
|
||||||
ENDIF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
ENDIF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
||||||
SET(DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
|
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
|
||||||
ENDIF(NOT DEBIAN_PACKAGE_DESCRIPTION)
|
ENDIF(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
|
||||||
|
|
||||||
# Section: (recommended)
|
# Section: (recommended)
|
||||||
IF(NOT DEBIAN_PACKAGE_SECTION)
|
IF(NOT CPACK_DEBIAN_PACKAGE_SECTION)
|
||||||
SET(DEBIAN_PACKAGE_SECTION "devel")
|
SET(CPACK_DEBIAN_PACKAGE_SECTION "devel")
|
||||||
ENDIF(NOT DEBIAN_PACKAGE_SECTION)
|
ENDIF(NOT CPACK_DEBIAN_PACKAGE_SECTION)
|
||||||
|
|
||||||
# Priority: (recommended)
|
# Priority: (recommended)
|
||||||
IF(NOT DEBIAN_PACKAGE_PRIORITY)
|
IF(NOT CPACK_DEBIAN_PACKAGE_PRIORITY)
|
||||||
SET(DEBIAN_PACKAGE_PRIORITY "optional")
|
SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
|
||||||
ENDIF(NOT DEBIAN_PACKAGE_PRIORITY )
|
ENDIF(NOT CPACK_DEBIAN_PACKAGE_PRIORITY )
|
||||||
|
|
||||||
# Recommends:
|
# Recommends:
|
||||||
# You should set: DEBIAN_PACKAGE_RECOMMENDS
|
# You should set: CPACK_DEBIAN_PACKAGE_RECOMMENDS
|
||||||
|
|
||||||
# Suggests:
|
# Suggests:
|
||||||
# You should set: DEBIAN_PACKAGE_SUGGESTS
|
# You should set: CPACK_DEBIAN_PACKAGE_SUGGESTS
|
||||||
|
|
||||||
|
|
||||||
# For debian source packages:
|
# For debian source packages:
|
||||||
|
@ -87,8 +87,8 @@ ENDIF(NOT DEBIAN_PACKAGE_PRIORITY )
|
||||||
# http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-debiansourcecontrolfiles
|
# http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-debiansourcecontrolfiles
|
||||||
|
|
||||||
# Builds-Depends:
|
# Builds-Depends:
|
||||||
#IF(NOT DEBIAN_PACKAGE_BUILDS_DEPENDS)
|
#IF(NOT CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS)
|
||||||
# SET(DEBIAN_PACKAGE_BUILDS_DEPENDS
|
# SET(CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS
|
||||||
# "debhelper (>> 5.0.0), libncurses5-dev, tcl8.4"
|
# "debhelper (>> 5.0.0), libncurses5-dev, tcl8.4"
|
||||||
# )
|
# )
|
||||||
#ENDIF(NOT DEBIAN_PACKAGE_BUILDS_DEPENDS)
|
#ENDIF(NOT CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS)
|
||||||
|
|
|
@ -67,19 +67,25 @@ int cmCPackDebGenerator::CompressFiles(const char* outFileName,
|
||||||
|
|
||||||
// debian policy enforce lower case for package name
|
// debian policy enforce lower case for package name
|
||||||
// mandatory entries:
|
// mandatory entries:
|
||||||
std::string debian_pkg_name =
|
std::string debian_pkg_name = cmsys::SystemTools::LowerCase(
|
||||||
cmsys::SystemTools::LowerCase( this->GetOption("DEBIAN_PACKAGE_NAME") );
|
this->GetOption("CPACK_DEBIAN_PACKAGE_NAME") );
|
||||||
const char* debian_pkg_version = this->GetOption("DEBIAN_PACKAGE_VERSION");
|
const char* debian_pkg_version =
|
||||||
const char* debian_pkg_section = this->GetOption("DEBIAN_PACKAGE_SECTION");
|
this->GetOption("CPACK_DEBIAN_PACKAGE_VERSION");
|
||||||
const char* debian_pkg_priority = this->GetOption("DEBIAN_PACKAGE_PRIORITY");
|
const char* debian_pkg_section =
|
||||||
const char* debian_pkg_arch = this->GetOption("DEBIAN_PACKAGE_ARCHITECTURE");
|
this->GetOption("CPACK_DEBIAN_PACKAGE_SECTION");
|
||||||
const char* maintainer = this->GetOption("DEBIAN_PACKAGE_MAINTAINER");
|
const char* debian_pkg_priority =
|
||||||
const char* desc = this->GetOption("DEBIAN_PACKAGE_DESCRIPTION");
|
this->GetOption("CPACK_DEBIAN_PACKAGE_PRIORITY");
|
||||||
|
const char* debian_pkg_arch =
|
||||||
|
this->GetOption("CPACK_DEBIAN_PACKAGE_ARCHITECTURE");
|
||||||
|
const char* maintainer = this->GetOption("CPACK_DEBIAN_PACKAGE_MAINTAINER");
|
||||||
|
const char* desc = this->GetOption("CPACK_DEBIAN_PACKAGE_DESCRIPTION");
|
||||||
|
|
||||||
// optional entries
|
// optional entries
|
||||||
const char* debian_pkg_dep = this->GetOption("DEBIAN_PACKAGE_DEPENDS");
|
const char* debian_pkg_dep = this->GetOption("CPACK_DEBIAN_PACKAGE_DEPENDS");
|
||||||
const char* debian_pkg_rec = this->GetOption("DEBIAN_PACKAGE_RECOMMENDS");
|
const char* debian_pkg_rec =
|
||||||
const char* debian_pkg_sug = this->GetOption("DEBIAN_PACKAGE_SUGGESTS");
|
this->GetOption("CPACK_DEBIAN_PACKAGE_RECOMMENDS");
|
||||||
|
const char* debian_pkg_sug =
|
||||||
|
this->GetOption("CPACK_DEBIAN_PACKAGE_SUGGESTS");
|
||||||
|
|
||||||
{ // the scope is needed for cmGeneratedFileStream
|
{ // the scope is needed for cmGeneratedFileStream
|
||||||
cmGeneratedFileStream out(ctlfilename.c_str());
|
cmGeneratedFileStream out(ctlfilename.c_str());
|
||||||
|
|
Loading…
Reference in New Issue