diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 7e3fc5e..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: vdrift -# $Id$ -NAME := vdrift -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/sources b/sources index e69de29..7748eb7 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +9fac2e17f550184f7338dd89cacb1b1f vdrift-2007-12-26-src.tar.bz2 diff --git a/vdrift-20071226-gcc4.3.patch b/vdrift-20071226-gcc4.3.patch new file mode 100644 index 0000000..df66354 --- /dev/null +++ b/vdrift-20071226-gcc4.3.patch @@ -0,0 +1,28 @@ +--- include/utility.h 2008-02-14 19:22:46.000000000 +0100 ++++ include/utility.h 2008-02-14 19:22:46.000000000 +0100 +@@ -100,7 +100,7 @@ public: + void SetBox(float x1, float y1, float x2, float y2, const TEXTURE_HANDLE * const texid, int texsize, float opacity); + void SetButton(float x1, float y1, float x2, float y2, float sidewidth, TEXTURE_HANDLE * texid, float opacity); + void SetEllipse( float center_x, float center_y, float radius_x, float radius_y, float color_r, float color_g, float color_b, float opacity ); +- void SetQuad( float x1, float y2, float x2, float y2, float x3, float y3, float x4, float y4, TEXTURE_HANDLE * texid, float opacity); ++ void SetQuad( float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, TEXTURE_HANDLE * texid, float opacity); + void SetRotation(float r) {rotation=r;} + + void SetDraw(const bool newdraw) {draw=newdraw;} +--- include/serialization.h 2008-02-14 19:30:02.000000000 +0100 ++++ include/serialization.h 2008-02-14 19:30:02.000000000 +0100 +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + + #include "simpletree.h" + +@@ -23,6 +24,7 @@ using std::ostream; + using std::ifstream; + using std::ofstream; + using std::pair; ++using std::memcmp; + + #define _GENERATEUID_(ptr,uidoutput) unsigned long long uidoutput = (size_t)ptr diff --git a/vdrift-20071226-jamfile.patch b/vdrift-20071226-jamfile.patch new file mode 100644 index 0000000..9823d41 --- /dev/null +++ b/vdrift-20071226-jamfile.patch @@ -0,0 +1,11 @@ +--- bullet-2.64/Jamfile.in 2008-02-15 06:55:36.000000000 -0600 ++++ bullet-2.64/Jamfile.in 2008-02-15 06:55:36.000000000 -0600 +@@ -60,7 +60,6 @@ + MsvcGenConfig GLEW.LIBS : glew32.lib ; + + SubInclude TOP src ; +-SubInclude TOP Extras ; +-SubInclude TOP Demos ; ++ + + Depends install_config : [ DoInstall bullet.pc : $(libdir)/pkgconfig ] ; diff --git a/vdrift-20071226-paths.patch b/vdrift-20071226-paths.patch new file mode 100644 index 0000000..384ea48 --- /dev/null +++ b/vdrift-20071226-paths.patch @@ -0,0 +1,13 @@ +--- SConstruct 2008-02-13 11:01:59.000000000 -0600 ++++ SConstruct 2008-02-13 11:01:59.000000000 -0600 +@@ -35,8 +35,8 @@ + cppdefines = [] + default_settingsdir = ".vdrift" + default_prefix = "/usr" +-default_datadir = "share/games/vdrift/data" +-default_bindir = "share/games/vdrift/bin" ++default_datadir = "/share/vdrift" ++default_bindir = "/bin" + + # convenience var for identifying a windows platform + diff --git a/vdrift-SConstruct.patch b/vdrift-SConstruct.patch new file mode 100644 index 0000000..1d7b368 --- /dev/null +++ b/vdrift-SConstruct.patch @@ -0,0 +1,13 @@ +--- SConstruct 2007-04-16 10:25:43.000000000 -0500 ++++ SConstruct 2007-04-16 10:28:02.000000000 -0500 +@@ -352,8 +352,8 @@ + # Subdirectories # + #----------------# + Export(['env', 'version', 'src_dir', 'bin_dir']) +-if 'install' in COMMAND_LINE_TARGETS: +- SConscript('data/SConscript') ++#if 'install' in COMMAND_LINE_TARGETS: ++# SConscript('data/SConscript') + + if 'src-package' in COMMAND_LINE_TARGETS: + SConscript('po/SConscript') diff --git a/vdrift.desktop b/vdrift.desktop new file mode 100644 index 0000000..95394dc --- /dev/null +++ b/vdrift.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=VDrift +GenericName=VDrift +Comment=Drift Racing Simulation +Exec=vdrift +Icon=vdrift +Terminal=false +StartupNotify=false +Type=Application +Categories=Game;SportsGame; diff --git a/vdrift.png b/vdrift.png new file mode 100644 index 0000000..1c6d657 Binary files /dev/null and b/vdrift.png differ diff --git a/vdrift.spec b/vdrift.spec new file mode 100644 index 0000000..efc25a1 --- /dev/null +++ b/vdrift.spec @@ -0,0 +1,137 @@ +Name: vdrift +Version: 20071226 +Release: 3%{?dist} +Summary: VDrift is a cross-platform, open source driving/drift racing simulation + +Group: Amusements/Games +License: GPLv2+ +URL: http://vdrift.net +Source0: %{name}-2007-12-26-src.tar.bz2 +#Original upstream: +#Source0: http://downloads.sourceforge.net/%{name}/%{name}-2007-12-26-src.tar.bz2 +# Modified: +# cd docs +# rm HOW_TO_COMPILE.txt SConscript INSTALL +# cd .. +# rm bullet-2.64/glew32.dll +# rm bullet-2.64/GLUT32.DLL +# rm -rf bullet-2.64/Glut +# rm -rf bullet-2.64/Extras +# rm -rf bullet-2.64/Demos + +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 +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 + +Requires: vdrift-data = %{version} + +%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). + +%prep + +%setup -qn vdrift + +%ifarch ppc ppc64 +sed -i 's/linuxx86/linuxppc/' src/SConscript +%endif + +%patch0 -p0 +%patch1 -p0 +%patch2 -p0 +%patch3 -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 +cd bullet-2.64 +%configure +jam bulletcollision bulletmath +cd .. + +CC="gcc" CXX="g++" CXXFLAGS="%{optflags}" scons destdir=%{buildroot} bin=/bin use_binreloc=0 release=1 os_cc=1 os_cxx=1 os_cxxflags=1 NLS=0 + +%install +rm -rf %{buildroot} +install -d %{buildroot}%{_bindir} +CC="gcc" CXX="g++" CXXFLAGS="%{optflags}" scons install destdir=%{buildroot} bin=/bin use_binreloc=0 release=1 os_cc=1 os_cxx=1 os_cxxflags=1 NLS=0 + +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,-) +%{_bindir}/vdrift +%doc docs/* +%{_datadir}/applications/fedora-vdrift.desktop +%{_datadir}/icons/hicolor/32x32/apps/vdrift.png + + +%changelog +* Fri Feb 15 2008 Jon Ciesla - 20071226-3 +- Multiple fixes for the review. + +* Thu Feb 14 2008 Jon Ciesla - 20071226-2 +- Multiple package fixes. + +* Tue Feb 12 2008 Jon Ciesla - 20071226-1 +- Updated to current release. + +* Wed Apr 18 2007 Jon Ciesla - 20070323-4 +- Added patch to fix mouse driving from thelusiv@gmail.com. + +* Mon Apr 16 2007 Jon Ciesla - 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 - 20070323-2 +- Split out minimal data. + +* Thu Mar 28 2007 Jon Ciesla - 20070323-1 +- Initial packaging