freebsd.rst 4.9 KB

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