SPECS: toycars.spec - add track editor - it's separate project, but some fi...

lisu lisu at pld-linux.org
Tue Nov 25 16:54:34 CET 2008


Author: lisu                         Date: Tue Nov 25 15:54:34 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- add track editor - it's separate project, but some files are the same
- bcond for track editor (on by default)
- BR: fltk-gl-devel for track editor

---- Files affected:
SPECS:
   toycars.spec (1.9 -> 1.10) 

---- Diffs:

================================================================
Index: SPECS/toycars.spec
diff -u SPECS/toycars.spec:1.9 SPECS/toycars.spec:1.10
--- SPECS/toycars.spec:1.9	Tue Nov 25 14:56:16 2008
+++ SPECS/toycars.spec	Tue Nov 25 16:54:28 2008
@@ -1,6 +1,11 @@
 # $Revision$, $Date$
 # NOTE:
 # There is no sound since version 0.3.4, because sound system requires FMOD Ex library to run. Everyone who wants sound can install FMOD Ex on one's own.
+#
+# Conditional build
+%bcond_without	editor	# don't build track editor
+#
+%define 	editor_ver	0.1.0	
 Summary:	Physics-based 2D racing game
 Summary(pl.UTF-8):	Gra wyścigowa 2D oparta na prawach fizyki
 Name:		toycars
@@ -10,7 +15,9 @@
 Group:		X11/Applications/Games
 Source0:	http://dl.sourceforge.net/toycars/%{name}-%{version}.tar.gz
 # Source0-md5:	e8e7a868e2f2dcb2947ca8ffb860b36c
-Source1:	%{name}.desktop
+Source1:	http://dl.sourceforge.net/toycars/%{name}_track_editor-%{editor_ver}.tar.gz
+# Source1-md5:	005cf7ebe50ad48e99075edc6e575d31
+Source2:	%{name}.desktop
 Patch0:		%{name}-headers.patch
 URL:		http://sourceforge.net/projects/toycars/
 BuildRequires:	OpenGL-GLU-devel
@@ -19,6 +26,7 @@
 BuildRequires:	SDL_mixer-devel
 BuildRequires:	autoconf >= 2.61
 BuildRequires:	automake
+%{?with_editor:BuildRequires:	fltk-gl-devel}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -33,9 +41,15 @@
 Jupiter's Masterdrive na Atari ST.
 
 %prep
-%setup -q
+%setup -q -a 1
 %patch0 -p1
 
+%if %{with editor}
+# copy the same file instead of patching it again
+cp src/Startline.cpp %{name}_track_editor-%{editor_ver}/src
+%{__perl} -pi -e 's at Fl/@FL/@' %{name}_track_editor-%{editor_ver}/src/TrackView.cxx
+%endif
+
 %build
 %{__aclocal} -I m4
 %{__autoconf}
@@ -44,6 +58,16 @@
 %configure
 %{__make}
 
+%if %{with editor}
+cd %{name}_track_editor-%{editor_ver}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure
+%{__make}
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
@@ -51,9 +75,13 @@
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
+install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
 install data/images/title.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
 
+%if %{with editor}
+	install %{name}_track_editor-%{editor_ver}/src/%{name}_track_editor $RPM_BUILD_ROOT%{_bindir}
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -71,6 +99,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.10  2008/11/25 15:54:28  lisu
+- add track editor - it's separate project, but some files are the same
+- bcond for track editor (on by default)
+- BR: fltk-gl-devel for track editor
+
 Revision 1.9  2008/11/25 13:56:16  lisu
 - 0.3.7
 - assert.patch is unneeded
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/toycars.spec?r1=1.9&r2=1.10&f=u



More information about the pld-cvs-commit mailing list