uTools-Manuals/docs/linux/rpmbuild.html
2019-04-21 11:50:48 +08:00

17 lines
1.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="rpmbuild">rpmbuild</h1>
<p>创建RPM的二进制软件包和源码软件包</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>rpmbuild命令</strong> 被用于创建rpm的二进制软件包和源码软件包。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">rpmbuild(选项)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">--initdb初始化RPM数据库
--rebuilddb从已安装的包头文件方向重建RPM数据库
-ba创建二进制和源代码包
-bb创建二进制代码包
-bs创建源代码包。</code></pre>
<h3 id="实例">实例</h3>
<pre><code class="language-bash">rpmbuild -ba &#39;spec文件路径&#39;</code></pre>
<p>build完后可以在<code>/usr/src/redhat/RPMS/</code>下找到二进制rpm包rpm包按照其对应的cpu体系结构分类通常在<code>/usr/src/redhat/RPMS/i386</code>目录下。<code>/usr/src/redhat/SRPMS/</code>下找到源码rpm包此时由于是源代码所以无须按体系结构分类。</p>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->