blob: 10561c574fa3d9ac1f79023f0a53b6d84f9cd1fb [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CPackRPM &mdash; CMake 3.8.2 Documentation</title>
<link rel="stylesheet" href="../_static/cmake.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '3.8.2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="CPack" href="CPack.html" />
<link rel="prev" title="CPackProductBuild" href="CPackProductBuild.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="CPack.html" title="CPack"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="CPackProductBuild.html" title="CPackProductBuild"
accesskey="P">previous</a> |</li>
<li>
<img src="../_static/cmake-logo-16.png" alt=""
style="vertical-align: middle; margin-top: -2px" />
</li>
<li>
<a href="https://cmake.org/">CMake</a> &#187;
</li>
<li>
<a href="../index.html">3.8.2 Documentation</a> &#187;
</li>
<li class="nav-item nav-item-1"><a href="../manual/cmake-modules.7.html" accesskey="U">cmake-modules(7)</a> &#187;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="cpackrpm">
<span id="module:CPackRPM"></span><h1>CPackRPM<a class="headerlink" href="#cpackrpm" title="Permalink to this headline"></a></h1>
<p>The built in (binary) CPack RPM generator (Unix only)</p>
<div class="section" id="variables-specific-to-cpack-rpm-generator">
<h2>Variables specific to CPack RPM generator<a class="headerlink" href="#variables-specific-to-cpack-rpm-generator" title="Permalink to this headline"></a></h2>
<p>CPackRPM may be used to create RPM packages using <span class="target" id="index-0-module:CPack"></span><a class="reference internal" href="CPack.html#module:CPack" title="CPack"><code class="xref cmake cmake-module docutils literal"><span class="pre">CPack</span></code></a>.
CPackRPM is a <span class="target" id="index-1-module:CPack"></span><a class="reference internal" href="CPack.html#module:CPack" title="CPack"><code class="xref cmake cmake-module docutils literal"><span class="pre">CPack</span></code></a> generator thus it uses the <code class="docutils literal"><span class="pre">CPACK_XXX</span></code>
variables used by <span class="target" id="index-2-module:CPack"></span><a class="reference internal" href="CPack.html#module:CPack" title="CPack"><code class="xref cmake cmake-module docutils literal"><span class="pre">CPack</span></code></a>.</p>
<p>CPackRPM has specific features which are controlled by the specifics
<code class="code docutils literal"><span class="pre">CPACK_RPM_XXX</span></code> variables.</p>
<p><code class="code docutils literal"><span class="pre">CPACK_RPM_&lt;COMPONENT&gt;_XXXX</span></code> variables may be used in order to have
<strong>component</strong> specific values. Note however that <code class="docutils literal"><span class="pre">&lt;COMPONENT&gt;</span></code> refers to the
<strong>grouping name</strong> written in upper case. It may be either a component name or
a component GROUP name. Usually those variables correspond to RPM spec file
entities. One may find information about spec files here
<a class="reference external" href="http://www.rpm.org/wiki/Docs">http://www.rpm.org/wiki/Docs</a></p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><cite>&lt;COMPONENT&gt;</cite> part of variables is preferred to be in upper case (for e.g. if
component is named <cite>foo</cite> then use <cite>CPACK_RPM_FOO_XXXX</cite> variable name format)
as is with other <cite>CPACK_&lt;COMPONENT&gt;_XXXX</cite> variables.
For the purposes of back compatibility (CMake/CPack version 3.5 and lower)
support for same cased component (e.g. <cite>fOo</cite> would be used as
<cite>CPACK_RPM_fOo_XXXX</cite>) is still supported for variables defined in older
versions of CMake/CPack but is not guaranteed for variables that
will be added in the future. For the sake of back compatibility same cased
component variables also override upper cased versions where both are
present.</p>
</div>
<p>Here are some CPackRPM wiki resources that are here for historic reasons and
are no longer maintained but may still prove useful:</p>
<blockquote>
<div><ul class="simple">
<li><a class="reference external" href="https://cmake.org/Wiki/CMake:CPackConfiguration">https://cmake.org/Wiki/CMake:CPackConfiguration</a></li>
<li><a class="reference external" href="https://cmake.org/Wiki/CMake:CPackPackageGenerators#RPM_.28Unix_Only.29">https://cmake.org/Wiki/CMake:CPackPackageGenerators#RPM_.28Unix_Only.29</a></li>
</ul>
</div></blockquote>
<p>List of CPackRPM specific variables:</p>
<dl class="variable">
<dt id="variable:CPACK_RPM_COMPONENT_INSTALL">
<code class="descname">CPACK_RPM_COMPONENT_INSTALL</code><a class="headerlink" href="#variable:CPACK_RPM_COMPONENT_INSTALL" title="Permalink to this definition"></a></dt>
<dd><p>Enable component packaging for CPackRPM</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : OFF</li>
</ul>
<p>If enabled (ON) multiple packages are generated. By default a single package
containing files of all components is generated.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_SUMMARY">
<code class="descname">CPACK_RPM_PACKAGE_SUMMARY</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_SUMMARY" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_SUMMARY">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_SUMMARY</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_SUMMARY" title="Permalink to this definition">¶</a></dt>
<dd><p>The RPM package summary.</p>
<ul class="simple">
<li>Mandatory : YES</li>
<li>Default : <span class="target" id="index-0-variable:CPACK_PACKAGE_DESCRIPTION_SUMMARY"></span><a class="reference internal" href="CPack.html#variable:CPACK_PACKAGE_DESCRIPTION_SUMMARY" title="CPACK_PACKAGE_DESCRIPTION_SUMMARY"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_PACKAGE_DESCRIPTION_SUMMARY</span></code></a></li>
</ul>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_NAME">
<code class="descname">CPACK_RPM_PACKAGE_NAME</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_NAME" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_NAME">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_NAME</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_NAME" title="Permalink to this definition">¶</a></dt>
<dd><p>The RPM package name.</p>
<ul class="simple">
<li>Mandatory : YES</li>
<li>Default : <span class="target" id="index-0-variable:CPACK_PACKAGE_NAME"></span><a class="reference internal" href="CPack.html#variable:CPACK_PACKAGE_NAME" title="CPACK_PACKAGE_NAME"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_PACKAGE_NAME</span></code></a></li>
</ul>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_FILE_NAME">
<code class="descname">CPACK_RPM_FILE_NAME</code><a class="headerlink" href="#variable:CPACK_RPM_FILE_NAME" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_FILE_NAME">
<code class="descname">CPACK_RPM_&lt;component&gt;_FILE_NAME</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_FILE_NAME" title="Permalink to this definition">¶</a></dt>
<dd><p>Package file name.</p>
<ul>
<li><p class="first">Mandatory : YES</p>
</li>
<li><dl class="first docutils">
<dt>Default <span class="classifier-delimiter">:</span> <span class="classifier"><code class="docutils literal"><span class="pre">&lt;CPACK_PACKAGE_FILE_NAME&gt;[-&lt;component&gt;].rpm</span></code> with spaces</span></dt>
<dd><p class="first last">replaced by &#8216;-&#8216;</p>
</dd>
</dl>
</li>
</ul>
<p>This may be set to <code class="docutils literal"><span class="pre">RPM-DEFAULT</span></code> to allow rpmbuild tool to generate package
file name by itself.
Alternatively provided package file name must end with <code class="docutils literal"><span class="pre">.rpm</span></code> suffix.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">By using user provided spec file, rpm macro extensions such as for
generating debuginfo packages or by simply using multiple components more
than one rpm file may be generated, either from a single spec file or from
multiple spec files (each component execution produces it&#8217;s own spec file).
In such cases duplicate file names may occur as a result of this variable
setting or spec file content structure. Duplicate files get overwritten
and it is up to the packager to set the variables in a manner that will
prevent such errors.</p>
</div>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_MAIN_COMPONENT">
<code class="descname">CPACK_RPM_MAIN_COMPONENT</code><a class="headerlink" href="#variable:CPACK_RPM_MAIN_COMPONENT" title="Permalink to this definition"></a></dt>
<dd><p>Main component that is packaged without component suffix.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>This variable can be set to any component or group name so that component or
group rpm package is generated without component suffix in filename and
package name.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_VERSION">
<code class="descname">CPACK_RPM_PACKAGE_VERSION</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_VERSION" title="Permalink to this definition"></a></dt>
<dd><p>The RPM package version.</p>
<ul class="simple">
<li>Mandatory : YES</li>
<li>Default : <span class="target" id="index-0-variable:CPACK_PACKAGE_VERSION"></span><a class="reference internal" href="CPack.html#variable:CPACK_PACKAGE_VERSION" title="CPACK_PACKAGE_VERSION"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_PACKAGE_VERSION</span></code></a></li>
</ul>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_ARCHITECTURE">
<code class="descname">CPACK_RPM_PACKAGE_ARCHITECTURE</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_ARCHITECTURE" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_ARCHITECTURE">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_ARCHITECTURE</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_ARCHITECTURE" title="Permalink to this definition">¶</a></dt>
<dd><p>The RPM package architecture.</p>
<ul class="simple">
<li>Mandatory : YES</li>
<li>Default : Native architecture output by <code class="docutils literal"><span class="pre">uname</span> <span class="pre">-m</span></code></li>
</ul>
<p>This may be set to <code class="docutils literal"><span class="pre">noarch</span></code> if you know you are building a noarch package.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_RELEASE">
<code class="descname">CPACK_RPM_PACKAGE_RELEASE</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_RELEASE" title="Permalink to this definition"></a></dt>
<dd><p>The RPM package release.</p>
<ul class="simple">
<li>Mandatory : YES</li>
<li>Default : 1</li>
</ul>
<p>This is the numbering of the RPM package itself, i.e. the version of the
packaging and not the version of the content (see
<span class="target" id="index-0-variable:CPACK_RPM_PACKAGE_VERSION"></span><a class="reference internal" href="#variable:CPACK_RPM_PACKAGE_VERSION" title="CPACK_RPM_PACKAGE_VERSION"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_PACKAGE_VERSION</span></code></a>). One may change the default value if
the previous packaging was buggy and/or you want to put here a fancy Linux
distro specific numbering.</p>
</dd></dl>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This is the string that goes into the RPM <code class="docutils literal"><span class="pre">Release:</span></code> field. Some distros
(e.g. Fedora, CentOS) require <code class="docutils literal"><span class="pre">1%{?dist}</span></code> format and not just a number.
<code class="docutils literal"><span class="pre">%{?dist}</span></code> part can be added by setting <span class="target" id="index-0-variable:CPACK_RPM_PACKAGE_RELEASE_DIST"></span><a class="reference internal" href="#variable:CPACK_RPM_PACKAGE_RELEASE_DIST" title="CPACK_RPM_PACKAGE_RELEASE_DIST"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_PACKAGE_RELEASE_DIST</span></code></a>.</p>
</div>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_RELEASE_DIST">
<code class="descname">CPACK_RPM_PACKAGE_RELEASE_DIST</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_RELEASE_DIST" title="Permalink to this definition"></a></dt>
<dd><p>The dist tag that is added RPM <code class="docutils literal"><span class="pre">Release:</span></code> field.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : OFF</li>
</ul>
<p>This is the reported <code class="docutils literal"><span class="pre">%{dist}</span></code> tag from the current distribution or empty
<code class="docutils literal"><span class="pre">%{dist}</span></code> if RPM macro is not set. If this variable is set then RPM
<code class="docutils literal"><span class="pre">Release:</span></code> field value is set to <code class="docutils literal"><span class="pre">${CPACK_RPM_PACKAGE_RELEASE}%{?dist}</span></code>.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_LICENSE">
<code class="descname">CPACK_RPM_PACKAGE_LICENSE</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_LICENSE" title="Permalink to this definition"></a></dt>
<dd><p>The RPM package license policy.</p>
<ul class="simple">
<li>Mandatory : YES</li>
<li>Default : &#8220;unknown&#8221;</li>
</ul>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_GROUP">
<code class="descname">CPACK_RPM_PACKAGE_GROUP</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_GROUP" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_GROUP">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_GROUP</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_GROUP" title="Permalink to this definition">¶</a></dt>
<dd><p>The RPM package group.</p>
<ul class="simple">
<li>Mandatory : YES</li>
<li>Default : &#8220;unknown&#8221;</li>
</ul>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_VENDOR">
<code class="descname">CPACK_RPM_PACKAGE_VENDOR</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_VENDOR" title="Permalink to this definition"></a></dt>
<dd><p>The RPM package vendor.</p>
<ul class="simple">
<li>Mandatory : YES</li>
<li>Default : CPACK_PACKAGE_VENDOR if set or &#8220;unknown&#8221;</li>
</ul>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_URL">
<code class="descname">CPACK_RPM_PACKAGE_URL</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_URL" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_URL">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_URL</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_URL" title="Permalink to this definition">¶</a></dt>
<dd><p>The projects URL.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_DESCRIPTION">
<code class="descname">CPACK_RPM_PACKAGE_DESCRIPTION</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_DESCRIPTION" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_DESCRIPTION">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_DESCRIPTION</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_DESCRIPTION" title="Permalink to this definition">¶</a></dt>
<dd><p>RPM package description.</p>
<ul class="simple">
<li>Mandatory : YES</li>
<li>Default : <span class="target" id="index-0-variable:CPACK_COMPONENT_&lt;compName&gt;_DESCRIPTION"></span><a class="reference internal" href="CPackComponent.html#variable:CPACK_COMPONENT_&lt;compName&gt;_DESCRIPTION" title="CPACK_COMPONENT_&lt;compName&gt;_DESCRIPTION"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_COMPONENT_&lt;compName&gt;_DESCRIPTION</span></code></a> (component
based installers only) if set, <span class="target" id="index-0-variable:CPACK_PACKAGE_DESCRIPTION_FILE"></span><a class="reference internal" href="CPack.html#variable:CPACK_PACKAGE_DESCRIPTION_FILE" title="CPACK_PACKAGE_DESCRIPTION_FILE"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_PACKAGE_DESCRIPTION_FILE</span></code></a>
if set or &#8220;no package description available&#8221;</li>
</ul>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_COMPRESSION_TYPE">
<code class="descname">CPACK_RPM_COMPRESSION_TYPE</code><a class="headerlink" href="#variable:CPACK_RPM_COMPRESSION_TYPE" title="Permalink to this definition"></a></dt>
<dd><p>RPM compression type.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to override RPM compression type to be used to build the
RPM. For example some Linux distribution now default to lzma or xz
compression whereas older cannot use such RPM. Using this one can enforce
compression type to be used.</p>
<p>Possible values are:</p>
<ul class="simple">
<li>lzma</li>
<li>xz</li>
<li>bzip2</li>
<li>gzip</li>
</ul>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_AUTOREQ">
<code class="descname">CPACK_RPM_PACKAGE_AUTOREQ</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_AUTOREQ" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_AUTOREQ">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_AUTOREQ</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_AUTOREQ" title="Permalink to this definition">¶</a></dt>
<dd><p>RPM spec autoreq field.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to enable (1, yes) or disable (0, no) automatic shared libraries
dependency detection. Dependencies are added to requires list.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">By default automatic dependency detection is enabled by rpm generator.</p>
</div>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_AUTOPROV">
<code class="descname">CPACK_RPM_PACKAGE_AUTOPROV</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_AUTOPROV" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_AUTOPROV">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_AUTOPROV</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_AUTOPROV" title="Permalink to this definition">¶</a></dt>
<dd><p>RPM spec autoprov field.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to enable (1, yes) or disable (0, no) automatic listing of shared
libraries that are provided by the package. Shared libraries are added to
provides list.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">By default automatic provides detection is enabled by rpm generator.</p>
</div>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_AUTOREQPROV">
<code class="descname">CPACK_RPM_PACKAGE_AUTOREQPROV</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_AUTOREQPROV" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_AUTOREQPROV">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_AUTOREQPROV</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_AUTOREQPROV" title="Permalink to this definition">¶</a></dt>
<dd><p>RPM spec autoreqprov field.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>Variable enables/disables autoreq and autoprov at the same time.
See <span class="target" id="index-0-variable:CPACK_RPM_PACKAGE_AUTOREQ"></span><a class="reference internal" href="#variable:CPACK_RPM_PACKAGE_AUTOREQ" title="CPACK_RPM_PACKAGE_AUTOREQ"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_PACKAGE_AUTOREQ</span></code></a> and <span class="target" id="index-0-variable:CPACK_RPM_PACKAGE_AUTOPROV"></span><a class="reference internal" href="#variable:CPACK_RPM_PACKAGE_AUTOPROV" title="CPACK_RPM_PACKAGE_AUTOPROV"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_PACKAGE_AUTOPROV</span></code></a>
for more details.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">By default automatic detection feature is enabled by rpm.</p>
</div>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_REQUIRES">
<code class="descname">CPACK_RPM_PACKAGE_REQUIRES</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_REQUIRES" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_REQUIRES">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_REQUIRES</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_REQUIRES" title="Permalink to this definition">¶</a></dt>
<dd><p>RPM spec requires field.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to set RPM dependencies (requires). Note that you must enclose
the complete requires string between quotes, for example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="nb">set</span><span class="p">(</span><span class="n">CPACK_RPM_PACKAGE_REQUIRES</span> <span class="s2">&quot;python &gt;= 2.5.0, cmake &gt;= 2.8&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>The required package list of an RPM file could be printed with:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">rpm</span> <span class="o">-</span><span class="n">qp</span> <span class="o">--</span><span class="n">requires</span> <span class="n">file</span><span class="o">.</span><span class="n">rpm</span>
</pre></div>
</div>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_CONFLICTS">
<code class="descname">CPACK_RPM_PACKAGE_CONFLICTS</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_CONFLICTS" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_CONFLICTS">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_CONFLICTS</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_CONFLICTS" title="Permalink to this definition">¶</a></dt>
<dd><p>RPM spec conflicts field.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to set negative RPM dependencies (conflicts). Note that you must
enclose the complete requires string between quotes, for example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="nb">set</span><span class="p">(</span><span class="n">CPACK_RPM_PACKAGE_CONFLICTS</span> <span class="s2">&quot;libxml2&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>The conflicting package list of an RPM file could be printed with:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">rpm</span> <span class="o">-</span><span class="n">qp</span> <span class="o">--</span><span class="n">conflicts</span> <span class="n">file</span><span class="o">.</span><span class="n">rpm</span>
</pre></div>
</div>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_REQUIRES_PRE">
<code class="descname">CPACK_RPM_PACKAGE_REQUIRES_PRE</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_REQUIRES_PRE" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_REQUIRES_PRE">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_REQUIRES_PRE</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_REQUIRES_PRE" title="Permalink to this definition">¶</a></dt>
<dd><p>RPM spec requires(pre) field.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to set RPM preinstall dependencies (requires(pre)). Note that
you must enclose the complete requires string between quotes, for example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="nb">set</span><span class="p">(</span><span class="n">CPACK_RPM_PACKAGE_REQUIRES_PRE</span> <span class="s2">&quot;shadow-utils, initscripts&quot;</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_REQUIRES_POST">
<code class="descname">CPACK_RPM_PACKAGE_REQUIRES_POST</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_REQUIRES_POST" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_REQUIRES_POST">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_REQUIRES_POST</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_REQUIRES_POST" title="Permalink to this definition">¶</a></dt>
<dd><p>RPM spec requires(post) field.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to set RPM postinstall dependencies (requires(post)). Note that
you must enclose the complete requires string between quotes, for example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="nb">set</span><span class="p">(</span><span class="n">CPACK_RPM_PACKAGE_REQUIRES_POST</span> <span class="s2">&quot;shadow-utils, initscripts&quot;</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_REQUIRES_POSTUN">
<code class="descname">CPACK_RPM_PACKAGE_REQUIRES_POSTUN</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_REQUIRES_POSTUN" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_REQUIRES_POSTUN">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_REQUIRES_POSTUN</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_REQUIRES_POSTUN" title="Permalink to this definition">¶</a></dt>
<dd><p>RPM spec requires(postun) field.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to set RPM postuninstall dependencies (requires(postun)). Note
that you must enclose the complete requires string between quotes, for
example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="nb">set</span><span class="p">(</span><span class="n">CPACK_RPM_PACKAGE_REQUIRES_POSTUN</span> <span class="s2">&quot;shadow-utils, initscripts&quot;</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_REQUIRES_PREUN">
<code class="descname">CPACK_RPM_PACKAGE_REQUIRES_PREUN</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_REQUIRES_PREUN" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_REQUIRES_PREUN">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_REQUIRES_PREUN</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_REQUIRES_PREUN" title="Permalink to this definition">¶</a></dt>
<dd><p>RPM spec requires(preun) field.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to set RPM preuninstall dependencies (requires(preun)). Note that
you must enclose the complete requires string between quotes, for example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="nb">set</span><span class="p">(</span><span class="n">CPACK_RPM_PACKAGE_REQUIRES_PREUN</span> <span class="s2">&quot;shadow-utils, initscripts&quot;</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_SUGGESTS">
<code class="descname">CPACK_RPM_PACKAGE_SUGGESTS</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_SUGGESTS" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_SUGGESTS">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_SUGGESTS</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_SUGGESTS" title="Permalink to this definition">¶</a></dt>
<dd><p>RPM spec suggest field.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to set weak RPM dependencies (suggests). Note that you must
enclose the complete requires string between quotes.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_PROVIDES">
<code class="descname">CPACK_RPM_PACKAGE_PROVIDES</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_PROVIDES" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_PROVIDES">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_PROVIDES</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_PROVIDES" title="Permalink to this definition">¶</a></dt>
<dd><p>RPM spec provides field.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to set RPM dependencies (provides). The provided package list
of an RPM file could be printed with:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">rpm</span> <span class="o">-</span><span class="n">qp</span> <span class="o">--</span><span class="n">provides</span> <span class="n">file</span><span class="o">.</span><span class="n">rpm</span>
</pre></div>
</div>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_OBSOLETES">
<code class="descname">CPACK_RPM_PACKAGE_OBSOLETES</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_OBSOLETES" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_PACKAGE_OBSOLETES">
<code class="descname">CPACK_RPM_&lt;component&gt;_PACKAGE_OBSOLETES</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_PACKAGE_OBSOLETES" title="Permalink to this definition">¶</a></dt>
<dd><p>RPM spec obsoletes field.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to set RPM packages that are obsoleted by this one.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_RELOCATABLE">
<code class="descname">CPACK_RPM_PACKAGE_RELOCATABLE</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_RELOCATABLE" title="Permalink to this definition"></a></dt>
<dd><p>build a relocatable RPM.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : CPACK_PACKAGE_RELOCATABLE</li>
</ul>
<p>If this variable is set to TRUE or ON CPackRPM will try
to build a relocatable RPM package. A relocatable RPM may
be installed using:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">rpm</span> <span class="o">--</span><span class="n">prefix</span> <span class="ow">or</span> <span class="o">--</span><span class="n">relocate</span>
</pre></div>
</div>
<p>in order to install it at an alternate place see rpm(8). Note that
currently this may fail if <span class="target" id="index-0-variable:CPACK_SET_DESTDIR"></span><a class="reference internal" href="../variable/CPACK_SET_DESTDIR.html#variable:CPACK_SET_DESTDIR" title="CPACK_SET_DESTDIR"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_SET_DESTDIR</span></code></a> is set to <code class="docutils literal"><span class="pre">ON</span></code>. If
<span class="target" id="index-1-variable:CPACK_SET_DESTDIR"></span><a class="reference internal" href="../variable/CPACK_SET_DESTDIR.html#variable:CPACK_SET_DESTDIR" title="CPACK_SET_DESTDIR"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_SET_DESTDIR</span></code></a> is set then you will get a warning message but
if there is file installed with absolute path you&#8217;ll get unexpected behavior.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_SPEC_INSTALL_POST">
<code class="descname">CPACK_RPM_SPEC_INSTALL_POST</code><a class="headerlink" href="#variable:CPACK_RPM_SPEC_INSTALL_POST" title="Permalink to this definition"></a></dt>
<dd><p>Deprecated - use <span class="target" id="index-0-variable:CPACK_RPM_POST_INSTALL_SCRIPT_FILE"></span><a class="reference internal" href="#variable:CPACK_RPM_POST_INSTALL_SCRIPT_FILE" title="CPACK_RPM_POST_INSTALL_SCRIPT_FILE"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_POST_INSTALL_SCRIPT_FILE</span></code></a> instead.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
<li>Deprecated: YES</li>
</ul>
<p>This way of specifying post-install script is deprecated, use
<span class="target" id="index-1-variable:CPACK_RPM_POST_INSTALL_SCRIPT_FILE"></span><a class="reference internal" href="#variable:CPACK_RPM_POST_INSTALL_SCRIPT_FILE" title="CPACK_RPM_POST_INSTALL_SCRIPT_FILE"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_POST_INSTALL_SCRIPT_FILE</span></code></a>.
May be used to set an RPM post-install command inside the spec file.
For example setting it to <code class="docutils literal"><span class="pre">/bin/true</span></code> may be used to prevent
rpmbuild to strip binaries.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_SPEC_MORE_DEFINE">
<code class="descname">CPACK_RPM_SPEC_MORE_DEFINE</code><a class="headerlink" href="#variable:CPACK_RPM_SPEC_MORE_DEFINE" title="Permalink to this definition"></a></dt>
<dd><p>RPM extended spec definitions lines.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to add any <code class="docutils literal"><span class="pre">%define</span></code> lines to the generated spec file.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_DEBUG">
<code class="descname">CPACK_RPM_PACKAGE_DEBUG</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_DEBUG" title="Permalink to this definition"></a></dt>
<dd><p>Toggle CPackRPM debug output.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be set when invoking cpack in order to trace debug information
during CPack RPM run. For example you may launch CPack like this:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">cpack</span> <span class="o">-</span><span class="n">D</span> <span class="n">CPACK_RPM_PACKAGE_DEBUG</span><span class="o">=</span><span class="mi">1</span> <span class="o">-</span><span class="n">G</span> <span class="n">RPM</span>
</pre></div>
</div>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_USER_BINARY_SPECFILE">
<code class="descname">CPACK_RPM_USER_BINARY_SPECFILE</code><a class="headerlink" href="#variable:CPACK_RPM_USER_BINARY_SPECFILE" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;componentName&gt;_USER_BINARY_SPECFILE">
<code class="descname">CPACK_RPM_&lt;componentName&gt;_USER_BINARY_SPECFILE</code><a class="headerlink" href="#variable:CPACK_RPM_<componentName>_USER_BINARY_SPECFILE" title="Permalink to this definition">¶</a></dt>
<dd><p>A user provided spec file.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be set by the user in order to specify a USER binary spec file
to be used by CPackRPM instead of generating the file.
The specified file will be processed by configure_file( &#64;ONLY).</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE">
<code class="descname">CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE</code><a class="headerlink" href="#variable:CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE" title="Permalink to this definition"></a></dt>
<dd><p>Spec file template.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>If set CPack will generate a template for USER specified binary
spec file and stop with an error. For example launch CPack like this:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">cpack</span> <span class="o">-</span><span class="n">D</span> <span class="n">CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE</span><span class="o">=</span><span class="mi">1</span> <span class="o">-</span><span class="n">G</span> <span class="n">RPM</span>
</pre></div>
</div>
<p>The user may then use this file in order to hand-craft is own
binary spec file which may be used with
<span class="target" id="index-0-variable:CPACK_RPM_USER_BINARY_SPECFILE"></span><a class="reference internal" href="#variable:CPACK_RPM_USER_BINARY_SPECFILE" title="CPACK_RPM_USER_BINARY_SPECFILE"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_USER_BINARY_SPECFILE</span></code></a>.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_PRE_INSTALL_SCRIPT_FILE">
<code class="descname">CPACK_RPM_PRE_INSTALL_SCRIPT_FILE</code><a class="headerlink" href="#variable:CPACK_RPM_PRE_INSTALL_SCRIPT_FILE" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE">
<code class="descname">CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE</code><a class="headerlink" href="#variable:CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE" title="Permalink to this definition"></a></dt>
<dd><p>Path to file containing pre (un)install script.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to embed a pre (un)installation script in the spec file.
The referred script file (or both) will be read and directly
put after the <code class="docutils literal"><span class="pre">%pre</span></code> or <code class="docutils literal"><span class="pre">%preun</span></code> section
If <span class="target" id="index-0-variable:CPACK_RPM_COMPONENT_INSTALL"></span><a class="reference internal" href="#variable:CPACK_RPM_COMPONENT_INSTALL" title="CPACK_RPM_COMPONENT_INSTALL"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_COMPONENT_INSTALL</span></code></a> is set to ON the (un)install
script for each component can be overridden with
<code class="docutils literal"><span class="pre">CPACK_RPM_&lt;COMPONENT&gt;_PRE_INSTALL_SCRIPT_FILE</span></code> and
<code class="docutils literal"><span class="pre">CPACK_RPM_&lt;COMPONENT&gt;_PRE_UNINSTALL_SCRIPT_FILE</span></code>.
One may verify which scriptlet has been included with:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">rpm</span> <span class="o">-</span><span class="n">qp</span> <span class="o">--</span><span class="n">scripts</span> <span class="n">package</span><span class="o">.</span><span class="n">rpm</span>
</pre></div>
</div>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_POST_INSTALL_SCRIPT_FILE">
<code class="descname">CPACK_RPM_POST_INSTALL_SCRIPT_FILE</code><a class="headerlink" href="#variable:CPACK_RPM_POST_INSTALL_SCRIPT_FILE" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE">
<code class="descname">CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE</code><a class="headerlink" href="#variable:CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE" title="Permalink to this definition"></a></dt>
<dd><p>Path to file containing post (un)install script.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to embed a post (un)installation script in the spec file.
The referred script file (or both) will be read and directly
put after the <code class="docutils literal"><span class="pre">%post</span></code> or <code class="docutils literal"><span class="pre">%postun</span></code> section.
If <span class="target" id="index-1-variable:CPACK_RPM_COMPONENT_INSTALL"></span><a class="reference internal" href="#variable:CPACK_RPM_COMPONENT_INSTALL" title="CPACK_RPM_COMPONENT_INSTALL"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_COMPONENT_INSTALL</span></code></a> is set to ON the (un)install
script for each component can be overridden with
<code class="docutils literal"><span class="pre">CPACK_RPM_&lt;COMPONENT&gt;_POST_INSTALL_SCRIPT_FILE</span></code> and
<code class="docutils literal"><span class="pre">CPACK_RPM_&lt;COMPONENT&gt;_POST_UNINSTALL_SCRIPT_FILE</span></code>.
One may verify which scriptlet has been included with:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">rpm</span> <span class="o">-</span><span class="n">qp</span> <span class="o">--</span><span class="n">scripts</span> <span class="n">package</span><span class="o">.</span><span class="n">rpm</span>
</pre></div>
</div>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_USER_FILELIST">
<code class="descname">CPACK_RPM_USER_FILELIST</code><a class="headerlink" href="#variable:CPACK_RPM_USER_FILELIST" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;COMPONENT&gt;_USER_FILELIST">
<code class="descname">CPACK_RPM_&lt;COMPONENT&gt;_USER_FILELIST</code><a class="headerlink" href="#variable:CPACK_RPM_<COMPONENT>_USER_FILELIST" title="Permalink to this definition">¶</a></dt>
<dd><ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to explicitly specify <code class="docutils literal"><span class="pre">%(&lt;directive&gt;)</span></code> file line
in the spec file. Like <code class="docutils literal"><span class="pre">%config(noreplace)</span></code> or any other directive
that be found in the <code class="docutils literal"><span class="pre">%files</span></code> section. You can have multiple directives
per line, as in <code class="docutils literal"><span class="pre">%attr(600,root,root)</span> <span class="pre">%config(noreplace)</span></code>. Since
CPackRPM is generating the list of files (and directories) the user
specified files of the <code class="docutils literal"><span class="pre">CPACK_RPM_&lt;COMPONENT&gt;_USER_FILELIST</span></code> list will
be removed from the generated list. If referring to directories do
not add a trailing slash.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_CHANGELOG_FILE">
<code class="descname">CPACK_RPM_CHANGELOG_FILE</code><a class="headerlink" href="#variable:CPACK_RPM_CHANGELOG_FILE" title="Permalink to this definition"></a></dt>
<dd><p>RPM changelog file.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to embed a changelog in the spec file.
The referred file will be read and directly put after the <code class="docutils literal"><span class="pre">%changelog</span></code>
section.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST">
<code class="descname">CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST</code><a class="headerlink" href="#variable:CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST" title="Permalink to this definition"></a></dt>
<dd><p>list of path to be excluded.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : /etc /etc/init.d /usr /usr/share /usr/share/doc /usr/bin /usr/lib /usr/lib64 /usr/include</li>
</ul>
<p>May be used to exclude path (directories or files) from the auto-generated
list of paths discovered by CPack RPM. The defaut value contains a
reasonable set of values if the variable is not defined by the user. If the
variable is defined by the user then CPackRPM will NOT any of the default
path. If you want to add some path to the default list then you can use
<span class="target" id="index-0-variable:CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION"></span><a class="reference internal" href="#variable:CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION" title="CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION</span></code></a> variable.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION">
<code class="descname">CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION</code><a class="headerlink" href="#variable:CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION" title="Permalink to this definition"></a></dt>
<dd><p>additional list of path to be excluded.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to add more exclude path (directories or files) from the initial
default list of excluded paths. See
<span class="target" id="index-0-variable:CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST"></span><a class="reference internal" href="#variable:CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST" title="CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST</span></code></a>.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_RELOCATION_PATHS">
<code class="descname">CPACK_RPM_RELOCATION_PATHS</code><a class="headerlink" href="#variable:CPACK_RPM_RELOCATION_PATHS" title="Permalink to this definition"></a></dt>
<dd><p>Packages relocation paths list.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to specify more than one relocation path per relocatable RPM.
Variable contains a list of relocation paths that if relative are prefixed
by the value of <span class="target" id="index-0-variable:CPACK_RPM_&lt;COMPONENT&gt;_PACKAGE_PREFIX"></span><a class="reference internal" href="#variable:CPACK_RPM_&lt;COMPONENT&gt;_PACKAGE_PREFIX" title="CPACK_RPM_&lt;COMPONENT&gt;_PACKAGE_PREFIX"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_&lt;COMPONENT&gt;_PACKAGE_PREFIX</span></code></a> or by the
value of <span class="target" id="index-0-variable:CPACK_PACKAGING_INSTALL_PREFIX"></span><a class="reference internal" href="../variable/CPACK_PACKAGING_INSTALL_PREFIX.html#variable:CPACK_PACKAGING_INSTALL_PREFIX" title="CPACK_PACKAGING_INSTALL_PREFIX"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_PACKAGING_INSTALL_PREFIX</span></code></a> if the component version
is not provided.
Variable is not component based as its content can be used to set a different
path prefix for e.g. binary dir and documentation dir at the same time.
Only prefixes that are required by a certain component are added to that
component - component must contain at least one file/directory/symbolic link
with <span class="target" id="index-0-variable:CPACK_RPM_RELOCATION_PATHS"></span><a class="reference internal" href="#variable:CPACK_RPM_RELOCATION_PATHS" title="CPACK_RPM_RELOCATION_PATHS"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_RELOCATION_PATHS</span></code></a> prefix for a certain relocation
path to be added. Package will not contain any relocation paths if there are
no files/directories/symbolic links on any of the provided prefix locations.
Packages that either do not contain any relocation paths or contain
files/directories/symbolic links that are outside relocation paths print
out an <code class="docutils literal"><span class="pre">AUTHOR_WARNING</span></code> that RPM will be partially relocatable.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_&lt;COMPONENT&gt;_PACKAGE_PREFIX">
<code class="descname">CPACK_RPM_&lt;COMPONENT&gt;_PACKAGE_PREFIX</code><a class="headerlink" href="#variable:CPACK_RPM_<COMPONENT>_PACKAGE_PREFIX" title="Permalink to this definition">¶</a></dt>
<dd><p>Per component relocation path install prefix.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : CPACK_PACKAGING_INSTALL_PREFIX</li>
</ul>
<p>May be used to set per component <span class="target" id="index-1-variable:CPACK_PACKAGING_INSTALL_PREFIX"></span><a class="reference internal" href="../variable/CPACK_PACKAGING_INSTALL_PREFIX.html#variable:CPACK_PACKAGING_INSTALL_PREFIX" title="CPACK_PACKAGING_INSTALL_PREFIX"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_PACKAGING_INSTALL_PREFIX</span></code></a>
for relocatable RPM packages.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_NO_INSTALL_PREFIX_RELOCATION">
<code class="descname">CPACK_RPM_NO_INSTALL_PREFIX_RELOCATION</code><a class="headerlink" href="#variable:CPACK_RPM_NO_INSTALL_PREFIX_RELOCATION" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_NO_&lt;COMPONENT&gt;_INSTALL_PREFIX_RELOCATION">
<code class="descname">CPACK_RPM_NO_&lt;COMPONENT&gt;_INSTALL_PREFIX_RELOCATION</code><a class="headerlink" href="#variable:CPACK_RPM_NO_<COMPONENT>_INSTALL_PREFIX_RELOCATION" title="Permalink to this definition">¶</a></dt>
<dd><p>Removal of default install prefix from relocation paths list.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li><dl class="first docutils">
<dt>Default <span class="classifier-delimiter">:</span> <span class="classifier">CPACK_PACKAGING_INSTALL_PREFIX or CPACK_RPM_&lt;COMPONENT&gt;_PACKAGE_PREFIX</span></dt>
<dd>are treated as one of relocation paths</dd>
</dl>
</li>
</ul>
<p>May be used to remove CPACK_PACKAGING_INSTALL_PREFIX and CPACK_RPM_&lt;COMPONENT&gt;_PACKAGE_PREFIX
from relocatable RPM prefix paths.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_ADDITIONAL_MAN_DIRS">
<code class="descname">CPACK_RPM_ADDITIONAL_MAN_DIRS</code><a class="headerlink" href="#variable:CPACK_RPM_ADDITIONAL_MAN_DIRS" title="Permalink to this definition"></a></dt>
<dd><ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to set additional man dirs that could potentially be compressed
by brp-compress RPM macro. Variable content must be a list of regular
expressions that point to directories containing man files or to man files
directly. Note that in order to compress man pages a path must also be
present in brp-compress RPM script and that brp-compress script must be
added to RPM configuration by the operating system.</p>
<p>Regular expressions that are added by default were taken from brp-compress
RPM macro:</p>
<ul class="simple">
<li>/usr/man/man.*</li>
<li>/usr/man/.*/man.*</li>
<li>/usr/info.*</li>
<li>/usr/share/man/man.*</li>
<li>/usr/share/man/.*/man.*</li>
<li>/usr/share/info.*</li>
<li>/usr/kerberos/man.*</li>
<li>/usr/X11R6/man/man.*</li>
<li>/usr/lib/perl5/man/man.*</li>
<li>/usr/share/doc/.*/man/man.*</li>
<li>/usr/lib/.*/man/man.*</li>
</ul>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_DEFAULT_USER">
<code class="descname">CPACK_RPM_DEFAULT_USER</code><a class="headerlink" href="#variable:CPACK_RPM_DEFAULT_USER" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;compName&gt;_DEFAULT_USER">
<code class="descname">CPACK_RPM_&lt;compName&gt;_DEFAULT_USER</code><a class="headerlink" href="#variable:CPACK_RPM_<compName>_DEFAULT_USER" title="Permalink to this definition">¶</a></dt>
<dd><p>default user ownership of RPM content</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : root</li>
</ul>
<p>Value should be user name and not UID.
Note that &lt;compName&gt; must be in upper-case.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_DEFAULT_GROUP">
<code class="descname">CPACK_RPM_DEFAULT_GROUP</code><a class="headerlink" href="#variable:CPACK_RPM_DEFAULT_GROUP" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;compName&gt;_DEFAULT_GROUP">
<code class="descname">CPACK_RPM_&lt;compName&gt;_DEFAULT_GROUP</code><a class="headerlink" href="#variable:CPACK_RPM_<compName>_DEFAULT_GROUP" title="Permalink to this definition">¶</a></dt>
<dd><p>default group ownership of RPM content</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : root</li>
</ul>
<p>Value should be group name and not GID.
Note that &lt;compName&gt; must be in upper-case.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_DEFAULT_FILE_PERMISSIONS">
<code class="descname">CPACK_RPM_DEFAULT_FILE_PERMISSIONS</code><a class="headerlink" href="#variable:CPACK_RPM_DEFAULT_FILE_PERMISSIONS" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;compName&gt;_DEFAULT_FILE_PERMISSIONS">
<code class="descname">CPACK_RPM_&lt;compName&gt;_DEFAULT_FILE_PERMISSIONS</code><a class="headerlink" href="#variable:CPACK_RPM_<compName>_DEFAULT_FILE_PERMISSIONS" title="Permalink to this definition">¶</a></dt>
<dd><p>default permissions used for packaged files</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : - (system default)</li>
</ul>
<p>Accepted values are lists with <code class="docutils literal"><span class="pre">PERMISSIONS</span></code>. Valid permissions
are:</p>
<ul class="simple">
<li>OWNER_READ</li>
<li>OWNER_WRITE</li>
<li>OWNER_EXECUTE</li>
<li>GROUP_READ</li>
<li>GROUP_WRITE</li>
<li>GROUP_EXECUTE</li>
<li>WORLD_READ</li>
<li>WORLD_WRITE</li>
<li>WORLD_EXECUTE</li>
</ul>
<p>Note that &lt;compName&gt; must be in upper-case.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_DEFAULT_DIR_PERMISSIONS">
<code class="descname">CPACK_RPM_DEFAULT_DIR_PERMISSIONS</code><a class="headerlink" href="#variable:CPACK_RPM_DEFAULT_DIR_PERMISSIONS" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;compName&gt;_DEFAULT_DIR_PERMISSIONS">
<code class="descname">CPACK_RPM_&lt;compName&gt;_DEFAULT_DIR_PERMISSIONS</code><a class="headerlink" href="#variable:CPACK_RPM_<compName>_DEFAULT_DIR_PERMISSIONS" title="Permalink to this definition">¶</a></dt>
<dd><p>default permissions used for packaged directories</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : - (system default)</li>
</ul>
<p>Accepted values are lists with PERMISSIONS. Valid permissions
are the same as for <span class="target" id="index-0-variable:CPACK_RPM_DEFAULT_FILE_PERMISSIONS"></span><a class="reference internal" href="#variable:CPACK_RPM_DEFAULT_FILE_PERMISSIONS" title="CPACK_RPM_DEFAULT_FILE_PERMISSIONS"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_DEFAULT_FILE_PERMISSIONS</span></code></a>.
Note that &lt;compName&gt; must be in upper-case.</p>
</dd></dl>
</div>
<div class="section" id="packaging-of-symbolic-links">
<h2>Packaging of Symbolic Links<a class="headerlink" href="#packaging-of-symbolic-links" title="Permalink to this headline"></a></h2>
<p>CPackRPM supports packaging of symbolic links:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>execute_process(COMMAND ${CMAKE_COMMAND}
-E create_symlink &lt;relative_path_location&gt; &lt;symlink_name&gt;)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/&lt;symlink_name&gt;
DESTINATION &lt;symlink_location&gt; COMPONENT libraries)
</pre></div>
</div>
<p>Symbolic links will be optimized (paths will be shortened if possible)
before being added to the package or if multiple relocation paths are
detected, a post install symlink relocation script will be generated.</p>
<p>Symbolic links may point to locations that are not packaged by the same
package (either a different component or even not packaged at all) but
those locations will be treated as if they were a part of the package
while determining if symlink should be either created or present in a
post install script - depending on relocation paths.</p>
<p>Symbolic links that point to locations outside packaging path produce a
warning and are treated as non relocatable permanent symbolic links.</p>
<p>Currently there are a few limitations though:</p>
<ul class="simple">
<li>For component based packaging component interdependency is not checked
when processing symbolic links. Symbolic links pointing to content of
a different component are treated the same way as if pointing to location
that will not be packaged.</li>
<li>Symbolic links pointing to a location through one or more intermediate
symbolic links will not be handled differently - if the intermediate
symbolic link(s) is also on a relocatable path, relocating it during
package installation may cause initial symbolic link to point to an
invalid location.</li>
</ul>
</div>
<div class="section" id="packaging-of-debug-information">
<h2>Packaging of debug information<a class="headerlink" href="#packaging-of-debug-information" title="Permalink to this headline"></a></h2>
<p>Debuginfo packages contain debug symbols and sources for debugging packaged
binaries.</p>
<p>Debuginfo RPM packaging has it&#8217;s own set of variables:</p>
<dl class="variable">
<dt id="variable:CPACK_RPM_DEBUGINFO_PACKAGE">
<code class="descname">CPACK_RPM_DEBUGINFO_PACKAGE</code><a class="headerlink" href="#variable:CPACK_RPM_DEBUGINFO_PACKAGE" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_DEBUGINFO_PACKAGE">
<code class="descname">CPACK_RPM_&lt;component&gt;_DEBUGINFO_PACKAGE</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_DEBUGINFO_PACKAGE" title="Permalink to this definition">¶</a></dt>
<dd><p>Enable generation of debuginfo RPM package(s).</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : OFF</li>
</ul>
</dd></dl>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Binaries must contain debug symbols before packaging so use either <code class="docutils literal"><span class="pre">Debug</span></code>
or <code class="docutils literal"><span class="pre">RelWithDebInfo</span></code> for <span class="target" id="index-0-variable:CMAKE_BUILD_TYPE"></span><a class="reference internal" href="../variable/CMAKE_BUILD_TYPE.html#variable:CMAKE_BUILD_TYPE" title="CMAKE_BUILD_TYPE"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CMAKE_BUILD_TYPE</span></code></a> variable value.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Packages generated from packages without binary files, with binary files but
without execute permissions or without debug symbols will be empty.</p>
</div>
<dl class="variable">
<dt id="variable:CPACK_BUILD_SOURCE_DIRS">
<code class="descname">CPACK_BUILD_SOURCE_DIRS</code><a class="headerlink" href="#variable:CPACK_BUILD_SOURCE_DIRS" title="Permalink to this definition"></a></dt>
<dd><p>Provides locations of root directories of source files from which binaries
were built.</p>
<ul class="simple">
<li>Mandatory : YES if <span class="target" id="index-0-variable:CPACK_RPM_DEBUGINFO_PACKAGE"></span><a class="reference internal" href="#variable:CPACK_RPM_DEBUGINFO_PACKAGE" title="CPACK_RPM_DEBUGINFO_PACKAGE"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_DEBUGINFO_PACKAGE</span></code></a> is set</li>
<li>Default : -</li>
</ul>
</dd></dl>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">For CMake project <span class="target" id="index-0-variable:CPACK_BUILD_SOURCE_DIRS"></span><a class="reference internal" href="#variable:CPACK_BUILD_SOURCE_DIRS" title="CPACK_BUILD_SOURCE_DIRS"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_BUILD_SOURCE_DIRS</span></code></a> is set by default to
point to <span class="target" id="index-0-variable:CMAKE_SOURCE_DIR"></span><a class="reference internal" href="../variable/CMAKE_SOURCE_DIR.html#variable:CMAKE_SOURCE_DIR" title="CMAKE_SOURCE_DIR"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CMAKE_SOURCE_DIR</span></code></a> and <span class="target" id="index-0-variable:CMAKE_BINARY_DIR"></span><a class="reference internal" href="../variable/CMAKE_BINARY_DIR.html#variable:CMAKE_BINARY_DIR" title="CMAKE_BINARY_DIR"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CMAKE_BINARY_DIR</span></code></a> paths.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Sources with path prefixes that do not fall under any location provided with
<span class="target" id="index-1-variable:CPACK_BUILD_SOURCE_DIRS"></span><a class="reference internal" href="#variable:CPACK_BUILD_SOURCE_DIRS" title="CPACK_BUILD_SOURCE_DIRS"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_BUILD_SOURCE_DIRS</span></code></a> will not be present in debuginfo package.</p>
</div>
<dl class="variable">
<dt id="variable:CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX">
<code class="descname">CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX</code><a class="headerlink" href="#variable:CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX" title="Permalink to this definition"></a></dt>
<dt id="variable:CPACK_RPM_&lt;component&gt;_BUILD_SOURCE_DIRS_PREFIX">
<code class="descname">CPACK_RPM_&lt;component&gt;_BUILD_SOURCE_DIRS_PREFIX</code><a class="headerlink" href="#variable:CPACK_RPM_<component>_BUILD_SOURCE_DIRS_PREFIX" title="Permalink to this definition">¶</a></dt>
<dd><p>Prefix of location where sources will be placed during package installation.</p>
<ul class="simple">
<li>Mandatory : YES if <span class="target" id="index-1-variable:CPACK_RPM_DEBUGINFO_PACKAGE"></span><a class="reference internal" href="#variable:CPACK_RPM_DEBUGINFO_PACKAGE" title="CPACK_RPM_DEBUGINFO_PACKAGE"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_DEBUGINFO_PACKAGE</span></code></a> is set</li>
<li><dl class="first docutils">
<dt>Default <span class="classifier-delimiter">:</span> <span class="classifier">&#8220;/usr/src/debug/&lt;CPACK_PACKAGE_FILE_NAME&gt;&#8221; and</span></dt>
<dd>for component packaging &#8220;/usr/src/debug/&lt;CPACK_PACKAGE_FILE_NAME&gt;-&lt;component&gt;&#8221;</dd>
</dl>
</li>
</ul>
</dd></dl>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Each source path prefix is additionaly suffixed by <code class="docutils literal"><span class="pre">src_&lt;index&gt;</span></code> where
index is index of the path used from <span class="target" id="index-2-variable:CPACK_BUILD_SOURCE_DIRS"></span><a class="reference internal" href="#variable:CPACK_BUILD_SOURCE_DIRS" title="CPACK_BUILD_SOURCE_DIRS"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_BUILD_SOURCE_DIRS</span></code></a>
variable. This produces <code class="docutils literal"><span class="pre">&lt;CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX&gt;/src_&lt;index&gt;</span></code>
replacement path.
Limitation is that replaced path part must be shorter or of equal
length than the length of its replacement. If that is not the case either
<span class="target" id="index-0-variable:CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX"></span><a class="reference internal" href="#variable:CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX" title="CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX</span></code></a> variable has to be set to
a shorter path or source directories must be placed on a longer path.</p>
</div>
<dl class="variable">
<dt id="variable:CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS">
<code class="descname">CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS</code><a class="headerlink" href="#variable:CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS" title="Permalink to this definition"></a></dt>
<dd><p>Directories containing sources that should be excluded from debuginfo packages.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : &#8220;/usr /usr/src /usr/src/debug&#8221;</li>
</ul>
<p>Listed paths are owned by other RPM packages and should therefore not be
deleted on debuginfo package uninstallation.</p>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS_ADDITION">
<code class="descname">CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS_ADDITION</code><a class="headerlink" href="#variable:CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS_ADDITION" title="Permalink to this definition"></a></dt>
<dd><p>Paths that should be appended to <span class="target" id="index-0-variable:CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS"></span><a class="reference internal" href="#variable:CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS" title="CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS</span></code></a>
for exclusion.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE">
<code class="descname">CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE</code><a class="headerlink" href="#variable:CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE" title="Permalink to this definition"></a></dt>
<dd><p>Create a single debuginfo package even if components packaging is set.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : OFF</li>
</ul>
<p>When this variable is enabled it produces a single debuginfo package even if
component packaging is enabled.</p>
<p>When using this feature in combination with components packaging and there is
more than one component this variable requires <span class="target" id="index-0-variable:CPACK_RPM_MAIN_COMPONENT"></span><a class="reference internal" href="#variable:CPACK_RPM_MAIN_COMPONENT" title="CPACK_RPM_MAIN_COMPONENT"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_MAIN_COMPONENT</span></code></a>
to be set.</p>
</dd></dl>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If none of the <span class="target" id="index-0-variable:CPACK_RPM_&lt;component&gt;_DEBUGINFO_PACKAGE"></span><a class="reference internal" href="#variable:CPACK_RPM_&lt;component&gt;_DEBUGINFO_PACKAGE" title="CPACK_RPM_&lt;component&gt;_DEBUGINFO_PACKAGE"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_&lt;component&gt;_DEBUGINFO_PACKAGE</span></code></a> variables
is set then <span class="target" id="index-2-variable:CPACK_RPM_DEBUGINFO_PACKAGE"></span><a class="reference internal" href="#variable:CPACK_RPM_DEBUGINFO_PACKAGE" title="CPACK_RPM_DEBUGINFO_PACKAGE"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_DEBUGINFO_PACKAGE</span></code></a> is automatically set to
<code class="docutils literal"><span class="pre">ON</span></code> when <span class="target" id="index-0-variable:CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE"></span><a class="reference internal" href="#variable:CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE" title="CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE</span></code></a> is set.</p>
</div>
</div>
<div class="section" id="packaging-of-sources-srpm">
<h2>Packaging of sources (SRPM)<a class="headerlink" href="#packaging-of-sources-srpm" title="Permalink to this headline"></a></h2>
<p>SRPM packaging is enabled by setting <span class="target" id="index-0-variable:CPACK_RPM_PACKAGE_SOURCES"></span><a class="reference internal" href="#variable:CPACK_RPM_PACKAGE_SOURCES" title="CPACK_RPM_PACKAGE_SOURCES"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_PACKAGE_SOURCES</span></code></a>
variable while usually using <span class="target" id="index-0-variable:CPACK_INSTALLED_DIRECTORIES"></span><a class="reference internal" href="CPack.html#variable:CPACK_INSTALLED_DIRECTORIES" title="CPACK_INSTALLED_DIRECTORIES"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_INSTALLED_DIRECTORIES</span></code></a> variable
to provide directory containing CMakeLists.txt and source files.</p>
<p>For CMake projects SRPM package would be product by executing:</p>
<p><code class="docutils literal"><span class="pre">cpack</span> <span class="pre">-G</span> <span class="pre">RPM</span> <span class="pre">--config</span> <span class="pre">./CPackSourceConfig.cmake</span></code></p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Produced SRPM package is expected to be built with <span class="target" id="index-0-manual:cmake(1)"></span><a class="reference internal" href="../manual/cmake.1.html#manual:cmake(1)" title="cmake(1)"><code class="xref cmake cmake-manual docutils literal"><span class="pre">cmake(1)</span></code></a> executable
and packaged with <span class="target" id="index-0-manual:cpack(1)"></span><a class="reference internal" href="../manual/cpack.1.html#manual:cpack(1)" title="cpack(1)"><code class="xref cmake cmake-manual docutils literal"><span class="pre">cpack(1)</span></code></a> executable so CMakeLists.txt has to be
located in root source directory and must be able to generate binary rpm
packages by executing <code class="docutils literal"><span class="pre">cpack</span> <span class="pre">-G</span></code> command. The two executables as well as
rpmbuild must also be present when generating binary rpm packages from the
produced SRPM package.</p>
</div>
<p>Once the SRPM package is generated it can be used to generate binary packages
by creating a directory structure for rpm generation and executing rpmbuild
tool:</p>
<p><code class="docutils literal"><span class="pre">mkdir</span> <span class="pre">-p</span> <span class="pre">build_dir/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}</span></code>
<code class="docutils literal"><span class="pre">rpmbuild</span> <span class="pre">--define</span> <span class="pre">&quot;_topdir</span> <span class="pre">&lt;path_to_build_dir&gt;&quot;</span> <span class="pre">--rebuild</span> <span class="pre">&lt;SRPM_file_name&gt;</span></code></p>
<p>Generated packages will be located in build_dir/RPMS directory or its sub
directories.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">SRPM package internally uses CPack/RPM generator to generate binary packages
so CMakeScripts.txt can decide during the SRPM to binary rpm generation step
what content the package(s) should have as well as how they should be packaged
(monolithic or components). CMake can decide this for e.g. by reading environment
variables set by the package manager before starting the process of generating
binary rpm packages. This way a single SRPM package can be used to produce
different binary rpm packages on different platforms depending on the platform&#8217;s
packaging rules.</p>
</div>
<p>Source RPM packaging has it&#8217;s own set of variables:</p>
<dl class="variable">
<dt id="variable:CPACK_RPM_PACKAGE_SOURCES">
<code class="descname">CPACK_RPM_PACKAGE_SOURCES</code><a class="headerlink" href="#variable:CPACK_RPM_PACKAGE_SOURCES" title="Permalink to this definition"></a></dt>
<dd><p>Should the content be packaged as a source rpm (default is binary rpm).</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : OFF</li>
</ul>
</dd></dl>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">For cmake projects <span class="target" id="index-1-variable:CPACK_RPM_PACKAGE_SOURCES"></span><a class="reference internal" href="#variable:CPACK_RPM_PACKAGE_SOURCES" title="CPACK_RPM_PACKAGE_SOURCES"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_RPM_PACKAGE_SOURCES</span></code></a> variable is set
to <code class="docutils literal"><span class="pre">OFF</span></code> in CPackConfig.cmake and <code class="docutils literal"><span class="pre">ON</span></code> in CPackSourceConfig.cmake
generated files.</p>
</div>
<dl class="variable">
<dt id="variable:CPACK_RPM_SOURCE_PKG_BUILD_PARAMS">
<code class="descname">CPACK_RPM_SOURCE_PKG_BUILD_PARAMS</code><a class="headerlink" href="#variable:CPACK_RPM_SOURCE_PKG_BUILD_PARAMS" title="Permalink to this definition"></a></dt>
<dd><p>Additional command-line parameters provided to <span class="target" id="index-1-manual:cmake(1)"></span><a class="reference internal" href="../manual/cmake.1.html#manual:cmake(1)" title="cmake(1)"><code class="xref cmake cmake-manual docutils literal"><span class="pre">cmake(1)</span></code></a> executable.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_SOURCE_PKG_PACKAGING_INSTALL_PREFIX">
<code class="descname">CPACK_RPM_SOURCE_PKG_PACKAGING_INSTALL_PREFIX</code><a class="headerlink" href="#variable:CPACK_RPM_SOURCE_PKG_PACKAGING_INSTALL_PREFIX" title="Permalink to this definition"></a></dt>
<dd><p>Packaging install prefix that would be provided in <span class="target" id="index-2-variable:CPACK_PACKAGING_INSTALL_PREFIX"></span><a class="reference internal" href="../variable/CPACK_PACKAGING_INSTALL_PREFIX.html#variable:CPACK_PACKAGING_INSTALL_PREFIX" title="CPACK_PACKAGING_INSTALL_PREFIX"><code class="xref cmake cmake-variable docutils literal"><span class="pre">CPACK_PACKAGING_INSTALL_PREFIX</span></code></a>
variable for producing binary RPM packages.</p>
<ul class="simple">
<li>Mandatory : YES</li>
<li>Default : &#8220;/&#8221;</li>
</ul>
</dd></dl>
<dl class="variable">
<dt id="variable:CPACK_RPM_BUILDREQUIRES">
<code class="descname">CPACK_RPM_BUILDREQUIRES</code><a class="headerlink" href="#variable:CPACK_RPM_BUILDREQUIRES" title="Permalink to this definition"></a></dt>
<dd><p>List of source rpm build dependencies.</p>
<ul class="simple">
<li>Mandatory : NO</li>
<li>Default : -</li>
</ul>
<p>May be used to set source RPM build dependencies (BuildRequires). Note that
you must enclose the complete build requirements string between quotes, for
example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="nb">set</span><span class="p">(</span><span class="n">CPACK_RPM_BUILDREQUIRES</span> <span class="s2">&quot;python &gt;= 2.5.0, cmake &gt;= 2.8&quot;</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">CPackRPM</a><ul>
<li><a class="reference internal" href="#variables-specific-to-cpack-rpm-generator">Variables specific to CPack RPM generator</a></li>
<li><a class="reference internal" href="#packaging-of-symbolic-links">Packaging of Symbolic Links</a></li>
<li><a class="reference internal" href="#packaging-of-debug-information">Packaging of debug information</a></li>
<li><a class="reference internal" href="#packaging-of-sources-srpm">Packaging of sources (SRPM)</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="CPackProductBuild.html"
title="previous chapter">CPackProductBuild</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="CPack.html"
title="next chapter">CPack</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/module/CPackRPM.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="CPack.html" title="CPack"
>next</a> |</li>
<li class="right" >
<a href="CPackProductBuild.html" title="CPackProductBuild"
>previous</a> |</li>
<li>
<img src="../_static/cmake-logo-16.png" alt=""
style="vertical-align: middle; margin-top: -2px" />
</li>
<li>
<a href="https://cmake.org/">CMake</a> &#187;
</li>
<li>
<a href="../index.html">3.8.2 Documentation</a> &#187;
</li>
<li class="nav-item nav-item-1"><a href="../manual/cmake-modules.7.html" >cmake-modules(7)</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2000-2017 Kitware, Inc. and Contributors.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.2.
</div>
</body>
</html>