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