### Navigation

- index
- next |
- previous |
- CMake »
- 3.2.3 Documentation »
- cmake-modules(7) »

# CPackDeb

The builtin (binary) CPack Deb generator (Unix only)

## Variables specific to CPack Debian (DEB) generator

CPackDeb may be used to create Deb package using CPack. CPackDeb is a CPack generator thus it uses the CPACK_XXX variables used by CPack : http://www.cmake.org/Wiki/CMake:CPackConfiguration. CPackDeb generator should work on any linux host but it will produce better deb package when Debian specific tools ‘dpkg-xxx’ are usable on the build system.

CPackDeb has specific features which are controlled by the specifics CPACK_DEBIAN_XXX variables.You’ll find a detailed usage on the wiki: http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29

However as a handy reminder here comes the list of specific variables:

`CPACK_DEBIAN_PACKAGE_NAME`
  - Mandatory : YES
  - Default : CPACK_PACKAGE_NAME (lower case)

  The debian package summary

`CPACK_DEBIAN_PACKAGE_VERSION`
  - Mandatory : YES
  - Default : CPACK_PACKAGE_VERSION

  The debian package version

`CPACK_DEBIAN_PACKAGE_ARCHITECTURE`
  - Mandatory : YES
  - Default : Output of dpkg –print-architecture (or i386 if dpkg is not found)

  The debian package architecture

`CPACK_DEBIAN_PACKAGE_DEPENDS`
  - Mandatory : NO
  - Default : -

  May be used to set deb dependencies.

`CPACK_DEBIAN_PACKAGE_MAINTAINER`
  - Mandatory : YES
  - Default : CPACK_PACKAGE_CONTACT

  The debian package maintainer

`CPACK_DEBIAN_PACKAGE_DESCRIPTION`
  - Mandatory : YES
  - Default : CPACK_PACKAGE_DESCRIPTION_SUMMARY

  The debian package description

`CPACK_DEBIAN_PACKAGE_SECTION`
  - Mandatory : YES
  - Default : ‘devel’

`CPACK_DEBIAN_COMPRESSION_TYPE`

  - Mandatory : YES

  - Default : ‘gzip’

    > Possible values are: lzma, xz, bzip2 and gzip.

`CPACK_DEBIAN_PACKAGE_PRIORITY`
  - Mandatory : YES
  - Default : ‘optional’

  The debian package priority

`CPACK_DEBIAN_PACKAGE_HOMEPAGE`
  - Mandatory : NO
  - Default : -

  The URL of the web site for this package, preferably (when applicable) the site from which the original source can be obtained and any additional upstream documentation or information may be found. The content of this field is a simple URL without any surrounding characters such as <>.

`CPACK_DEBIAN_PACKAGE_SHLIBDEPS`
  - Mandatory : NO
  - Default : OFF

  May be set to ON in order to use dpkg-shlibdeps to generate better package dependency list. You may need set CMAKE_INSTALL_RPATH toi appropriate value if you use this feature, because if you don’t dpkg-shlibdeps may fail to find your own shared libs. See http://www.cmake.org/Wiki/CMake_RPATH_handling.

`CPACK_DEBIAN_PACKAGE_DEBUG`
  - Mandatory : NO
  - Default : -

  May be set when invoking cpack in order to trace debug information during CPackDeb run.

`CPACK_DEBIAN_PACKAGE_PREDEPENDS`
  - Mandatory : NO
  - Default : -

  see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps This field is like Depends, except that it also forces dpkg to complete installation of the packages named before even starting the installation of the package which declares the pre-dependency.

`CPACK_DEBIAN_PACKAGE_ENHANCES`
  - Mandatory : NO
  - Default : -

  see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps This field is similar to Suggests but works in the opposite direction. It is used to declare that a package can enhance the functionality of another package.

`CPACK_DEBIAN_PACKAGE_BREAKS`
  - Mandatory : NO
  - Default : -

  see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps When one binary package declares that it breaks another, dpkg will refuse to allow the package which declares Breaks be installed unless the broken package is deconfigured first, and it will refuse to allow the broken package to be reconfigured.

`CPACK_DEBIAN_PACKAGE_CONFLICTS`
  - Mandatory : NO
  - Default : -

  see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps When one binary package declares a conflict with another using a Conflicts field, dpkg will refuse to allow them to be installed on the system at the same time.

`CPACK_DEBIAN_PACKAGE_PROVIDES`
  - Mandatory : NO
  - Default : -

  see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps A virtual package is one which appears in the Provides control field of another package.

`CPACK_DEBIAN_PACKAGE_REPLACES`
  - Mandatory : NO
  - Default : -

  see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps Packages can declare in their control file that they should overwrite files in certain other packages, or completely replace other packages.

`CPACK_DEBIAN_PACKAGE_RECOMMENDS`
  - Mandatory : NO
  - Default : -

  see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps Allows packages to declare a strong, but not absolute, dependency on other packages.

`CPACK_DEBIAN_PACKAGE_SUGGESTS`
  - Mandatory : NO
  - Default : -

  see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps Allows packages to declare a suggested package install grouping.

`CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA`
  - Mandatory : NO
  - Default : -

  This variable allow advanced user to add custom script to the control.tar.gz Typical usage is for conffiles, postinst, postrm, prerm. Usage:

      set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
          "${CMAKE_CURRENT_SOURCE_DIR/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm")

### Navigation

- index
- next |
- previous |
- CMake »
- 3.2.3 Documentation »
- cmake-modules(7) »