deb.rst 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678
  1. CPack DEB Generator
  2. -------------------
  3. The built in (binary) CPack DEB generator (Unix only)
  4. Variables specific to CPack Debian (DEB) generator
  5. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  6. The CPack DEB generator may be used to create DEB package using :module:`CPack`.
  7. The CPack DEB generator is a :module:`CPack` generator thus it uses the
  8. ``CPACK_XXX`` variables used by :module:`CPack`.
  9. The CPack DEB generator should work on any Linux host but it will produce
  10. better deb package when Debian specific tools ``dpkg-xxx`` are usable on
  11. the build system.
  12. The CPack DEB generator has specific features which are controlled by the
  13. specifics ``CPACK_DEBIAN_XXX`` variables.
  14. ``CPACK_DEBIAN_<COMPONENT>_XXXX`` variables may be used in order to have
  15. **component** specific values. Note however that ``<COMPONENT>`` refers to
  16. the **grouping name** written in upper case. It may be either a component name
  17. or a component GROUP name.
  18. Here are some CPack DEB generator wiki resources that are here for historic
  19. reasons and are no longer maintained but may still prove useful:
  20. - https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack/Configuration
  21. - https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack/PackageGenerators#deb-unix-only
  22. List of CPack DEB generator specific variables:
  23. .. variable:: CPACK_DEB_COMPONENT_INSTALL
  24. Enable component packaging for CPackDEB
  25. * Mandatory : NO
  26. * Default : OFF
  27. If enabled (ON) multiple packages are generated. By default a single package
  28. containing files of all components is generated.
  29. .. variable:: CPACK_DEBIAN_PACKAGE_NAME
  30. CPACK_DEBIAN_<COMPONENT>_PACKAGE_NAME
  31. Set Package control field (variable is automatically transformed to lower
  32. case).
  33. * Mandatory : YES
  34. * Default :
  35. - :variable:`CPACK_PACKAGE_NAME` for non-component based
  36. installations
  37. - :variable:`CPACK_DEBIAN_PACKAGE_NAME` suffixed with -<COMPONENT>
  38. for component-based installations.
  39. .. versionadded:: 3.5
  40. Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_NAME`` variables.
  41. See https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Source
  42. .. variable:: CPACK_DEBIAN_FILE_NAME
  43. CPACK_DEBIAN_<COMPONENT>_FILE_NAME
  44. .. versionadded:: 3.6
  45. Package file name.
  46. * Mandatory : YES
  47. * Default : ``<CPACK_PACKAGE_FILE_NAME>[-<component>].deb``
  48. This may be set to ``DEB-DEFAULT`` to allow the CPack DEB generator to generate
  49. package file name by itself in deb format::
  50. <PackageName>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb
  51. Alternatively provided package file name must end
  52. with either ``.deb`` or ``.ipk`` suffix.
  53. .. versionadded:: 3.10
  54. ``.ipk`` suffix used by OPKG packaging system.
  55. .. note::
  56. Preferred setting of this variable is ``DEB-DEFAULT`` but for backward
  57. compatibility with the CPack DEB generator in CMake prior to version 3.6 this
  58. feature is disabled by default.
  59. .. note::
  60. By using non default filenames duplicate names may occur. Duplicate files
  61. get overwritten and it is up to the packager to set the variables in a
  62. manner that will prevent such errors.
  63. .. variable:: CPACK_DEBIAN_PACKAGE_EPOCH
  64. .. versionadded:: 3.10
  65. The Debian package epoch
  66. * Mandatory : No
  67. * Default : -
  68. Optional number that should be incremented when changing versioning schemas
  69. or fixing mistakes in the version numbers of older packages.
  70. .. variable:: CPACK_DEBIAN_PACKAGE_VERSION
  71. The Debian package version
  72. * Mandatory : YES
  73. * Default : :variable:`CPACK_PACKAGE_VERSION`
  74. This variable may contain only alphanumerics (A-Za-z0-9) and the characters
  75. . + - ~ (full stop, plus, hyphen, tilde) and should start with a digit. If
  76. :variable:`CPACK_DEBIAN_PACKAGE_RELEASE` is not set then hyphens are not
  77. allowed.
  78. .. note::
  79. For backward compatibility with CMake 3.9 and lower a failed test of this
  80. variable's content is not a hard error when both
  81. :variable:`CPACK_DEBIAN_PACKAGE_RELEASE` and
  82. :variable:`CPACK_DEBIAN_PACKAGE_EPOCH` variables are not set. An author
  83. warning is reported instead.
  84. .. variable:: CPACK_DEBIAN_PACKAGE_RELEASE
  85. .. versionadded:: 3.6
  86. The Debian package release - Debian revision number.
  87. * Mandatory : No
  88. * Default : -
  89. This is the numbering of the DEB package itself, i.e. the version of the
  90. packaging and not the version of the content (see
  91. :variable:`CPACK_DEBIAN_PACKAGE_VERSION`). One may change the default value
  92. if the previous packaging was buggy and/or you want to put here a fancy Linux
  93. distro specific numbering.
  94. .. variable:: CPACK_DEBIAN_PACKAGE_ARCHITECTURE
  95. CPACK_DEBIAN_<COMPONENT>_PACKAGE_ARCHITECTURE
  96. The Debian package architecture
  97. * Mandatory : YES
  98. * Default : Output of ``dpkg --print-architecture`` (or ``i386``
  99. if ``dpkg`` is not found)
  100. .. versionadded:: 3.6
  101. Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_ARCHITECTURE`` variables.
  102. .. variable:: CPACK_DEBIAN_PACKAGE_DEPENDS
  103. CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS
  104. Sets the Debian dependencies of this package.
  105. * Mandatory : NO
  106. * Default :
  107. - An empty string for non-component based installations
  108. - :variable:`CPACK_DEBIAN_PACKAGE_DEPENDS` for component-based
  109. installations.
  110. .. versionadded:: 3.3
  111. Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS`` variables.
  112. .. note::
  113. If :variable:`CPACK_DEBIAN_PACKAGE_SHLIBDEPS` or
  114. more specifically :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_SHLIBDEPS`
  115. is set for this component, the discovered dependencies will be appended
  116. to :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS` instead of
  117. :variable:`CPACK_DEBIAN_PACKAGE_DEPENDS`. If
  118. :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_DEPENDS` is an empty string,
  119. only the automatically discovered dependencies will be set for this
  120. component.
  121. Example::
  122. set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libc6 (< 2.4)")
  123. .. variable:: CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS
  124. .. versionadded:: 3.6
  125. Sets inter-component dependencies if listed with
  126. :variable:`CPACK_COMPONENT_<compName>_DEPENDS` variables.
  127. * Mandatory : NO
  128. * Default : -
  129. .. variable:: CPACK_DEBIAN_PACKAGE_MAINTAINER
  130. The Debian package maintainer
  131. * Mandatory : YES
  132. * Default : ``CPACK_PACKAGE_CONTACT``
  133. .. variable:: CPACK_DEBIAN_PACKAGE_DESCRIPTION
  134. CPACK_DEBIAN_<COMPONENT>_DESCRIPTION
  135. The Debian package description
  136. * Mandatory : YES
  137. * Default :
  138. - :variable:`CPACK_DEBIAN_<COMPONENT>_DESCRIPTION` (component
  139. based installers only) if set, or :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` if set, or
  140. - :variable:`CPACK_COMPONENT_<compName>_DESCRIPTION` (component
  141. based installers only) if set, or :variable:`CPACK_PACKAGE_DESCRIPTION` if set, or
  142. - content of the file specified in :variable:`CPACK_PACKAGE_DESCRIPTION_FILE` if set
  143. If after that description is not set, :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` going to be
  144. used if set. Otherwise, :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` will be added as the first
  145. line of description as defined in `Debian Policy Manual`_.
  146. .. versionadded:: 3.3
  147. Per-component ``CPACK_COMPONENT_<compName>_DESCRIPTION`` variables.
  148. .. versionadded:: 3.16
  149. Per-component ``CPACK_DEBIAN_<COMPONENT>_DESCRIPTION`` variables.
  150. .. versionadded:: 3.16
  151. The ``CPACK_PACKAGE_DESCRIPTION_FILE`` variable.
  152. .. _Debian Policy Manual: https://www.debian.org/doc/debian-policy/ch-controlfields.html#description
  153. .. variable:: CPACK_DEBIAN_PACKAGE_SECTION
  154. CPACK_DEBIAN_<COMPONENT>_PACKAGE_SECTION
  155. Set Section control field e.g. admin, devel, doc, ...
  156. * Mandatory : YES
  157. * Default : "devel"
  158. .. versionadded:: 3.5
  159. Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_SECTION`` variables.
  160. See https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
  161. .. variable:: CPACK_DEBIAN_ARCHIVE_TYPE
  162. .. versionadded:: 3.7
  163. .. deprecated:: 3.14
  164. The archive format used for creating the Debian package.
  165. * Mandatory : YES
  166. * Default : "gnutar"
  167. Possible value is:
  168. - gnutar
  169. .. note::
  170. This variable previously defaulted to the ``paxr`` value, but ``dpkg``
  171. has never supported that tar format. For backwards compatibility the
  172. ``paxr`` value will be mapped to ``gnutar`` and a deprecation message
  173. will be emitted.
  174. .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE
  175. .. versionadded:: 3.1
  176. The compression used for creating the Debian package.
  177. * Mandatory : YES
  178. * Default : "gzip"
  179. Possible values are:
  180. - lzma
  181. - xz
  182. - bzip2
  183. - gzip
  184. .. variable:: CPACK_DEBIAN_PACKAGE_PRIORITY
  185. CPACK_DEBIAN_<COMPONENT>_PACKAGE_PRIORITY
  186. Set Priority control field e.g. required, important, standard, optional,
  187. extra
  188. * Mandatory : YES
  189. * Default : "optional"
  190. .. versionadded:: 3.5
  191. Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_PRIORITY`` variables.
  192. See https://www.debian.org/doc/debian-policy/ch-archive.html#s-priorities
  193. .. variable:: CPACK_DEBIAN_PACKAGE_HOMEPAGE
  194. The URL of the web site for this package, preferably (when applicable) the
  195. site from which the original source can be obtained and any additional
  196. upstream documentation or information may be found.
  197. * Mandatory : NO
  198. * Default : :variable:`CMAKE_PROJECT_HOMEPAGE_URL`
  199. .. versionadded:: 3.12
  200. The ``CMAKE_PROJECT_HOMEPAGE_URL`` variable.
  201. .. note::
  202. The content of this field is a simple URL without any surrounding
  203. characters such as <>.
  204. .. variable:: CPACK_DEBIAN_PACKAGE_SHLIBDEPS
  205. CPACK_DEBIAN_<COMPONENT>_PACKAGE_SHLIBDEPS
  206. May be set to ON in order to use ``dpkg-shlibdeps`` to generate
  207. better package dependency list.
  208. * Mandatory : NO
  209. * Default :
  210. - :variable:`CPACK_DEBIAN_PACKAGE_SHLIBDEPS` if set or
  211. - OFF
  212. .. note::
  213. You may need set :variable:`CMAKE_INSTALL_RPATH` to an appropriate value
  214. if you use this feature, because if you don't ``dpkg-shlibdeps``
  215. may fail to find your own shared libs.
  216. See https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
  217. .. note::
  218. You can also set :variable:`CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS`
  219. to an appropriate value if you use this feature, in order to please
  220. ``dpkg-shlibdeps``. However, you should only do this for private
  221. shared libraries that could not get resolved otherwise.
  222. .. versionadded:: 3.3
  223. Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_SHLIBDEPS`` variables.
  224. .. versionadded:: 3.6
  225. Correct handling of ``$ORIGIN`` in :variable:`CMAKE_INSTALL_RPATH`.
  226. .. variable:: CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS
  227. .. versionadded:: 3.20
  228. May be set to a list of directories that will be given to ``dpkg-shlibdeps``
  229. via its ``-l`` option. These will be searched by ``dpkg-shlibdeps`` in order
  230. to find private shared library dependencies.
  231. * Mandatory : NO
  232. * Default :
  233. .. note::
  234. You should prefer to set :variable:`CMAKE_INSTALL_RPATH` to an appropriate
  235. value if you use ``dpkg-shlibdeps``. The current option is really only
  236. needed for private shared library dependencies.
  237. .. variable:: CPACK_DEBIAN_PACKAGE_DEBUG
  238. May be set when invoking cpack in order to trace debug information
  239. during the CPack DEB generator run.
  240. * Mandatory : NO
  241. * Default : -
  242. .. variable:: CPACK_DEBIAN_PACKAGE_PREDEPENDS
  243. CPACK_DEBIAN_<COMPONENT>_PACKAGE_PREDEPENDS
  244. Sets the `Pre-Depends` field of the Debian package.
  245. Like :variable:`Depends <CPACK_DEBIAN_PACKAGE_DEPENDS>`, except that it
  246. also forces ``dpkg`` to complete installation of the packages named
  247. before even starting the installation of the package which declares the
  248. pre-dependency.
  249. * Mandatory : NO
  250. * Default :
  251. - An empty string for non-component based installations
  252. - :variable:`CPACK_DEBIAN_PACKAGE_PREDEPENDS` for component-based
  253. installations.
  254. .. versionadded:: 3.4
  255. Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_PREDEPENDS`` variables.
  256. See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
  257. .. variable:: CPACK_DEBIAN_PACKAGE_ENHANCES
  258. CPACK_DEBIAN_<COMPONENT>_PACKAGE_ENHANCES
  259. Sets the `Enhances` field of the Debian package.
  260. Similar to :variable:`Suggests <CPACK_DEBIAN_PACKAGE_SUGGESTS>` but works
  261. in the opposite direction: declares that a package can enhance the
  262. functionality of another package.
  263. * Mandatory : NO
  264. * Default :
  265. - An empty string for non-component based installations
  266. - :variable:`CPACK_DEBIAN_PACKAGE_ENHANCES` for component-based
  267. installations.
  268. .. versionadded:: 3.4
  269. Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_ENHANCES`` variables.
  270. See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
  271. .. variable:: CPACK_DEBIAN_PACKAGE_BREAKS
  272. CPACK_DEBIAN_<COMPONENT>_PACKAGE_BREAKS
  273. Sets the `Breaks` field of the Debian package.
  274. When a binary package (P) declares that it breaks other packages (B),
  275. ``dpkg`` will not allow the package (P) which declares `Breaks` be
  276. **unpacked** unless the packages that will be broken (B) are deconfigured
  277. first.
  278. As long as the package (P) is configured, the previously deconfigured
  279. packages (B) cannot be reconfigured again.
  280. * Mandatory : NO
  281. * Default :
  282. - An empty string for non-component based installations
  283. - :variable:`CPACK_DEBIAN_PACKAGE_BREAKS` for component-based
  284. installations.
  285. .. versionadded:: 3.4
  286. Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_BREAKS`` variables.
  287. See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-breaks
  288. .. variable:: CPACK_DEBIAN_PACKAGE_CONFLICTS
  289. CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONFLICTS
  290. Sets the `Conflicts` field of the Debian package.
  291. When one binary package declares a conflict with another using a `Conflicts`
  292. field, ``dpkg`` will not allow them to be unpacked on the system at
  293. the same time.
  294. * Mandatory : NO
  295. * Default :
  296. - An empty string for non-component based installations
  297. - :variable:`CPACK_DEBIAN_PACKAGE_CONFLICTS` for component-based
  298. installations.
  299. .. versionadded:: 3.4
  300. Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONFLICTS`` variables.
  301. See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-conflicts
  302. .. note::
  303. This is a stronger restriction than
  304. :variable:`Breaks <CPACK_DEBIAN_PACKAGE_BREAKS>`, which prevents the
  305. broken package from being configured while the breaking package is in
  306. the "Unpacked" state but allows both packages to be unpacked at the same
  307. time.
  308. .. variable:: CPACK_DEBIAN_PACKAGE_PROVIDES
  309. CPACK_DEBIAN_<COMPONENT>_PACKAGE_PROVIDES
  310. Sets the `Provides` field of the Debian package.
  311. A virtual package is one which appears in the `Provides` control field of
  312. another package.
  313. * Mandatory : NO
  314. * Default :
  315. - An empty string for non-component based installations
  316. - :variable:`CPACK_DEBIAN_PACKAGE_PROVIDES` for component-based
  317. installations.
  318. .. versionadded:: 3.4
  319. Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_PROVIDES`` variables.
  320. See https://www.debian.org/doc/debian-policy/ch-relationships.html#s-virtual
  321. .. variable:: CPACK_DEBIAN_PACKAGE_REPLACES
  322. CPACK_DEBIAN_<COMPONENT>_PACKAGE_REPLACES
  323. Sets the `Replaces` field of the Debian package.
  324. Packages can declare in their control file that they should overwrite
  325. files in certain other packages, or completely replace other packages.
  326. * Mandatory : NO
  327. * Default :
  328. - An empty string for non-component based installations
  329. - :variable:`CPACK_DEBIAN_PACKAGE_REPLACES` for component-based
  330. installations.
  331. .. versionadded:: 3.4
  332. Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_REPLACES`` variables.
  333. See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
  334. .. variable:: CPACK_DEBIAN_PACKAGE_RECOMMENDS
  335. CPACK_DEBIAN_<COMPONENT>_PACKAGE_RECOMMENDS
  336. Sets the `Recommends` field of the Debian package.
  337. Allows packages to declare a strong, but not absolute, dependency on other
  338. packages.
  339. * Mandatory : NO
  340. * Default :
  341. - An empty string for non-component based installations
  342. - :variable:`CPACK_DEBIAN_PACKAGE_RECOMMENDS` for component-based
  343. installations.
  344. .. versionadded:: 3.4
  345. Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_RECOMMENDS`` variables.
  346. See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
  347. .. variable:: CPACK_DEBIAN_PACKAGE_SUGGESTS
  348. CPACK_DEBIAN_<COMPONENT>_PACKAGE_SUGGESTS
  349. Sets the `Suggests` field of the Debian package.
  350. Allows packages to declare a suggested package install grouping.
  351. * Mandatory : NO
  352. * Default :
  353. - An empty string for non-component based installations
  354. - :variable:`CPACK_DEBIAN_PACKAGE_SUGGESTS` for component-based
  355. installations.
  356. .. versionadded:: 3.4
  357. Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_SUGGESTS`` variables.
  358. See http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
  359. .. variable:: CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS
  360. .. versionadded:: 3.6
  361. * Mandatory : NO
  362. * Default : OFF
  363. Allows to generate shlibs control file automatically. Compatibility is defined by
  364. :variable:`CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY` variable value.
  365. .. note::
  366. Libraries are only considered if they have both library name and version
  367. set. This can be done by setting SOVERSION property with
  368. :command:`set_target_properties` command.
  369. .. variable:: CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY
  370. .. versionadded:: 3.6
  371. Compatibility policy for auto-generated shlibs control file.
  372. * Mandatory : NO
  373. * Default : "="
  374. Defines compatibility policy for auto-generated shlibs control file.
  375. Possible values: "=", ">="
  376. See https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-sharedlibs-shlibdeps
  377. .. variable:: CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
  378. CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONTROL_EXTRA
  379. This variable allow advanced user to add custom script to the
  380. control.tar.gz.
  381. Typical usage is for conffiles, postinst, postrm, prerm.
  382. * Mandatory : NO
  383. * Default : -
  384. Usage::
  385. set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
  386. "${CMAKE_CURRENT_SOURCE_DIR}/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm")
  387. .. versionadded:: 3.4
  388. Per-component ``CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONTROL_EXTRA`` variables.
  389. .. variable:: CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION
  390. CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONTROL_STRICT_PERMISSION
  391. .. versionadded:: 3.4
  392. This variable indicates if the Debian policy on control files should be
  393. strictly followed.
  394. * Mandatory : NO
  395. * Default : FALSE
  396. Usage::
  397. set(CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION TRUE)
  398. This overrides the permissions on the original files, following the rules
  399. set by Debian policy
  400. https://www.debian.org/doc/debian-policy/ch-files.html#s-permissions-owners
  401. .. note::
  402. The original permissions of the files will be used in the final
  403. package unless this variable is set to ``TRUE``.
  404. In particular, the scripts should have the proper executable
  405. flag prior to the generation of the package.
  406. .. variable:: CPACK_DEBIAN_PACKAGE_SOURCE
  407. CPACK_DEBIAN_<COMPONENT>_PACKAGE_SOURCE
  408. .. versionadded:: 3.5
  409. Sets the ``Source`` field of the binary Debian package.
  410. When the binary package name is not the same as the source package name
  411. (in particular when several components/binaries are generated from one
  412. source) the source from which the binary has been generated should be
  413. indicated with the field ``Source``.
  414. * Mandatory : NO
  415. * Default :
  416. - An empty string for non-component based installations
  417. - :variable:`CPACK_DEBIAN_PACKAGE_SOURCE` for component-based
  418. installations.
  419. See https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Source
  420. .. note::
  421. This value is not interpreted. It is possible to pass an optional
  422. revision number of the referenced source package as well.
  423. Packaging of debug information
  424. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  425. .. versionadded:: 3.13
  426. Dbgsym packages contain debug symbols for debugging packaged binaries.
  427. Dbgsym packaging has its own set of variables:
  428. .. variable:: CPACK_DEBIAN_DEBUGINFO_PACKAGE
  429. CPACK_DEBIAN_<component>_DEBUGINFO_PACKAGE
  430. Enable generation of dbgsym .ddeb package(s).
  431. * Mandatory : NO
  432. * Default : OFF
  433. .. note::
  434. Binaries must contain debug symbols before packaging so use either ``Debug``
  435. or ``RelWithDebInfo`` for :variable:`CMAKE_BUILD_TYPE` variable value.
  436. Building Debian packages on Windows
  437. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  438. .. versionadded:: 3.10
  439. To communicate UNIX file permissions from the install stage
  440. to the CPack DEB generator the "cmake_mode_t" NTFS
  441. alternate data stream (ADT) is used.
  442. When a filesystem without ADT support is used only owner read/write
  443. permissions can be preserved.
  444. Reproducible packages
  445. ^^^^^^^^^^^^^^^^^^^^^
  446. .. versionadded:: 3.13
  447. The environment variable ``SOURCE_DATE_EPOCH`` may be set to a UNIX
  448. timestamp, defined as the number of seconds, excluding leap seconds,
  449. since 01 Jan 1970 00:00:00 UTC. If set, the CPack DEB generator will
  450. use its value for timestamps in the package.