rpms/maniadrive/devel maniadrive-1.2-fixes.patch, NONE, 1.1 maniadrive-track-editor.desktop, NONE, 1.1 maniadrive.desktop, NONE, 1.1 maniadrive.png, NONE, 1.1 maniadrive.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Mon Sep 3 19:18:52 UTC 2007


Author: jwrdegoede

Update of /cvs/extras/rpms/maniadrive/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25996/devel

Modified Files:
	.cvsignore sources 
Added Files:
	maniadrive-1.2-fixes.patch maniadrive-track-editor.desktop 
	maniadrive.desktop maniadrive.png maniadrive.spec 
Log Message:

initial maniadrive import


maniadrive-1.2-fixes.patch:

--- NEW FILE maniadrive-1.2-fixes.patch ---
diff -up ManiaDrive-1.2-src/raydium/ode.h.foobar ManiaDrive-1.2-src/raydium/ode.h
--- ManiaDrive-1.2-src/raydium/ode.h.foobar	2006-08-11 12:11:13.000000000 +0200
+++ ManiaDrive-1.2-src/raydium/ode.h	2007-08-12 00:30:29.000000000 +0200
@@ -11,7 +11,7 @@
 // ugly workaround to avoid odemath.h ...
 #define _ODE_ODEMATH_H_
 #endif
-#include "../ode/include/ode/ode.h"
+#include <ode/ode.h>
 
 #define RAYDIUM_ODE_MAX_OBJECTS			64
 #define RAYDIUM_ODE_MAX_ELEMENTS		256
diff -up ManiaDrive-1.2-src/raydium/php.c.foobar ManiaDrive-1.2-src/raydium/php.c
--- ManiaDrive-1.2-src/raydium/php.c.foobar	2006-08-13 03:55:37.000000000 +0200
+++ ManiaDrive-1.2-src/raydium/php.c	2007-08-12 00:33:15.000000000 +0200
@@ -151,6 +151,7 @@ int raydium_php_exec(char *name)  
     raydium_php_init_request(name);
 
     zend_llist_init(&global_vars, sizeof(char *), NULL, 0);
+    zend_alter_ini_entry("safe_mode", 10, "0", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
     zend_alter_ini_entry("html_errors", 12, "0", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
     zend_alter_ini_entry("max_execution_time", 19, "0", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
     zend_alter_ini_entry("default_socket_timeout",23,"10",2, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
@@ -301,7 +302,7 @@ sapi_globals = ts_resource(sapi_globals_
 tsrm_ls = ts_resource(0);
 #endif
 raydium_sapi_module.phpinfo_as_text=1;
-path=malloc(strlen(PHP_INI_PATH));
+path=malloc(strlen(PHP_INI_PATH)+1);
 strcpy(path,PHP_INI_PATH);
 raydium_sapi_module.php_ini_path_override=path;
 sapi_startup(&raydium_sapi_module);
diff -up ManiaDrive-1.2-src/mania_drive.c.foobar ManiaDrive-1.2-src/mania_drive.c
--- ManiaDrive-1.2-src/mania_drive.c.foobar	2006-08-21 22:56:03.000000000 +0200
+++ ManiaDrive-1.2-src/mania_drive.c	2007-08-12 00:30:29.000000000 +0200
@@ -19,7 +19,7 @@ char *version="ManiaDrive 1.2custom";
 #define STORY_FILE_PRO		"mania_drive.story.pro"
 #define HISTORY_STATE_FILE	raydium_file_home_path("mania_drive.state")
 
-#define MUSIC_MENU	"mania_music/i_got_it_bad_-_The_Napoleon_Blown_Aparts.ogg"
+#define MUSIC_MENU	"mania_music/893_[Black_moon]_The_devil_into_you_[Creative_Commons___by_2.0]_[www.dogmazic.net].ogg"
 #define RESOLUTION_LIST "320x240\n640x480\n800x600\n1024x768"
 
 GLfloat sun[]={1.0,0.9,0.5,1.0};
@@ -2493,6 +2493,7 @@ int full_sx_i,full_sy_i;
 int mode;
 
 raydium_init_args_name(argc,argv,"mania_drive");
+chdir("/usr/share/maniadrive");
 
 raydium_parser_db_get("ManiaDrive-Windowed",str,"0");
 windowed_mode=atoi(str);
@@ -2559,7 +2560,7 @@ raydium_parser_db_get("ManiaDrive-Camera
 camera_lag=(lagActive[0]=='y'?1:0);
 sscanf(lagSpeed,"%f",&camera_lag_speed);
 
-raydium_parser_db_get("ManiaDrive-ShadowSupport",str,"1");
+raydium_parser_db_get("ManiaDrive-ShadowSupport",str,"0");
 shadow_support=atoi(str);
 
 raydium_parser_db_get("ManiaDrive-MusicVolume",str,"1.0");
diff -up ManiaDrive-1.2-src/mania2.c.foobar ManiaDrive-1.2-src/mania2.c
--- ManiaDrive-1.2-src/mania2.c.foobar	2006-08-17 15:36:32.000000000 +0200
+++ ManiaDrive-1.2-src/mania2.c	2007-08-12 00:30:29.000000000 +0200
@@ -15,7 +15,7 @@ char *title="CQFD Corp. Mania2";
 #ifdef WIN32
 #define MANIA_BINARY "mania_drive.exe"
 #else
-#define MANIA_BINARY "./mania_drive.static"
+#define MANIA_BINARY "/usr/bin/maniadrive"
 #endif
 
 
@@ -1027,6 +1027,7 @@ data_init();
 current_track[0]=0;
 
 raydium_init_args_name(argc,argv,"mania_drive");
+chdir("/usr/share/maniadrive");
 
 raydium_window_create(700,700,RAYDIUM_RENDERING_WINDOW,window);
 
diff -up ManiaDrive-1.2-src/Makefile.foobar ManiaDrive-1.2-src/Makefile
--- ManiaDrive-1.2-src/Makefile.foobar	2006-07-22 12:52:04.000000000 +0200
+++ ManiaDrive-1.2-src/Makefile	2007-08-12 00:30:29.000000000 +0200
@@ -7,8 +7,8 @@ CC = gcc
 CC = gcc
 AR = ar
 RANLIB = ranlib
-SYSTEM_LIBS =  -lGL -lGLU -lXinerama -lm -ljpeg -lopenal -lalut -lvorbis -lvorbisfile -logg -lresolv -lcrypt -lz -lcurl -lxml2 -lGLEW
+SYSTEM_LIBS =  -lGL -lGLU -lXinerama -lm -ljpeg -lopenal -lalut -lvorbisfile -lGLEW
-OTHER_LIBS =  raydium/ode/lib/libode.a raydium/php/libs/libphp5.a
+OTHER_LIBS = -lode -lphp5
 INCLUDE_PATH =  -Iraydium/ode/include/ -Iraydium/php/ -Iraydium/php/include -Iraydium/php/main/ -Iraydium/php/Zend -Iraydium/php/TSRM -I/usr/include/curl
 LIBS_PATH =  -L/usr/X11R6/lib/
 CFLAGS=-Wall


--- NEW FILE maniadrive-track-editor.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=ManiaDrive Track Editor
Comment=Create new tracks for ManiaDrive
Exec=maniadrive-track-editor
Icon=maniadrive.png
Terminal=false
StartupNotify=false
Type=Application
Categories=Game;SportsGame;


--- NEW FILE maniadrive.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=ManiaDrive
Comment=Drive a car on acrobatic tracks
Exec=maniadrive
Icon=maniadrive.png
Terminal=false
StartupNotify=false
Type=Application
Categories=Game;SportsGame;


--- NEW FILE maniadrive.spec ---
Name:           maniadrive
Version:        1.2
Release:        2%{?dist}
Summary:        3D stunt driving game
Group:          Amusements/Games
License:        GPLv2+
URL:            http://maniadrive.raydium.org/
Source0:        http://downloads.sourceforge.net/%{name}/ManiaDrive-%{version}-src.tar.gz
Source1:        %{name}.png
Source2:        %{name}.desktop
Source3:        %{name}-track-editor.desktop
Patch0:         %{name}-1.2-fixes.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  glew-devel ode-devel php-devel php-embedded-devel
BuildRequires:  freealut-devel libjpeg-devel libXinerama-devel
BuildRequires:  libvorbis-devel desktop-file-utils
Requires:       %{name}-data = %{version}, php-soap, hicolor-icon-theme
# for people who try to install this using upstream capitalization
Provides:       ManiaDrive = %{version}-%{release}

%description
ManiaDrive is an arcade car game on acrobatic tracks, with a quick and nervous
gameplay (tracks almost never exceed one minute). Features: Complex car
physics, Challenging "story mode", LAN and Internet mode, Live scores,
Track editor, Dedicated server with HTTP interface and More than 30 blocks.


%package track-editor
Summary:        ManiaDrive track editor
Group:          Amusements/Games
Requires:       %{name} = %{version}-%{release}

%description track-editor
Track editor for ManiaDrive, an arcade car game on acrobatic tracks.


# upstream only does raydium svn snapshots, the closest thing to a release
# schedule are the snapshots included in maniadrive, so we package the included
# raydium snapshot as raydium
  
%package -n raydium
Summary:        3D stunt driving game
Group:          System Environment/Libraries
URL:            http://raydium.org/

%description -n raydium
Raydium is a game engine. It provides a set of functions which allow quick and
flexible games creation. There are a lot of other 3D/game engines (and some
are very complete, such as Ogre, Crystal Space, etc). Raydium does not try to
be as complex as these engines, but on the contrary is aiming at quick and
simple development.


%package -n raydium-devel
Summary:        Development files for raydium
Group:          Development/Libraries
Requires:       raydium = %{version}-%{release}
Requires:       php-devel glew-devel freealut-devel libjpeg-devel ode-devel
Requires:       libvorbis-devel

%description -n raydium-devel
The raydium-devel package contains libraries and header files for
developing applications that use raydium.


%prep
%setup -q -n ManiaDrive-%{version}-src
%patch0 -p1
rm -r rayphp/r3s rayphp/README


%build
# note the Makefile builds raydium, not maniadrive !
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -fPIC `php-config --includes`" \
  LINKING_OPTIONS=-Wl,-soname,libraydium-%{version}.so
  
# only one C-file and no makefile for maniadrive and the editor, so DIY
gcc $RPM_OPT_FLAGS -o %{name} `php-config --includes` -DFORCE_LIBRAYDIUM \
  mania_drive.c -L. -lraydium

gcc $RPM_OPT_FLAGS -o %{name}-track-editor `php-config --includes` \
  -DFORCE_LIBRAYDIUM mania2.c -L. -lraydium


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_libdir}
mkdir -p $RPM_BUILD_ROOT%{_includedir}/raydium/headers
mkdir -p $RPM_BUILD_ROOT%{_datadir}/raydium
install -m 755 %{name} $RPM_BUILD_ROOT%{_bindir}
install -m 755 %{name}-track-editor $RPM_BUILD_ROOT%{_bindir}
install -m 755 libraydium.so.0.0 \
  $RPM_BUILD_ROOT%{_libdir}/libraydium-%{version}.so
ln -s libraydium-%{version}.so $RPM_BUILD_ROOT%{_libdir}/libraydium.so
install -p -m 644 raydium/*.h  $RPM_BUILD_ROOT%{_includedir}/raydium
install -p -m 644 raydium/headers/*.h \
  $RPM_BUILD_ROOT%{_includedir}/raydium/headers
cp -a rayphp $RPM_BUILD_ROOT%{_datadir}/raydium

# below is the desktop file and icon stuff.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor fedora            \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  %{SOURCE2}
desktop-file-install --vendor fedora            \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  %{SOURCE3}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps
install -p -m 644 %{SOURCE1} \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps


%clean
rm -rf $RPM_BUILD_ROOT


%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

%post -n raydium -p /sbin/ldconfig

%postun -n raydium -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
# no docs these are all in the -data package
%{_bindir}/%{name}
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/64x64/apps/%{name}.png

%files track-editor
%defattr(-,root,root,-)
%{_bindir}/%{name}-track-editor
%{_datadir}/applications/fedora-%{name}-track-editor.desktop

%files -n raydium
%defattr(-,root,root,-)
%{_libdir}/libraydium-%{version}.so
%{_datadir}/raydium

%files -n raydium-devel
%defattr(-,root,root,-)
%{_libdir}/libraydium.so
%{_includedir}/raydium


%changelog
* Fri Aug 31 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 1.2-2
- Improved and spell-fixed raydium description
- Fix a number of unused direct shlib dependencies in libraydium-1.2.so
- Add Requires on various -devel packages to the raydium-devel subpackage so
  that all headers included by the raydium headers will be present

* Fri Aug 10 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 1.2-1
- Initial Fedora package


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/maniadrive/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	3 Sep 2007 18:24:30 -0000	1.1
+++ .cvsignore	3 Sep 2007 19:18:20 -0000	1.2
@@ -0,0 +1 @@
+ManiaDrive-1.2-src.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/maniadrive/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	3 Sep 2007 18:24:30 -0000	1.1
+++ sources	3 Sep 2007 19:18:20 -0000	1.2
@@ -0,0 +1 @@
+90dec2154802225980f8b4ebd6570069  ManiaDrive-1.2-src.tar.gz




More information about the fedora-extras-commits mailing list