从编译的二进制文件创建RPM规范文件 [英] Creating RPM spec file from compiled binary files
问题描述
环境是AIX 7.0 RPM版本3.0.5。我对Unix世界很陌生,请耐心等待我的无知。
Environment is AIX 7.0 RPM Version 3.0.5 . I am very new to Unix world, Please be patient with my ignorance.
我们将3种不同类型的文件打包为RPM。
We have 3 different types of files to be packaged as RPM.
•源/二进制/*.bainary文件(其中约160个)
• Source/binary/*.bainaryfiles (around 160 of them)
•源/ ui / *。mm(文件数2)
• Source/ui/*.mm (No of files 2)
•源代码/脚本/*.sh(10到20)
• Source/scripts/*.sh (10 to 20)
这些文件
当使用rpmbuild在生成的RPM上进行安装时,它们是为目标服务器编译的,并且均为二进制格式,我们不想将这些文件压缩为tar。 .binaryfiles,.ui和.sh文件必须转到目标服务器上的不同目录
When the install happens on the Generated RPM using rpmbuild the .binaryfiles ,.ui and .sh files have to go to different directories on the target server
自从其构建完成以来,就无需进行构建。
No build has to happen since its already built.
任何人都可以向我提供.spec文件示例和步骤。
可以在没有root用户访问的情况下运行rpmbuild吗?
我们可以在没有root用户访问权限的情况下运行rpm的安装吗?
Can anybody provide me the .spec file sample and the steps. can we run rpmbuild without root access? Can we run the install of the rpm without root access?
推荐答案
下面是一个没有示例的示例
Here is an example that doesn't have any build section.
Name: special-package
Version: 0.0
Release: 0.1
Summary: This is a special package
Group: Devlopment/Tools
License: Special Proprietary
BuildArch: noarch
%description
This package contains some special stuff
%install
# e.g., on the target server path_to_all_binary_files=/usr/share/special/bin
%{mkdir_p} %{buildroot}%{_path_to_all_binary_files}
# In case of a copy, file permissions will be copied as it is.
# You can also try 'install -m 755 $RPM_SOURCE_DIR/....'
# 'man install' for more information
%{__cp} $RPM_SOURCE_DIR/binary/*.binaryfiles %{buildroot}%{_path_to_all_binary_files}
# Similarly do this for other sets of files
%files
%{_path_to_binary_files}/*.binaryfiles
%{_path_to_sh_files}/*.sh
%changelog
* Tue Mar 14 2017 Name Surname<name.surname@email.com>
- First build of the special package
这是Fedora制作的,但我认为很多准则通常都适用于
https://fedoraproject.org/wiki/How_to_create_an_RPM_package
This one is by Fedora, but I think a lot of guidelines apply in general https://fedoraproject.org/wiki/How_to_create_an_RPM_package
这篇关于从编译的二进制文件创建RPM规范文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!