rpmbuild打包工具

作者: yangqing | 来源:发表于2020-05-08 10:47 被阅读0次

1、安装打包工具

yum -y install rpm-build

2、生成打包目录,默认在/root/rpmbuild

rpmbuild -ba test.spec

3、新建SPEC文件

vim /root/rpmbuild/SPECS/test.spc
Name:    # 软件名称
Version:    # 软件版本
Release:        1%{?dist}    # RPM版本
Summary:    #描述

Group:      # 软件组
License:    # 协议
URL:        # 网址
Source0:    # 源码文件

BuildRequires:    # 编译时依赖包
Requires:         # 安装时依赖包

%description      # 详细描述


%prep    # 安装前准备,解压
%setup -q    # 系统使用setup自动解压,安静模式


%build     # 编译需要执行的命令
%configure    # 配置时需要执行的命令
make %{?_smp_mflags}


%install    # 安装时需要执行的命令
%make_install

%clean    # 清理时需要执行的命令

%files    # 定义打包文件列表
%doc



%changelog    # 软件修改历史

相关文章

网友评论

    本文标题:rpmbuild打包工具

    本文链接:https://www.haomeiwen.com/subject/abixnhtx.html