From 2d1bcf806f5a0bbff1b13953f38ec5ab79fcd0e1 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Thu, 25 Oct 2007 13:26:54 -0400 Subject: BUG: rename DEBIAN_PACKAGE_* variables to CPACK_DEBIAN_PACKAGE_* variables to make them actually work Alex --- Modules/CPackDeb.cmake | 62 ++++++++++++++++++------------------ Source/CPack/cmCPackDebGenerator.cxx | 28 +++++++++------- 2 files changed, 48 insertions(+), 42 deletions(-) diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index e3f2a66..22940a2 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -20,63 +20,63 @@ ENDIF(NOT UNIX) # DEBIAN/control # debian policy enforce lower case for package name # Package: (mandatory) -IF(NOT DEBIAN_PACKAGE_NAME) - STRING(TOLOWER "${CPACK_PACKAGE_NAME}" DEBIAN_PACKAGE_NAME) -ENDIF(NOT DEBIAN_PACKAGE_NAME) +IF(NOT CPACK_DEBIAN_PACKAGE_NAME) + STRING(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_DEBIAN_PACKAGE_NAME) +ENDIF(NOT CPACK_DEBIAN_PACKAGE_NAME) # Version: (mandatory) -IF(NOT DEBIAN_PACKAGE_VERSION) +IF(NOT CPACK_DEBIAN_PACKAGE_VERSION) IF(NOT CPACK_PACKAGE_VERSION) MESSAGE(FATAL_ERROR "Debian package requires a package version") ENDIF(NOT CPACK_PACKAGE_VERSION) - SET(DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}) -ENDIF(NOT DEBIAN_PACKAGE_VERSION) + SET(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}) +ENDIF(NOT CPACK_DEBIAN_PACKAGE_VERSION) # 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 # $ dpkg --print-architecture - SET(DEBIAN_PACKAGE_ARCHITECTURE i386) -ENDIF(NOT DEBIAN_PACKAGE_ARCHITECTURE) + SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386) +ENDIF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE) # have a look at GET_PROPERTY(result GLOBAL ENABLED_FEATURES), this returns # the successful FIND_PACKAGE() calls, maybe this can help # Depends: -IF(NOT DEBIAN_PACKAGE_DEPENDS) - MESSAGE(STATUS "DEBIAN_PACKAGE_DEPENDS not set, the package will have no dependencies.") -ENDIF(NOT DEBIAN_PACKAGE_DEPENDS) +IF(NOT CPACK_DEBIAN_PACKAGE_DEPENDS) + MESSAGE(STATUS "CPACK_DEBIAN_PACKAGE_DEPENDS not set, the package will have no dependencies.") +ENDIF(NOT CPACK_DEBIAN_PACKAGE_DEPENDS) # Maintainer: (mandatory) -IF(NOT DEBIAN_PACKAGE_MAINTAINER) +IF(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER) 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) - SET(DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT}) -ENDIF(NOT DEBIAN_PACKAGE_MAINTAINER) + SET(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT}) +ENDIF(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER) # Description: (mandatory) -IF(NOT DEBIAN_PACKAGE_DESCRIPTION) +IF(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) 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) - SET(DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) -ENDIF(NOT DEBIAN_PACKAGE_DESCRIPTION) + SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) +ENDIF(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) # Section: (recommended) -IF(NOT DEBIAN_PACKAGE_SECTION) - SET(DEBIAN_PACKAGE_SECTION "devel") -ENDIF(NOT DEBIAN_PACKAGE_SECTION) +IF(NOT CPACK_DEBIAN_PACKAGE_SECTION) + SET(CPACK_DEBIAN_PACKAGE_SECTION "devel") +ENDIF(NOT CPACK_DEBIAN_PACKAGE_SECTION) # Priority: (recommended) -IF(NOT DEBIAN_PACKAGE_PRIORITY) - SET(DEBIAN_PACKAGE_PRIORITY "optional") -ENDIF(NOT DEBIAN_PACKAGE_PRIORITY ) +IF(NOT CPACK_DEBIAN_PACKAGE_PRIORITY) + SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") +ENDIF(NOT CPACK_DEBIAN_PACKAGE_PRIORITY ) # Recommends: -# You should set: DEBIAN_PACKAGE_RECOMMENDS +# You should set: CPACK_DEBIAN_PACKAGE_RECOMMENDS # Suggests: -# You should set: DEBIAN_PACKAGE_SUGGESTS +# You should set: CPACK_DEBIAN_PACKAGE_SUGGESTS # 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 # Builds-Depends: -#IF(NOT DEBIAN_PACKAGE_BUILDS_DEPENDS) -# SET(DEBIAN_PACKAGE_BUILDS_DEPENDS +#IF(NOT CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS) +# SET(CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS # "debhelper (>> 5.0.0), libncurses5-dev, tcl8.4" # ) -#ENDIF(NOT DEBIAN_PACKAGE_BUILDS_DEPENDS) +#ENDIF(NOT CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS) diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 9a0be43..88a4e25 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -67,19 +67,25 @@ int cmCPackDebGenerator::CompressFiles(const char* outFileName, // debian policy enforce lower case for package name // mandatory entries: - std::string debian_pkg_name = - cmsys::SystemTools::LowerCase( this->GetOption("DEBIAN_PACKAGE_NAME") ); - const char* debian_pkg_version = this->GetOption("DEBIAN_PACKAGE_VERSION"); - const char* debian_pkg_section = this->GetOption("DEBIAN_PACKAGE_SECTION"); - const char* debian_pkg_priority = this->GetOption("DEBIAN_PACKAGE_PRIORITY"); - const char* debian_pkg_arch = this->GetOption("DEBIAN_PACKAGE_ARCHITECTURE"); - const char* maintainer = this->GetOption("DEBIAN_PACKAGE_MAINTAINER"); - const char* desc = this->GetOption("DEBIAN_PACKAGE_DESCRIPTION"); + std::string debian_pkg_name = cmsys::SystemTools::LowerCase( + this->GetOption("CPACK_DEBIAN_PACKAGE_NAME") ); + const char* debian_pkg_version = + this->GetOption("CPACK_DEBIAN_PACKAGE_VERSION"); + const char* debian_pkg_section = + this->GetOption("CPACK_DEBIAN_PACKAGE_SECTION"); + const char* debian_pkg_priority = + 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 - const char* debian_pkg_dep = this->GetOption("DEBIAN_PACKAGE_DEPENDS"); - const char* debian_pkg_rec = this->GetOption("DEBIAN_PACKAGE_RECOMMENDS"); - const char* debian_pkg_sug = this->GetOption("DEBIAN_PACKAGE_SUGGESTS"); + const char* debian_pkg_dep = this->GetOption("CPACK_DEBIAN_PACKAGE_DEPENDS"); + const char* debian_pkg_rec = + this->GetOption("CPACK_DEBIAN_PACKAGE_RECOMMENDS"); + const char* debian_pkg_sug = + this->GetOption("CPACK_DEBIAN_PACKAGE_SUGGESTS"); { // the scope is needed for cmGeneratedFileStream cmGeneratedFileStream out(ctlfilename.c_str()); -- cgit v0.12