TheBigRed
16th January 2012, 06:36 PM
Hi,
when trying to build a rpm package from the current game speed-dreams,
with the attached rpm spec file, build processs fails with the following error message:
the directory speed-dreams-src-base-2.0.0-rc1-r4420 is not build.
[martin@fc16 ~]$ rpmbuild -ba speed-dreams.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.UqkUYY
+ umask 022
+ cd /home/martin/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/martin/rpmbuild/BUILD
+ rm -rf speed-dreams-src-base-2.0.0-rc1-r4420
+ /bin/tar -xf -
+ /usr/bin/xz -dc /home/martin/rpmbuild/SOURCES/speed-dreams-src-base-2.0.0-rc1-r4420.tar.xz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd speed-dreams-src-base-2.0.0-rc1-r4420
/var/tmp/rpm-tmp.UqkUYY: line 42: cd: speed-dreams-src-base-2.0.0-rc1-r4420: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.UqkUYY (%prep)
used rpm spec file:
%define _pkgbuilddir %{_builddir}/%{name}_%{version}
%define real_ver rc1-r4420
%define pkg_name speed-dreams-2
Summary: The Open Racing Car Simulator
Name: speed-dreams
Version: 2.0.0
Release: rc1_r4420.5%{?dist}
License: GPLv2+
Group: Amusements/Games
URL: http://speed-dreams.org/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-src-base-%{version}-rc1-r4420.tar.xz
Source1: speed-dreams.desktop
Requires: opengl-games-utils
BuildRequires: cmake
BuildRequires: SDL-devel
BuildRequires: desktop-file-utils
BuildRequires: enet-devel >= 1.2
BuildRequires: freealut-devel >= 1.1.0-10
BuildRequires: freeglut-devel
BuildRequires: libGL-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libXi-devel
BuildRequires: libXmu-devel
BuildRequires: libXrandr-devel
BuildRequires: p7zip
BuildRequires: plib-devel >= 1.8.3
%description
Speed-Dreams is a 3D racing cars simulator using OpenGL. A Fork of TORCS. The goal is to have
programmed robots drivers racing against each others. You can also drive
yourself with either a wheel, keyboard or mouse.
%package robots-base
Summary: The Open Racing Car Simulator additional dirt tracks
Group: Amusements/Games
Requires: speed-dreams
%description robots-base
Speed Dreams is a 3D racing cars simulator using OpenGL. A Fork of TORCS. The goal is to have
programmed robots drivers racing against each others. You can also drive
yourself with either a wheel, keyboard or mouse.
This package contains additional tracks for the game.
%package devel
Summary: The Open Racing Car Simulator additional oval tracks
Group: Amusements/Games
Requires: speed-dreams = %{name}-src-base-%{version}-rc1-r4420
%description devel
Speed Dreams is a 3D racing cars simulator using OpenGL. The goal is to have
programmed robots drivers racing against each others. You can also drive
yourself with either a wheel, keyboard or mouse.
This package contains the development files for the game.
%prep
%setup -q -n %{name}-src-base-%{version}-rc1-r4420
%build
%cmake -DCMAKE_INSTALL_PREFIX:PATH="%{_prefix}" \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DOPTION_DEBUG:STRING=OFF \
-DOPTION_OFFICIAL_ONLY:BOOL=ON
make %{?_smp_mflags}
%install
%{__rm} -rf %{buildroot}
cd %{name}-src-base-%{version}-rc1-r4420-src
%{__make} install DESTDIR=%{buildroot}
# Icon for the desktop file
%{__install} -D -p -m 0644 data/data/icons/icon.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
%{__install} -dm 755 %{buildroot}%{_datadir}/pixmaps
%{__install} -D -p -m 755 data/data/img/*.png %{buildroot}%{_datadir}/pixmaps
%{__install} -dm 755 %{buildroot}%{_datadir}/games/%{name}
%{__install} -D -p -m 755 data/data/icons/icon.* %{buildroot}%{_datadir}/games/%{name}
%{__install} -dm 755 %{buildroot}%{_libdir}/games/%{name}/lib
%{__install} -D -p -m 755 src/modules/simu/simuv2.1/SOLID-2.0/src/libsolid.so %{buildroot}%{_libdir}/games/%{pkg_name}/lib/
desktop-file-install \
--vendor "" \
--dir %{buildroot}%{_datadir}/applications \
%{SOURCE1}
# We need this for proper automatic stripping to take place (still in 1.3.0)
find %{buildroot}%{_libdir}/games/ -name '*.so' | xargs %{__chmod} +x
# remove cmake files
find $RPM_BUILD_ROOT -type f -name "*.cmake" -exec rm -f {} ';'
%files
# Directory default mode of 0755 is MANDATORY, since installed dirs are 0777
%defattr(-,root,root,0755)
%doc %{name}-src-base-%{version}-rc1-r4420-src/COPYING.txt %{name}-src-base-%{version}-rc1-r4420-src/README.txt
%{_datadir}/games/%{pkg_name}/*.txt
%{_libdir}/games/%{pkg_name}/lib/libsolid.so
/usr/games/*
%{_libdir}/games/%{pkg_name}/*
%{_datadir}/pixmaps/*.png
%{_datadir}/games/%{name}/icon.*
%files robots-base
%defattr(-,root,root,-)
# data packages, installs tracks, car models, fonts ...
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/games/%{name}/
%{_datadir}/games/%{pkg_name}/*
%files devel
%defattr(-,root,root,-)
%{_includedir}/%{pkg_name}/*
%changelog
* Mon Jan 16 2012 Martin Gansser <linux4martin@gmx.de> 2.0.0-rc1-r4420-5
- new release
* Sat Oct 31 2011 Martin Gansser <linux4martin@gmx.de> 2.0.0-b1-r3937-4
- deactivate DOPTION_DEBUG
- activate SKIP_RPATH
* Sun Oct 16 2011 Mario Blättermann <mariobl@fedoraproject.org> 2.0.0-b1-r3937-3
- Removed unneeded definitions of BuildRoot, clean section
- Corrected URL
- Moved the *.desktop file to a real file as second source
- Removed unneeded BuildRequires
* Fri Oct 14 2011 Martin Gansser <linux4martin@gmx.de> 2.0.0-b1-r3937-2
- copy libsolid.so to SD lib dir
* Mon Oct 4 2011 Martin Gansser <linux4martin@gmx.de> 2.0.0-b1-r3937-1
- new version for Fedora 15
* Thu Jun 24 2010 Martin Gansser <linux4martin@gmx.de> 1.4.0-r2307-2
- initial version for Fedora 13
what is necessary to change in the spec file ?
Thanks
when trying to build a rpm package from the current game speed-dreams,
with the attached rpm spec file, build processs fails with the following error message:
the directory speed-dreams-src-base-2.0.0-rc1-r4420 is not build.
[martin@fc16 ~]$ rpmbuild -ba speed-dreams.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.UqkUYY
+ umask 022
+ cd /home/martin/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/martin/rpmbuild/BUILD
+ rm -rf speed-dreams-src-base-2.0.0-rc1-r4420
+ /bin/tar -xf -
+ /usr/bin/xz -dc /home/martin/rpmbuild/SOURCES/speed-dreams-src-base-2.0.0-rc1-r4420.tar.xz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd speed-dreams-src-base-2.0.0-rc1-r4420
/var/tmp/rpm-tmp.UqkUYY: line 42: cd: speed-dreams-src-base-2.0.0-rc1-r4420: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.UqkUYY (%prep)
used rpm spec file:
%define _pkgbuilddir %{_builddir}/%{name}_%{version}
%define real_ver rc1-r4420
%define pkg_name speed-dreams-2
Summary: The Open Racing Car Simulator
Name: speed-dreams
Version: 2.0.0
Release: rc1_r4420.5%{?dist}
License: GPLv2+
Group: Amusements/Games
URL: http://speed-dreams.org/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-src-base-%{version}-rc1-r4420.tar.xz
Source1: speed-dreams.desktop
Requires: opengl-games-utils
BuildRequires: cmake
BuildRequires: SDL-devel
BuildRequires: desktop-file-utils
BuildRequires: enet-devel >= 1.2
BuildRequires: freealut-devel >= 1.1.0-10
BuildRequires: freeglut-devel
BuildRequires: libGL-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libXi-devel
BuildRequires: libXmu-devel
BuildRequires: libXrandr-devel
BuildRequires: p7zip
BuildRequires: plib-devel >= 1.8.3
%description
Speed-Dreams is a 3D racing cars simulator using OpenGL. A Fork of TORCS. The goal is to have
programmed robots drivers racing against each others. You can also drive
yourself with either a wheel, keyboard or mouse.
%package robots-base
Summary: The Open Racing Car Simulator additional dirt tracks
Group: Amusements/Games
Requires: speed-dreams
%description robots-base
Speed Dreams is a 3D racing cars simulator using OpenGL. A Fork of TORCS. The goal is to have
programmed robots drivers racing against each others. You can also drive
yourself with either a wheel, keyboard or mouse.
This package contains additional tracks for the game.
%package devel
Summary: The Open Racing Car Simulator additional oval tracks
Group: Amusements/Games
Requires: speed-dreams = %{name}-src-base-%{version}-rc1-r4420
%description devel
Speed Dreams is a 3D racing cars simulator using OpenGL. The goal is to have
programmed robots drivers racing against each others. You can also drive
yourself with either a wheel, keyboard or mouse.
This package contains the development files for the game.
%prep
%setup -q -n %{name}-src-base-%{version}-rc1-r4420
%build
%cmake -DCMAKE_INSTALL_PREFIX:PATH="%{_prefix}" \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DOPTION_DEBUG:STRING=OFF \
-DOPTION_OFFICIAL_ONLY:BOOL=ON
make %{?_smp_mflags}
%install
%{__rm} -rf %{buildroot}
cd %{name}-src-base-%{version}-rc1-r4420-src
%{__make} install DESTDIR=%{buildroot}
# Icon for the desktop file
%{__install} -D -p -m 0644 data/data/icons/icon.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
%{__install} -dm 755 %{buildroot}%{_datadir}/pixmaps
%{__install} -D -p -m 755 data/data/img/*.png %{buildroot}%{_datadir}/pixmaps
%{__install} -dm 755 %{buildroot}%{_datadir}/games/%{name}
%{__install} -D -p -m 755 data/data/icons/icon.* %{buildroot}%{_datadir}/games/%{name}
%{__install} -dm 755 %{buildroot}%{_libdir}/games/%{name}/lib
%{__install} -D -p -m 755 src/modules/simu/simuv2.1/SOLID-2.0/src/libsolid.so %{buildroot}%{_libdir}/games/%{pkg_name}/lib/
desktop-file-install \
--vendor "" \
--dir %{buildroot}%{_datadir}/applications \
%{SOURCE1}
# We need this for proper automatic stripping to take place (still in 1.3.0)
find %{buildroot}%{_libdir}/games/ -name '*.so' | xargs %{__chmod} +x
# remove cmake files
find $RPM_BUILD_ROOT -type f -name "*.cmake" -exec rm -f {} ';'
%files
# Directory default mode of 0755 is MANDATORY, since installed dirs are 0777
%defattr(-,root,root,0755)
%doc %{name}-src-base-%{version}-rc1-r4420-src/COPYING.txt %{name}-src-base-%{version}-rc1-r4420-src/README.txt
%{_datadir}/games/%{pkg_name}/*.txt
%{_libdir}/games/%{pkg_name}/lib/libsolid.so
/usr/games/*
%{_libdir}/games/%{pkg_name}/*
%{_datadir}/pixmaps/*.png
%{_datadir}/games/%{name}/icon.*
%files robots-base
%defattr(-,root,root,-)
# data packages, installs tracks, car models, fonts ...
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/games/%{name}/
%{_datadir}/games/%{pkg_name}/*
%files devel
%defattr(-,root,root,-)
%{_includedir}/%{pkg_name}/*
%changelog
* Mon Jan 16 2012 Martin Gansser <linux4martin@gmx.de> 2.0.0-rc1-r4420-5
- new release
* Sat Oct 31 2011 Martin Gansser <linux4martin@gmx.de> 2.0.0-b1-r3937-4
- deactivate DOPTION_DEBUG
- activate SKIP_RPATH
* Sun Oct 16 2011 Mario Blättermann <mariobl@fedoraproject.org> 2.0.0-b1-r3937-3
- Removed unneeded definitions of BuildRoot, clean section
- Corrected URL
- Moved the *.desktop file to a real file as second source
- Removed unneeded BuildRequires
* Fri Oct 14 2011 Martin Gansser <linux4martin@gmx.de> 2.0.0-b1-r3937-2
- copy libsolid.so to SD lib dir
* Mon Oct 4 2011 Martin Gansser <linux4martin@gmx.de> 2.0.0-b1-r3937-1
- new version for Fedora 15
* Thu Jun 24 2010 Martin Gansser <linux4martin@gmx.de> 1.4.0-r2307-2
- initial version for Fedora 13
what is necessary to change in the spec file ?
Thanks