freebsd.rst 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. CPack FreeBSD Generator
  2. -----------------------
  3. .. versionadded:: 3.10
  4. The built in (binary) CPack FreeBSD (pkg) generator (Unix only)
  5. Variables affecting the CPack FreeBSD (pkg) generator
  6. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  7. - .. versionadded:: 3.18
  8. :variable:`CPACK_ARCHIVE_THREADS`
  9. Variables specific to CPack FreeBSD (pkg) generator
  10. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  11. The CPack FreeBSD generator may be used to create pkg(8) packages -- these may
  12. be used on FreeBSD, DragonflyBSD, NetBSD, OpenBSD, but also on Linux or OSX,
  13. depending on the installed package-management tools -- using :module:`CPack`.
  14. The CPack FreeBSD generator is a :module:`CPack` generator and uses the
  15. :variable:`!CPACK_XXX` variables used by :module:`CPack`. It tries to reuse packaging
  16. information that may already be specified for Debian packages for the
  17. :cpack_gen:`CPack DEB Generator`. It also tries to reuse RPM packaging
  18. information when Debian does not specify.
  19. The CPack FreeBSD generator should work on any host with libpkg installed. The
  20. packages it produces are specific to the host architecture and ABI.
  21. The CPack FreeBSD generator sets package-metadata through
  22. :variable:`!CPACK_FREEBSD_XXX` variables. The CPack FreeBSD generator, unlike the
  23. CPack Deb generator, does not specially support componentized packages; a
  24. single package is created from all the software artifacts created through
  25. CMake.
  26. All of the variables can be set specifically for FreeBSD packaging in
  27. the CPackConfig file or in CMakeLists.txt, but most of them have defaults
  28. that use general settings (e.g. :variable:`CMAKE_PROJECT_NAME`) or Debian-specific
  29. variables when those make sense (e.g. the homepage of an upstream project
  30. is usually unchanged by the flavor of packaging). When there is no Debian
  31. information to fall back on, but the RPM packaging has it, fall back to
  32. the RPM information (e.g. package license).
  33. .. variable:: CPACK_FREEBSD_PACKAGE_NAME
  34. Sets the package name (in the package manifest, but also affects the
  35. output filename).
  36. :Mandatory: Yes
  37. :Default:
  38. - :variable:`CPACK_PACKAGE_NAME` (this is always set by CPack itself,
  39. based on CMAKE_PROJECT_NAME).
  40. .. variable:: CPACK_FREEBSD_PACKAGE_COMMENT
  41. Sets the package comment. This is the short description displayed by
  42. pkg(8) in standard "pkg info" output.
  43. :Mandatory: Yes
  44. :Default:
  45. - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` (this is always set
  46. by CPack itself, if nothing else sets it explicitly).
  47. .. variable:: CPACK_FREEBSD_PACKAGE_DESCRIPTION
  48. Sets the package description. This is the long description of the package,
  49. given by "pkg info" with a specific package as argument.
  50. :Mandatory: Yes
  51. :Default:
  52. - :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` (this may be set already
  53. for Debian packaging, so it is used as a fallback).
  54. - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` (this is always set
  55. by CPack itself, if nothing else sets it explicitly).
  56. - :variable:`PROJECT_DESCRIPTION` (this can be set with the ``DESCRIPTION``
  57. parameter for :command:`project`).
  58. .. variable:: CPACK_FREEBSD_PACKAGE_WWW
  59. The URL of the web site for this package, preferably (when applicable) the
  60. site from which the original source can be obtained and any additional
  61. upstream documentation or information may be found.
  62. :Mandatory: Yes
  63. :Default:
  64. - :variable:`CPACK_PACKAGE_HOMEPAGE_URL`, or if that is not set,
  65. - :variable:`CPACK_DEBIAN_PACKAGE_HOMEPAGE` (this may be set already
  66. for Debian packaging, so it is used as a fallback).
  67. .. versionadded:: 3.12
  68. The :variable:`!CPACK_PACKAGE_HOMEPAGE_URL` variable.
  69. .. variable:: CPACK_FREEBSD_PACKAGE_LICENSE
  70. The license, or licenses, which apply to this software package. This must
  71. be one or more license-identifiers that pkg recognizes as acceptable license
  72. identifiers (e.g. "GPLv2").
  73. :Mandatory: Yes
  74. :Default:
  75. - :variable:`CPACK_RPM_PACKAGE_LICENSE`
  76. .. variable:: CPACK_FREEBSD_PACKAGE_LICENSE_LOGIC
  77. This variable is only of importance if there is more than one license.
  78. The default is "single", which is only applicable to a single license.
  79. Other acceptable values are determined by pkg -- those are "dual" or "multi" --
  80. meaning choice (OR) or simultaneous (AND) application of the licenses.
  81. :Mandatory: No
  82. :Default: single
  83. .. variable:: CPACK_FREEBSD_PACKAGE_MAINTAINER
  84. The FreeBSD maintainer (e.g. ``[email protected]``) of this package.
  85. :Mandatory: Yes
  86. :Default: none
  87. .. variable:: CPACK_FREEBSD_PACKAGE_ORIGIN
  88. The origin (ports label) of this package; for packages built by CPack
  89. outside of the ports system this is of less importance. The default
  90. puts the package somewhere under ``misc/``, as a stopgap.
  91. :Mandatory: Yes
  92. :Default: ``misc/<package name>``
  93. .. variable:: CPACK_FREEBSD_PACKAGE_CATEGORIES
  94. The ports categories where this package lives (if it were to be built
  95. from ports). If none is set a single category is determined based on
  96. the package origin.
  97. :Mandatory: Yes
  98. :Default: derived from ``ORIGIN``
  99. .. variable:: CPACK_FREEBSD_PACKAGE_DEPS
  100. A list of package origins that should be added as package dependencies.
  101. These are in the form ``<category>/<packagename>``, e.g. ``x11/libkonq``.
  102. No version information needs to be provided (this is not included
  103. in the manifest).
  104. :Mandatory: No
  105. :Default: empty