我正在尝试为我在 Qt 中编写的库创建一个 rpm 包。这是我的规格文件:
Name: blabla
Version: 1.3.2
Release: 0.1
License: GPL
Summary: my awsome lib
Url: http://me.home.mrz.net
Group: Core Applictaion
Source: http://svn.me.home.mrz.net/svn/Core/blabla-1.3.2.tar
Vendor: mrz Inc.
BuildArch: x86_64
Packager: mrz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
%prep
%setup
%build
qmake
%install
make install
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%files:
%defattr(-,root,root)
/home/mrz/local/lib/libBlabla.so
/home/mrz/local/lib/libBlabla.so.%{version}
跑完之后
rpmbuild -ba blabla.spec
rpmbuild 正常完成(退出 0),表明它写入了 src.rpm,对 .rpm 文件只字不提。我可以在 SRPMS 文件夹中看到 blabla-1.3.2-01.src.rpm 但 RMPS 文件夹是空的,这是我得到的部分输出:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.WwW6ps
+ unmask 022
+ cd /home/mrz/rpmbuild/BUILD
+ rm -rf blabla-1.3.2
+ /usr/bin/gzip -dc /home/mrz/rpmbuild/SOURCES/blabla-1.3.2.tar
+ /bin/tar -xvvf -
.
.
.
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd blabla-1.3.2
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.sNb2WS
+ umask 022
+ cd /home/mrz/rpmbuild/BUILD
+ /bin/rm -rf /home/mrz/rpmbuild/BUILDROOT/blabla-1.3.2-0.1.x86_64
++ dirname /home/mrz/rpmbuild/BUILDROOT/blabla-1.3.2-0.1.x86_64
+ /bin/mkdir -p /home/mrz/rpmbuild/BUILDROOT
+ /bin/mkdir /home/mrz/rpmbuild/BUILDROOT/blabla-1.3.2-0.1.x86_64
+ cd blabla-1.3.2
+ qmake
Project MESSAGE: ******************************************************************
Project MESSAGE: * Building blabla
Project MESSAGE: * project default message
Project MESSAGE: ******************************************************************
.
.
.
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.qVk8KW
+ umask 022
+ cd /home/mrz/rpmbuild/BUILD
+ cd blabla-1.3.2
+ make install
cd src/ && /usr/bin/qmake /home/mrz/rpmbuild/BUILD/blabla-1.3.2/src/src.pro -o
Makefile
Project MESSAGE: ******************************************************************
Project MESSAGE: * Building blabla
Project MESSAGE: * project default message
Project MESSAGE: ******************************************************************
cd src/ && make -f Makefile install
make[1]: Entering directory `/home/mrz/rpmbuild/BUILD/blabla-1.3.2/src'
g++ -c -m64 -pipe -O2 -fPIC -Wall -W
.
.
.
+ /usr/lib/rpm/brp-lib64-linux
sf@suse.de: if you find problems with this script, drop me a note
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-symlink
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/mrz/rpmbuild/BUILDROOT/blabla-1.3.2-0.1.x86_64
warning: Could not canonicalize hostname: linux-x1rh
Wrote: /home/mrz/rpmbuild/SRPMS/blabla-1.3.2-0.1.src.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.M4rJDm
+ umask 022
+ cd /home/mrz/rpmbuild/BUILD
+ cd blabla-1.3.2
+ /bin/rm -rf /home/mrz/rpmbuild/BUILDROOT/blabla-1.3.2-0.1.x86_64
+ exit 0
任何人都知道我做错了什么...