【问题标题】:Building both devel and normal version of a RPM package构建 RPM 包的开发版和普通版
【发布时间】:2011-02-24 04:22:51
【问题描述】:

我有一个库,我想从中创建两个 RPM 包。

虽然我找到了几个关于如何创建基本 RPM 包的链接,但我找不到如何创建 devel 包(如果您想知道 devel 包是什么,请参阅 this question)。

我要如何生成我的 RPM 包的 develnon-devel 版本?

谢谢。

【问题讨论】:

  • 好问题 - 我不敢相信在网上找到有关如何构建 -devel 包的信息是多么困难。
  • @gareth_bowles 我也很惊讶。似乎 少数 正在做devel 包的人想要保守他们的秘密!

标签: linux rpm rpmbuild


【解决方案1】:

我发现.spec 文件中的an example 同时生成develnon-devel 包。

您似乎可以在一个包内创建一个(或多个)子包,在%files 指令之后附加devel(或您想要的任何名称)。

以下是我发布的示例的摘录:

Name:      kmymoney
Summary:   The Personal Finances Manager for KDE.
Version:   0.8
Release:   1.%{disttag}%{distver}
License:   GPL
Packager:  %packer
Group:     Productivity/Office/Finance
Source0:   %{name}2-%version.tar.bz2
BuildRoot: %{_tmppath}/%{name}2-%{version}-%{release}-build
BuildRequires: kdebase3-devel
Prereq: /sbin/ldconfig

%description
Description goes here...

%package devel
#Requires:
Summary: KMyMoney development files
Group: Productivity/Office/Finance
Provides: kmymoney-devel

%description devel
This package contains necessary header files for KMyMoney development.

... more to go here ...

%files
... some files ...

%files devel
... the devel files ...

注意devel 后缀。

【讨论】:

    【解决方案2】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-10-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-12
      相关资源
      最近更新 更多