Blob Blame History Raw
Name: vdrift
Version:  20090615
Release:  1%{?dist}
Summary: Driving/drift racing simulation

Group: Amusements/Games 
License: GPLv2+
URL: http://vdrift.net
Source0: %{name}-2009-06-15-src.tar.bz2
#Original upstream:
#Source0: http://downloads.sourceforge.net/%{name}/%{name}-2009-06-15-src.tar.bz2
# Modified:
# cd docs
# rm SConscript INSTALL
# cd ..
# rm -rf tools/win

Source1: vdrift.desktop
Source2: vdrift.png
Patch0: vdrift-SConstruct.patch
Patch1: vdrift-20071226-paths.patch
#Patch2: vdrift-20071226-gcc4.3.patch
#Patch3: vdrift-20071226-jamfile.patch
Patch4:	vdrift-20090215-joepack-includes.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root%(%{__id_u} -n)
BuildRequires: SDL-devel
BuildRequires: SDL_image-devel
BuildRequires: SDL_net-devel
BuildRequires: SDL_gfx-devel
BuildRequires: scons
BuildRequires: libGL-devel
BuildRequires: openal-devel
BuildRequires: freealut-devel
BuildRequires: jam
BuildRequires: libvorbis-devel
BuildRequires: desktop-file-utils
BuildRequires: glew-devel
BuildRequires: boost-devel
BuildRequires: asio-devel

Requires: vdrift-data = %{version}
#Obsoletes:      vdrift-data <= 20071226
#Provides:       vdrift-data = %{version}-%{release}


%description
VDrift is a cross-platform, open source driving simulation made with drift 
racing in mind. It's powered by the excellent Vamos physics engine. It is
released under the GNU General Public License (GPL) v2. It is currently
available for Linux, FreeBSD, Mac OS X and Windows (Cygwin).

%package data
Summary: Driving/drift racing simulation data
Group: Amusements/Games 
Requires: vdrift = %{version}
BuildArch: noarch

%description data
VDrift is a cross-platform, open source driving simulation made with drift 
racing in mind. It's powered by the excellent Vamos physics engine. It is
released under the GNU General Public License (GPL) v2. It is currently
available for Linux, FreeBSD, Mac OS X and Windows (Cygwin).

These are the data files.

%prep

%setup -qn vdrift-2009-06-15

%ifarch ppc ppc64
sed -i 's/linuxx86/linuxppc/' src/SConscript
%endif

%patch0 -p0
%patch1 -p0
#%patch2 -p0
#%patch3 -p0
%patch4 -p0

#/bin/chmod -x src/gamestate.cpp
#/bin/chmod -x src/logo.cpp
#/bin/chmod -x src/objects.cpp
/bin/chmod -x src/main.cpp
/bin/chmod -x src/game.cpp


%build
#tar -xzf bullet-2.73-sp1.tgz
#/bin/chmod -x bullet-2.73/src/LinearMath/*.h
#cd bullet-2.73
#./autogen.sh
#./configure
#jam bulletcollision bulletmath
#cmake .
#make
#cd ..

CC="gcc" CXX="g++" CXXFLAGS="%{optflags}" scons bin=/bin use_binreloc=0 release=1 os_cc=1 os_cxx=1 os_cxxflags=1 NLS=0

%install
rm -rf %{buildroot}
# As described in the README scons install is broken so DIY
install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_datadir}
install -m 755 build/vdrift %{buildroot}%{_bindir}
cp -pr data %{buildroot}%{_datadir}/vdrift
rm `find %{buildroot}%{_datadir}/vdrift -name "SConscript*"`

mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install --vendor fedora            \
  --dir %{buildroot}%{_datadir}/applications \
 %{SOURCE1}

mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps
install -p -m 644 %{SOURCE2} \
  %{buildroot}%{_datadir}/icons/hicolor/32x32/apps

%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
  
%postun
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc docs/*
%{_bindir}/vdrift
%{_datadir}/applications/fedora-vdrift.desktop
%{_datadir}/icons/hicolor/32x32/apps/vdrift.png

%files data
%defattr(-,root,root,-)
%{_datadir}/vdrift

%changelog
* Tue Jun 30 2009 Jon Ciesla <limb@jcomserv.net> - 20090615-1
- Update to 2009-06-15.
- Split data into noarch subpackage, BZ 508079.

* Thu Feb 19 2009 Jon Ciesla <limb@jcomserv.net> - 20090215-1
- Update to 2009-02-15.
- Includes patch.

* Mon Nov 24 2008 Jon Ciesla <limb@jcomserv.net> - 20080805-3
- Cleaned up summary.

* Tue Oct 21 2008 Hans de Goede <hdegoede@redhat.com> - 20080805-2
- Actually install the data now that its merged into the main package

* Tue Aug 12 2008 Jon Ciesla <limb@jcomserv.net> - 20080805-1
- Update to new upstream.
- Dropped gcc4.3 and jamfile patches, applied upstream.
- Merged and obsolete/provided -data package, following upstream.
- Added glew-devel BR.

* Fri Feb 15 2008 Jon Ciesla <limb@jcomserv.net> - 20071226-3
- Multiple fixes for the review.

* Thu Feb 14 2008 Jon Ciesla <limb@jcomserv.net> - 20071226-2
- Multiple package fixes.

* Tue Feb 12 2008 Jon Ciesla <limb@jcomserv.net> - 20071226-1
- Updated to current release.

* Wed Apr 18 2007 Jon Ciesla <limb@jcomserv.net> - 20070323-4
- Added patch to fix mouse driving from thelusiv@gmail.com.

* Mon Apr 16 2007 Jon Ciesla <limb@jcomserv.net> - 20070323-3
- Corrected patch to allow build without minimal data.
- Added release=1 to scons options.
- Passing compiler flags to scons.
- Turned off translations.

* Mon Apr 04 2007 Jon Ciesla <limb@jcomserv.net> - 20070323-2
- Split out minimal data.

* Thu Mar 28 2007 Jon Ciesla <limb@jcomserv.net> - 20070323-1
- Initial packaging