构建 RPM 包的开发版和普通版

发布于 2024-09-03 12:15:13 字数 304 浏览 6 评论 0原文

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

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

我需要做什么才能生成 RPM 包的 develnon-devel 版本?

谢谢。

I have a library from which I'd like to create two RPM packages.

While I found several links on how to create a basic RPM package, I can't find how to create a devel package (see this question if you wonder what a devel package is).

What do I have to do to generate both devel and non-devel versions of my RPM package ?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

流云如水 2024-09-10 12:15:13

我发现 一个 .spec 文件的示例生成 develnon-devel 包。

看来您可以在包内创建一个(或多个)子包,在 % 之后附加 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 后缀。

I found an example of a .spec file which generates both devel and non-devel packages.

It seems you can create one (or several) sub-package(s) inside a package, appending devel (or whatever name you want to) after the %files directive.

Below is an extract from the example I posted:

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 ...

Note the devel suffixes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文