使用的包的gcc-linaro-arm-linux-gnueabihf-4.9tar.gz,然后编写spec,如下:
Summary: x86-linux hosted GCC arm-linux-gnueabihf cross compiler
Name: gcc-linaro-arm-linux-gnueabihf
Version:4.9
Release: 1%{?dist}
License:GPL
Group:Applications
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Url: http://xiexp.gcchf.org/
%description
Gcchf is an cross_compile tool
%prep
%setup -q
%build
./configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
/usr/local/
执行rpmbuild -bb gcchf.spec。报错如下:
xiexp@xiexp:/usr/src/ubuntu/SPECS$ rpmbuild -bb gcchf.spec
error: File /home/xiexp/rpmbuild/SOURCES/gcchf-4.9.tar.gz: No such file or directory
xiexp@xiexp:/usr/src/ubuntu/SPECS$ cd ..
xiexp@xiexp:/usr/src/ubuntu$ cd SOURCE/
xiexp@xiexp:/usr/src/ubuntu/SOURCE$ cd
xiexp@xiexp:~$ cd /home/xiexp/rpmbuild/SPECS/
xiexp@xiexp:~/rpmbuild/SPECS$ rpmbuild -bb gcchf.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.77tMqB
+ umask 022
+ cd /home/xiexp/rpmbuild/BUILD
+ cd /home/xiexp/rpmbuild/BUILD
+ rm -rf gcc-linaro-arm-linux-gnueabihf-4.9
+ /bin/gzip -dc /home/xiexp/rpmbuild/SOURCES/gcc-linaro-arm-linux-gnueabihf-4.9.tar.gz
+ /bin/tar -xf -
+ STATUS=0
+ [ 0 -ne 0 ]
+ cd gcc-linaro-arm-linux-gnueabihf-4.9
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.J7Ctma
+ umask 022
+ cd /home/xiexp/rpmbuild/BUILD
+ cd gcc-linaro-arm-linux-gnueabihf-4.9
+ ./configure
/var/tmp/rpm-tmp.J7Ctma: 26: /var/tmp/rpm-tmp.J7Ctma: ./configure: not found
error: Bad exit status from /var/tmp/rpm-tmp.J7Ctma (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.J7Ctma (%build)
查看加压之后的包,发现并没有Makefile文件。请问,我改这么进行修改呢
|