【发布时间】:2015-04-25 15:12:38
【问题描述】:
遵循网络上的所有随机指南,甚至在这里: What is the minimum I have to do to create an RPM file?
Centos 7 似乎无法使用(惊喜!)
似乎如果你在你的规范文件中保留 %prep,rpmbuild 会尽最大努力去 ./configure 做一些事情。我不确定。 这是一个超级基本的 .spec 文件,我正在尝试制作一个 rpm 以复制到一个文件中。
$more newpackage.spec
Name: hello
Version: 1.2
Release: 1%{?dist}
Summary: Testing testing 1 2 3
License: Beer
URL: No
#so apparently now you have to have version numbers everywhere, even the tar files, uhg
Source0: hello-1.2.tar.gz
#and the breaking begins :-( why everything broke with you centos 7?
# BuildRoot: %{_tmppath}/%{name}-%{version}-root
# BuildRequires:
# Requires:
%description
nothing to see here folks
#well here is some of the confusion
#%prep
%setup -q
# ./configure missing? um yeahhhh
# %build
# %configure
# make %{?_smp_mflags}
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}
%files
#/usr/bin/hello.sh
%{_bindir}/hello.sh
# %doc
# %changelog
在 tar 文件中是 /usr/bin/hello.sh 这是只运行 echo "hello world" 的 shell 脚本
如果我评论 %prep rpmbuild 抱怨 ./configure 未找到。
rpmbuild -v -bb newpackage.spec
【问题讨论】: