SPECS: vdrift.spec - added FHS and desktop patches - cars and trac...

megabajt megabajt at pld-linux.org
Sun Apr 8 15:52:50 CEST 2007


Author: megabajt                     Date: Sun Apr  8 13:52:50 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added FHS and desktop patches
- cars and tracks splited into subpackages
- builds and works
- release 1

---- Files affected:
SPECS:
   vdrift.spec (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SPECS/vdrift.spec
diff -u SPECS/vdrift.spec:1.1 SPECS/vdrift.spec:1.2
--- SPECS/vdrift.spec:1.1	Sat Apr  7 11:18:59 2007
+++ SPECS/vdrift.spec	Sun Apr  8 15:52:44 2007
@@ -4,7 +4,7 @@
 Summary(pl.UTF-8):	Darmowy symulator wyścigów ze wspaniałą fizyką i grafiką
 Name:		vdrift
 Version:	%(echo %{_ver} | tr -d -)
-Release:	0.1
+Release:	1
 License:	GPL v2
 Group:		X11/Applications/Games
 Source0:	http://dl.sourceforge.net/vdrift/%{name}-%{_ver}-src.tar.bz2
@@ -12,14 +12,18 @@
 Source1:	http://dl.sourceforge.net/vdrift/%{name}-%{_ver}-data-full.tar.bz2
 # Source1-md5:	2136ce2e347a018f2400e3f114e005fd
 Patch0:		%{name}-gcc42.patch
+Patch1:		%{name}-desktop.patch
+Patch2:		%{name}-FHS.patch
 URL:		http://vdrift.net/
 BuildRequires:	OpenAL-devel
 BuildRequires:	SDL_gfx-devel
 BuildRequires:	SDL_image-devel
 BuildRequires:	SDL_net-devel
 BuildRequires:	freealut-devel
+BuildRequires:	gettext-devel
 BuildRequires:	scons
-BuildRequires:	FHS-fixes
+Requires:	vdrift-car-resources
+Requires:	vdrift-track-resources
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -52,23 +56,99 @@
 - Myszka/joystick/klawiatura menu ustawień
 - Wiele więcej...
 
+%package data-cars-base
+Summary:	Base cars for VDrift
+Summary(pl.UTF-8):	Podstawowe samochody dla VDrift
+Group:		X11/Applications/Games
+Provides:	vdrift-car-resources
+
+%description data-cars-base
+Base cars for VDrift.
+
+%description data-cars-base -l pl.UTF-8
+Podstawowe samochody dla VDrift.
+
+%package data-cars-extra
+Summary:	Extra cars for VDrift
+Summary(pl.UTF-8):	Dodatkowe samochody dla VDrift
+Group:		X11/Applications/Games
+Provides:	vdrift-car-resources
+
+%description data-cars-extra
+Extra cars for VDrift.
+
+%description data-cars-extra -l pl.UTF-8
+Dodatkowe samochody dla VDrift.
+
+%package data-tracks-base
+Summary:	Base tracks for VDrift
+Summary(pl.UTF-8):	Podstawowe trasy dla VDrift
+Group:		X11/Applications/Games
+Provides:	vdrift-track-resources
+
+%description data-tracks-base
+Base tracks for VDrift.
+
+%description data-tracks-base -l pl.UTF-8
+Podstawowe trasy dla VDrift.
+
+%package data-tracks-extra
+Summary:	Extra tracks for VDrift
+Summary(pl.UTF-8):	Dodatkowe trasy dla VDrift
+Group:		X11/Applications/Games
+Provides:	vdrift-track-resources
+
+%description data-tracks-extra
+Extra tracks for VDrift.
+
+%description data-tracks-extra -l pl.UTF-8
+Dodatkowe trasy dla VDrift.
+
 %prep
-%setup -q -n %{name}-%{_ver}-src -a0 -a1 -c -T
+%setup -q -c -a1
 %patch0 -p1
-mv vdrift-%{_ver}-src/data/* ./build/vdrift-%{_ver}-src/data/
+%patch1 -p1
+%patch2 -p1
+
+mv vdrift-%{_ver}-src/data/* build/vdrift-%{_ver}-src/data/
 
 %build
-cd build/%{name}-%{_ver}-src/
-scons
+cd build/%{name}-%{_ver}-src
+export CC='%{__cc}'
+export CXX='%{__cxx}'
+export CXXFLAGS='%{rpmcxxflags}'
+%scons \
+	destdir=$RPM_BUILD_ROOT \
+	prefix=%{_prefix} \
+	bindir=bin/ \
+	datadir=share/games/vdrift/data \
+	release=1 \
+	os_cc=1 \
+	os_cxx=1 \
+	os_cxxflags=1 \
+	NLS=1
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/%{_bindir}
+install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
+
+cd build/%{name}-%{_ver}-src
 
-cd build/%{name}-%{_ver}-src/
-scons install \
-	prefix=$RPM_BUILD_ROOT/usr/
-ln -s %{_datadir}/games/vdrift/bin/vdrift $RPM_BUILD_ROOT%{_bindir}/vdrift
+export CC='%{__cc}'
+export CXX='%{__cxx}'
+export CXXFLAGS='%{rpmcxxflags}'
+%scons install \
+	destdir=$RPM_BUILD_ROOT \
+	prefix=%{_prefix} \
+	bindir=bin/ \
+	os_cc=1 \
+	os_cxx=1 \
+	os_cxxflags=1 \
+	datadir=share/games/vdrift/data \
+	NLS=1
+
+install tools/autopackage/vdrift.desktop $RPM_BUILD_ROOT%{_desktopdir}
+install data/textures/icons/vdrift-64x64.png $RPM_BUILD_ROOT%{_pixmapsdir}/vdrift.png
 
 cd ../..
 
@@ -79,10 +159,80 @@
 
 %files -f VDrift.lang
 %defattr(644,root,root,755)
+%doc build/%{name}-%{_ver}-src/docs/{AUTHORS,ChangeLog,NEWS,README,TODO,VAMOS.txt}
 %attr(755,root,root) %{_bindir}/vdrift
-# IT HAS TO BE FIXED!!!
-%attr(755,root,root) %{_datadir}/games/vdrift/bin/vdrift
-%{_datadir}/games/vdrift
+%dir %{_datadir}/games/vdrift
+%dir %{_datadir}/games/vdrift/data
+%dir %{_datadir}/games/vdrift/data/cars
+%{_datadir}/games/vdrift/data/lists
+%{_datadir}/games/vdrift/data/settings
+%dir %{_datadir}/games/vdrift/data/skins
+%{_datadir}/games/vdrift/data/skins/simple
+%{_datadir}/games/vdrift/data/skins/x1
+%{_datadir}/games/vdrift/data/sounds
+%{_datadir}/games/vdrift/data/textures
+%dir %{_datadir}/games/vdrift/data/tracks
+%{_desktopdir}/vdrift.desktop
+%{_pixmapsdir}/vdrift.png
+
+%files data-cars-base
+%defattr(644,root,root,755)
+%{_datadir}/games/vdrift/data/cars/CO
+%{_datadir}/games/vdrift/data/cars/FF
+%{_datadir}/games/vdrift/data/cars/TL2
+%{_datadir}/games/vdrift/data/cars/XS
+
+%files data-cars-extra
+%defattr(644,root,root,755)
+%{_datadir}/games/vdrift/data/cars/3S
+%{_datadir}/games/vdrift/data/cars/AX2
+%{_datadir}/games/vdrift/data/cars/C7
+%{_datadir}/games/vdrift/data/cars/CS
+%{_datadir}/games/vdrift/data/cars/CT
+%{_datadir}/games/vdrift/data/cars/F1
+%{_datadir}/games/vdrift/data/cars/FE
+%{_datadir}/games/vdrift/data/cars/G4
+%{_datadir}/games/vdrift/data/cars/GT
+%{_datadir}/games/vdrift/data/cars/M3
+%{_datadir}/games/vdrift/data/cars/M7
+%{_datadir}/games/vdrift/data/cars/M8
+%{_datadir}/games/vdrift/data/cars/MC
+%{_datadir}/games/vdrift/data/cars/MI
+%{_datadir}/games/vdrift/data/cars/NS
+%{_datadir}/games/vdrift/data/cars/RG
+%{_datadir}/games/vdrift/data/cars/RS2
+%{_datadir}/games/vdrift/data/cars/SB
+%{_datadir}/games/vdrift/data/cars/T73
+%{_datadir}/games/vdrift/data/cars/TC
+%{_datadir}/games/vdrift/data/cars/TL
+%{_datadir}/games/vdrift/data/cars/XG
+%{_datadir}/games/vdrift/data/cars/XM
+%{_datadir}/games/vdrift/data/cars/Z06
+
+%files data-tracks-base
+%defattr(644,root,root,755)
+%{_datadir}/games/vdrift/data/tracks/lagunaseca
+%{_datadir}/games/vdrift/data/tracks/zandvoort
+
+%files data-tracks-extra
+%defattr(644,root,root,755)
+%{_datadir}/games/vdrift/data/tracks/barcelona
+%{_datadir}/games/vdrift/data/tracks/brands
+%{_datadir}/games/vdrift/data/tracks/detroit
+%{_datadir}/games/vdrift/data/tracks/dijon
+%{_datadir}/games/vdrift/data/tracks/hockenheim
+%{_datadir}/games/vdrift/data/tracks/jarama
+%{_datadir}/games/vdrift/data/tracks/kyalami
+%{_datadir}/games/vdrift/data/tracks/lemans
+%{_datadir}/games/vdrift/data/tracks/monaco
+%{_datadir}/games/vdrift/data/tracks/monza
+%{_datadir}/games/vdrift/data/tracks/mosport
+%{_datadir}/games/vdrift/data/tracks/neurburgring_nordschleife
+%{_datadir}/games/vdrift/data/tracks/pau
+%{_datadir}/games/vdrift/data/tracks/road_atlanta
+%{_datadir}/games/vdrift/data/tracks/ruudskogen
+%{_datadir}/games/vdrift/data/tracks/spa
+%{_datadir}/games/vdrift/data/tracks/weekend
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -90,6 +240,12 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2007/04/08 13:52:44  megabajt
+- added FHS and desktop patches
+- cars and tracks splited into subpackages
+- builds and works
+- release 1
+
 Revision 1.1  2007/04/07 09:18:59  megabajt
 - new by Piotr Grymkowski <grym3k at o2.pl>
 - needs FHS fixes
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/vdrift.spec?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list