rpms/biniax/devel biniax-1.2-gfx.patch, NONE, 1.1 biniax-1.2-optflags.patch, NONE, 1.1 biniax-1.2-save.patch, NONE, 1.1 biniax-1.2-snd.patch, NONE, 1.1 biniax.desktop, NONE, 1.1 biniax.png, NONE, 1.1 biniax.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Stefan Posdzich
cheekyboinc at fedoraproject.org
Mon Oct 27 19:00:04 UTC 2008
- Previous message (by thread): rpms/R-Biobase/devel .cvsignore, 1.4, 1.5 R-Biobase.spec, 1.5, 1.6 sources, 1.4, 1.5
- Next message (by thread): rpms/hamcrest/devel hamcrest-1.1-build.patch, NONE, 1.1 hamcrest-1.1-no-integration.patch, NONE, 1.1 hamcrest-1.1-no-jarjar.patch, NONE, 1.1 hamcrest-all-1.1.pom, NONE, 1.1 hamcrest-core-1.1.pom, NONE, 1.1 hamcrest-generator-1.1.pom, NONE, 1.1 hamcrest-integration-1.1.pom, NONE, 1.1 hamcrest-library-1.1.pom, NONE, 1.1 hamcrest-parent-1.1.pom, NONE, 1.1 hamcrest-text-1.1.pom, NONE, 1.1 hamcrest.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: cheekyboinc
Update of /cvs/pkgs/rpms/biniax/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31003/devel
Modified Files:
.cvsignore sources
Added Files:
biniax-1.2-gfx.patch biniax-1.2-optflags.patch
biniax-1.2-save.patch biniax-1.2-snd.patch biniax.desktop
biniax.png biniax.spec import.log
Log Message:
first commit
biniax-1.2-gfx.patch:
--- NEW FILE biniax-1.2-gfx.patch ---
--- desktop/gfx.c 2005-10-29 23:13:42.000000000 +0200
+++ desktop/gfx.c.patch 2008-10-18 21:53:18.000000000 +0200
@@ -43,7 +43,7 @@
SDL_WM_SetCaption("BINIAX", "");
/* Load GAME related graphics data */
- temp = SDL_LoadBMP("data/background.bmp");
+ temp = SDL_LoadBMP("@DATADIR@/biniax/data/background.bmp");
if ( temp == 0 )
{
return BNX_FALSE;
@@ -56,56 +56,56 @@
SDL_FreeSurface(temp);
// Loading Game Elements
- temp = SDL_LoadBMP("data/element0.bmp");
+ temp = SDL_LoadBMP("@DATADIR@/biniax/data/element0.bmp");
if ( temp == 0 )
{
return BNX_FALSE;
}
_Gfx.elements[ 0 ] = SDL_DisplayFormat(temp);
SDL_FreeSurface(temp);
- temp = SDL_LoadBMP("data/element1.bmp");
+ temp = SDL_LoadBMP("@DATADIR@/biniax/data/element1.bmp");
if ( temp == 0 )
{
return BNX_FALSE;
}
_Gfx.elements[ 1 ] = SDL_DisplayFormat(temp);
SDL_FreeSurface(temp);
- temp = SDL_LoadBMP("data/element2.bmp");
+ temp = SDL_LoadBMP("@DATADIR@/biniax/data/element2.bmp");
if ( temp == 0 )
{
return BNX_FALSE;
}
_Gfx.elements[ 2 ] = SDL_DisplayFormat(temp);
SDL_FreeSurface(temp);
- temp = SDL_LoadBMP("data/element3.bmp");
+ temp = SDL_LoadBMP("@DATADIR@/biniax/data/element3.bmp");
if ( temp == 0 )
{
return BNX_FALSE;
}
_Gfx.elements[ 3 ] = SDL_DisplayFormat(temp);
SDL_FreeSurface(temp);
- temp = SDL_LoadBMP("data/shield.bmp");
+ temp = SDL_LoadBMP("@DATADIR@/biniax/data/shield.bmp");
if ( temp == 0 )
{
return BNX_FALSE;
}
_Gfx.shield = SDL_DisplayFormat(temp);
SDL_FreeSurface(temp);
- temp = SDL_LoadBMP("data/cursor0.bmp");
+ temp = SDL_LoadBMP("@DATADIR@/biniax/data/cursor0.bmp");
if ( temp == 0 )
{
return BNX_FALSE;
}
_Gfx.cursors[ 0 ] = SDL_DisplayFormat(temp);
SDL_FreeSurface(temp);
- temp = SDL_LoadBMP("data/cursor1.bmp");
+ temp = SDL_LoadBMP("@DATADIR@/biniax/data/cursor1.bmp");
if ( temp == 0 )
{
return BNX_FALSE;
}
_Gfx.cursors[ 1 ] = SDL_DisplayFormat(temp);
SDL_FreeSurface(temp);
- temp = SDL_LoadBMP("data/gameover.bmp");
+ temp = SDL_LoadBMP("@DATADIR@/biniax/data/gameover.bmp");
if ( temp == 0 )
{
return BNX_FALSE;
@@ -114,28 +114,28 @@
SDL_FreeSurface(temp);
/* Load MENU related graphics data */
- temp = SDL_LoadBMP("data/splash.bmp");
+ temp = SDL_LoadBMP("@DATADIR@/biniax/data/splash.bmp");
if ( temp == 0 )
{
return BNX_FALSE;
}
_Gfx.splash = SDL_DisplayFormat(temp);
SDL_FreeSurface(temp);
- temp = SDL_LoadBMP("data/option0.bmp");
+ temp = SDL_LoadBMP("@DATADIR@/biniax/data/option0.bmp");
if ( temp == 0 )
{
return BNX_FALSE;
}
_Gfx.options[ 0 ] = SDL_DisplayFormat(temp);
SDL_FreeSurface(temp);
- temp = SDL_LoadBMP("data/option1.bmp");
+ temp = SDL_LoadBMP("@DATADIR@/biniax/data/option1.bmp");
if ( temp == 0 )
{
return BNX_FALSE;
}
_Gfx.options[ 1 ] = SDL_DisplayFormat(temp);
SDL_FreeSurface(temp);
- temp = SDL_LoadBMP("data/option2.bmp");
+ temp = SDL_LoadBMP("@DATADIR@/biniax/data/option2.bmp");
if ( temp == 0 )
{
return BNX_FALSE;
@@ -144,7 +144,7 @@
SDL_FreeSurface(temp);
/* Load FONT related graphics data */
- temp = SDL_LoadBMP("data/font.bmp");
+ temp = SDL_LoadBMP("@DATADIR@/biniax/data/font.bmp");
if ( temp == 0 )
{
return BNX_FALSE;
biniax-1.2-optflags.patch:
--- NEW FILE biniax-1.2-optflags.patch ---
Patch by Robert Scheck <robert at fedoraproject.org> for biniax <= 1.2
to get the $RPM_OPT_FLAGS correctly honored during package build.
--- makefile 2005-08-24 08:26:04.000000000 +0200
+++ makefile.optflags 2008-10-18 22:44:55.000000000 +0200
@@ -12,4 +12,4 @@
TARGET=biniax
biniax:
- $(CC) $(AUTO) $(FILES) $(INCLUDES) -o $(TARGET) $(LINKTO)
\ No newline at end of file
+ $(CC) $(AUTO) $(RPM_OPT_FLAGS) $(FILES) $(INCLUDES) -o $(TARGET) $(LINKTO)
biniax-1.2-save.patch:
--- NEW FILE biniax-1.2-save.patch ---
--- biniax.c 2008-04-12 18:19:02.000000000 +0200
+++ biniax.c.patch 2008-10-18 22:05:08.000000000 +0200
@@ -63,7 +63,10 @@
******************************************************************************/
#include "game.h"
-#include "inc.h"
+#include "inc.h"
+#include<sys/stat.h>
+
+const char *homeDir = ".biniax";
/* Global instance of GAME structure */
BNX_GAME Game;
@@ -531,80 +534,97 @@
/******************************************************************************
GAME AND HISCORE SAVE / RESTORE
******************************************************************************/
-
-BNX_BOOL saveGame( BNX_GAME *game )
-{
- FILE *file;
-
- file = fopen( "autosave.bnx", "wb" );
-
- if ( file == (FILE *) NULL )
- return BNX_FALSE;
-
- fwrite( game, 1, sizeof( BNX_GAME ), file );
-
- fclose( file );
-
- return BNX_TRUE;
-}
-
-BNX_BOOL loadGame( BNX_GAME *game )
-{
- FILE *file;
-
- file = fopen( "autosave.bnx", "rb" );
-
- if ( file == (FILE *) NULL )
- return BNX_FALSE;
-
- fread( game, 1, sizeof( BNX_GAME ), file );
-
- fclose( file );
-
- return BNX_TRUE;
-}
-
-BNX_BOOL saveHiScore( BNX_GAME *game )
-{
- BNX_INT32 test;
- FILE *file;
-
- file = fopen( "hiscore.bnx", "wb" );
-
- if ( file == (FILE *) NULL )
- return BNX_FALSE;
-
- test = game->best + 1;
- fwrite( &game->best, 1, sizeof( game->best ), file );
- fwrite( &test, 1, sizeof( test ), file );
-
- fclose( file );
-
- return BNX_TRUE;
-}
-
-BNX_BOOL loadHiScore( BNX_GAME *game )
-{
- BNX_INT32 test;
- FILE *file;
-
- game->best = 0;
-
- file = fopen( "hiscore.bnx", "rb" );
-
- if ( file == (FILE *) NULL )
- return BNX_FALSE;
-
- fread( &game->best, 1, sizeof( game->best ), file );
- fread( &test, 1, sizeof( game->best ), file );
- if ( test-1 != game->best )
- {
- game->best = 0;
- return BNX_FALSE;
- }
-
- fclose( file );
-
- return BNX_TRUE;
-}
-
+
+void createHomeDir()
+{
+
+ char pathTMP[512];
+ sprintf(pathTMP, "%s/%s", getenv("HOME"), homeDir);
+ mkdir(pathTMP, 0755);
+}
+
+BNX_BOOL saveGame( BNX_GAME *game )
+{
+ FILE *file;
+ char pathTMP[512];
+ sprintf(pathTMP,"%s/%s/autosave.bnx", getenv("HOME"), homeDir);
+ createHomeDir();
+ file = fopen( pathTMP, "wb" );
+
+ if ( file == (FILE *) NULL )
+ return BNX_FALSE;
+
+ fwrite( game, 1, sizeof( BNX_GAME ), file );
+
+ fclose( file );
+
+ return BNX_TRUE;
+}
+
+BNX_BOOL loadGame( BNX_GAME *game )
+{
+ FILE *file;
+ char pathTMP[512];
+ sprintf(pathTMP,"%s/%s/autosave.bnx", getenv("HOME"), homeDir);
+ createHomeDir();
+ file = fopen( pathTMP, "rb" );
+
+ if ( file == (FILE *) NULL )
+ return BNX_FALSE;
+
+ fread( game, 1, sizeof( BNX_GAME ), file );
+
+ fclose( file );
+
+ return BNX_TRUE;
+}
+
+BNX_BOOL saveHiScore( BNX_GAME *game )
+{
+ BNX_INT32 test;
+ FILE *file;
+ char pathTMP[512];
+ sprintf(pathTMP,"%s/%s/hiscore.bnx", getenv("HOME"), homeDir);
+
+ createHomeDir();
+ file = fopen( pathTMP, "wb" );
+
+ if ( file == (FILE *) NULL )
+ return BNX_FALSE;
+
+ test = game->best + 1;
+ fwrite( &game->best, 1, sizeof( game->best ), file );
+ fwrite( &test, 1, sizeof( test ), file );
+
+ fclose( file );
+
+ return BNX_TRUE;
+}
+
+BNX_BOOL loadHiScore( BNX_GAME *game )
+{
+ BNX_INT32 test;
+ FILE *file;
+ char pathTMP[512];
+ sprintf(pathTMP,"%s/%s/hiscore.bnx", getenv("HOME"), homeDir);
+
+ game->best = 0;
+
+ createHomeDir();
+ file = fopen( pathTMP, "rb" );
+
+ if ( file == (FILE *) NULL )
+ return BNX_FALSE;
+
+ fread( &game->best, 1, sizeof( game->best ), file );
+ fread( &test, 1, sizeof( game->best ), file );
+ if ( test-1 != game->best )
+ {
+ game->best = 0;
+ return BNX_FALSE;
+ }
+
+ fclose( file );
+
+ return BNX_TRUE;
+}
biniax-1.2-snd.patch:
--- NEW FILE biniax-1.2-snd.patch ---
--- desktop/snd.c 2005-08-24 02:45:22.000000000 +0200
+++ desktop/snd.c.patch 2008-10-18 21:57:09.000000000 +0200
@@ -37,10 +37,10 @@
Mix_QuerySpec( &audio_rate, &audio_format, &audio_channels );
}
- _Snd.sounds[ 1 ] = Mix_LoadWAV("data/sfx1.wav");
- _Snd.sounds[ 2 ] = Mix_LoadWAV("data/sfx2.wav");
- _Snd.sounds[ 3 ] = Mix_LoadWAV("data/sfx3.wav");
- _Snd.sounds[ 4 ] = Mix_LoadWAV("data/sfx4.wav");
+ _Snd.sounds[ 1 ] = Mix_LoadWAV("@DATADIR@/biniax/data/sfx1.wav");
+ _Snd.sounds[ 2 ] = Mix_LoadWAV("@DATADIR@/biniax/data/sfx2.wav");
+ _Snd.sounds[ 3 ] = Mix_LoadWAV("@DATADIR@/biniax/data/sfx3.wav");
+ _Snd.sounds[ 4 ] = Mix_LoadWAV("@DATADIR@/biniax/data/sfx4.wav");
return BNX_TRUE;
--- NEW FILE biniax.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=biniax
GenericName=A unique arcade logic game
Comment=Requires just a minute to learn and you will get hours of gameplay
Exec=biniax
Icon=biniax
Terminal=false
Type=Application
Categories=Game;ArcadeGame
--- NEW FILE biniax.spec ---
Name: biniax
Version: 1.2
Release: 4%{?dist}
Summary: A unique arcade logic game
Group: Amusements/Games
License: zlib
URL: http://www.biniax.com/
Source0: http://mordred.dir.bg/%{name}/%{name}-src.zip
Source1: %{name}.desktop
# Icon taken from the source, icon.ico
Source2: %{name}.png
# Fixes the path in gfx.c, snd.c. and creates a ~/.biniax subdir
# with "autosave" and "highscore" data. Patches send to upstream!
Patch0: %{name}-%{version}-gfx.patch
Patch1: %{name}-%{version}-snd.patch
Patch2: %{name}-%{version}-save.patch
Patch3: %{name}-%{version}-optflags.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: hicolor-icon-theme
BuildRequires: SDL-devel SDL_mixer-devel desktop-file-utils
%description
Biniax is a fancy and unique arcade logic game. It requires just a minute
to learn the rules and you will get hours of gameplay.
%prep
%setup -q -c -n %{name}
%patch0 -p0 -b .gfx
%patch1 -p0 -b .snd
%patch2 -p0 -b .save
%patch3 -p0 -b .optflags
# Needed because of this rpmlint warning "W: wrong-file-end-of-line-encoding"
sed -i 's/\r//' Readme.txt LICENSE.txt
# Set datadir prefix, snd.patch and gfx.patch
sed -i 's!@DATADIR@!%{_datadir}!' desktop/gfx.c
sed -i 's!@DATADIR@!%{_datadir}!' desktop/snd.c
%build
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/data
install -p -m 755 biniax $RPM_BUILD_ROOT%{_bindir}/%{name}
install -p -m 644 data/* $RPM_BUILD_ROOT%{_datadir}/%{name}/data/
# below the desktop file and icon stuff
desktop-file-install \
--dir=$RPM_BUILD_ROOT%{_datadir}/applications \
%{SOURCE1}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
install -p -m 0644 %{SOURCE2} \
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%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
%files
%defattr(-,root,root,-)
%doc LICENSE.txt Readme.txt
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%changelog
* Sat Oct 25 2008 Stefan Posdzich <cheekyboinc at foresightlinux.org> - 1.2-4
- Add datadir prefix, snd.patch and gfx.patch
- Remove obsolete desktop-file-install --vendor="fedora"
* Sat Oct 25 2008 Stefan Posdzich <cheekyboinc at foresightlinux.org> - 1.2-3
- Cosmetic corrections
* Sat Oct 18 2008 Stefan Posdzich <cheekyboinc at foresightlinux.org> - 1.2-2
- Add fix for "W: wrong-file-end-of-line-encoding"
- Add RPM_OPT_FLAGS patch
- Add more macros to spec
- Add more info to .desktop file
- Changed summary
- Remove BuildRequires: dos2unix
* Tue Aug 05 2008 Stefan Posdzich <cheekyboinc at foresightlinux.org> - 1.2-1
- Initial SPEC file
--- NEW FILE import.log ---
biniax-1_2-4_fc10:HEAD:biniax-1.2-4.fc10.src.rpm:1225133899
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/biniax/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 27 Oct 2008 04:16:41 -0000 1.1
+++ .cvsignore 27 Oct 2008 18:59:34 -0000 1.2
@@ -0,0 +1 @@
+biniax-src.zip
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/biniax/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 27 Oct 2008 04:16:41 -0000 1.1
+++ sources 27 Oct 2008 18:59:34 -0000 1.2
@@ -0,0 +1 @@
+12bca4b9b8354519edbdf89faa3c328b biniax-src.zip
- Previous message (by thread): rpms/R-Biobase/devel .cvsignore, 1.4, 1.5 R-Biobase.spec, 1.5, 1.6 sources, 1.4, 1.5
- Next message (by thread): rpms/hamcrest/devel hamcrest-1.1-build.patch, NONE, 1.1 hamcrest-1.1-no-integration.patch, NONE, 1.1 hamcrest-1.1-no-jarjar.patch, NONE, 1.1 hamcrest-all-1.1.pom, NONE, 1.1 hamcrest-core-1.1.pom, NONE, 1.1 hamcrest-generator-1.1.pom, NONE, 1.1 hamcrest-integration-1.1.pom, NONE, 1.1 hamcrest-library-1.1.pom, NONE, 1.1 hamcrest-parent-1.1.pom, NONE, 1.1 hamcrest-text-1.1.pom, NONE, 1.1 hamcrest.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list