RPM包制作最简单样例

相关开发RPM的包要安装

 

复制代码
Summary: the Firt RPM of Sky
Name: hellow
Version: 0.1
Release: 1
Vendor: PA soft(aguncn@163.com)
License: GPL
Group: Application/Text
Source0: hellow-0.1-1.tar.gz
#Patch0:hellow-0.1-1.patch

%description

My test hellow

%prep

tar -xzvf $RPM_SOURCE_DIR/hellow-0.1-1.tar.gz

#%path -p0

%build

cd $RPM_BUILD_DIR/hellow

#./configure

make

%install

cd $RPM_BUILD_DIR/hellow

make install

%clean

rm -rf $RPM_BUILD_DIR/hellow

%files

%defattr(-,root,root)
/usr/bin/hellow

%doc $PRM_BULD_DIR/hellow/readme

%changelog
复制代码

rpmbuild -ba hellow-0.1-1.spec输出:

复制代码
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.iA1hvb
+ umask 022
+ cd /root/rpmbuild/BUILD
+ tar -xzvf /root/rpmbuild/SOURCES/hellow-0.1-1.tar.gz
hellow/
hellow/Makefile
hellow/hellow.c
hellow/readme
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.hosypk
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd /root/rpmbuild/BUILD/hellow
+ make
make: Nothing to be done for `all'.
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.N7lkmt
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd /root/rpmbuild/BUILD/hellow
+ make install
cp hellow /usr/bin
+ /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip
+ /usr/lib/rpm/brp-strip-static-archive
+ /usr/lib/rpm/brp-strip-comment-note
Processing files: hellow-0.1-1.x86_64
error: File not found: /root/rpmbuild/BUILDROOT/hellow-0.1-1.x86_64/usr/bin/hellow
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.GVUVqC
+ umask 022
+ cd /root/rpmbuild/BUILD
+ DOCDIR=/root/rpmbuild/BUILDROOT/hellow-0.1-1.x86_64/usr/share/doc/hellow-0.1
+ export DOCDIR
+ rm -rf /root/rpmbuild/BUILDROOT/hellow-0.1-1.x86_64/usr/share/doc/hellow-0.1
+ /bin/mkdir -p /root/rpmbuild/BUILDROOT/hellow-0.1-1.x86_64/usr/share/doc/hellow-0.1
+ cp -pr /hellow/readme /root/rpmbuild/BUILDROOT/hellow-0.1-1.x86_64/usr/share/doc/hellow-0.1
cp: cannot stat `/hellow/readme': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.GVUVqC (%doc)


RPM build errors:
    File not found: /root/rpmbuild/BUILDROOT/hellow-0.1-1.x86_64/usr/bin/hellow
    Bad exit status from /var/tmp/rpm-tmp.GVUVqC (%doc)
复制代码

未完善,以后再测试

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值