名称: rpm-spec-生成器 描述: 为 Fedora、RHEL 和 CentOS 发行版生成 RPM spec 文件 允许使用的工具: 读取、写入、编辑、Bash、Glob、Grep 标签: [linux, rpm, fedora, rhel, 打包]
rpm-spec-生成器
为 Fedora、RHEL、CentOS 及其他基于 RPM 的发行版生成 RPM spec 文件。
功能
- 生成 .spec 文件
- 配置软件包元数据
- 定义构建依赖
- 设置脚本片段
- 配置文件列表
- 处理桌面集成
- 配置更新日志
输入模式
{
"type": "object",
"properties": {
"projectPath": { "type": "string" },
"packageName": { "type": "string" },
"version": { "type": "string" },
"release": { "type": "string", "default": "1" },
"buildRequires": { "type": "array" },
"requires": { "type": "array" }
},
"required": ["projectPath", "packageName", "version"]
}
Spec 文件示例
Name: myapp
Version: 1.0.0
Release: 1%{?dist}
Summary: 我的应用程序
License: MIT
URL: https://example.com/myapp
Source0: %{name}-%{version}.tar.gz
BuildRequires: gcc
Requires: glibc, gtk3
%description
关于我的应用程序的更长描述。
%prep
%setup -q
%build
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
%files
%{_bindir}/myapp
%{_datadir}/applications/myapp.desktop
%changelog
* 2024年1月1日 星期一 您的姓名 <email@example.com> - 1.0.0-1
- 初始版本
构建命令
rpmbuild -ba myapp.spec
相关技能
deb-package-builderlinux-gpg-signing