rpms/astromenace/FC-6 astromenace-langvfs.patch, NONE, 1.1 astromenace.desktop, NONE, 1.1 astromenace.png, NONE, 1.1 astromenace.spec, NONE, 1.1 sources, 1.1, 1.2

Jon Ciesla (limb) fedora-extras-commits at redhat.com
Thu Oct 11 14:00:11 UTC 2007


Author: limb

Update of /cvs/pkgs/rpms/astromenace/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22299

Modified Files:
	sources 
Added Files:
	astromenace-langvfs.patch astromenace.desktop astromenace.png 
	astromenace.spec 
Log Message:
Initial import.


astromenace-langvfs.patch:

--- NEW FILE astromenace-langvfs.patch ---
--- AstroMenaceSource/Main.cpp	2007-10-05 19:30:17.000000000 +0200
+++ AstroMenaceSource/Main.cpp	2007-10-05 19:32:55.000000000 +0200
@@ -88,6 +88,7 @@
 char ProgrammDir[MAX_PATH];
 char VFSFileNamePath[MAX_PATH];
 char VFSLangFileNamePath[MAX_PATH];
+char VFSLangFileNamePathEn[MAX_PATH];
 // полное имя для файла с данными о игре
 char DatFileName[MAX_PATH];
 // для сохранения скриншотов
@@ -234,6 +235,7 @@
 	ZeroMemory(DatFileName, sizeof(DatFileName));
 	ZeroMemory(VFSFileNamePath, sizeof(VFSFileNamePath));
 	ZeroMemory(VFSLangFileNamePath, sizeof(VFSLangFileNamePath));
+	ZeroMemory(VFSLangFileNamePathEn, sizeof(VFSLangFileNamePathEn));
 	ZeroMemory(ScreenshotDir, sizeof(ScreenshotDir));
 
 	// Получаем данные, где папка пользователя
@@ -295,6 +297,9 @@
 
 	strcpy(VFSLangFileNamePath, ProgrammDir);
 	strcat(VFSLangFileNamePath, "gamelang.vfs");
+
+	strcpy(VFSLangFileNamePathEn, ProgrammDir);
+	strcat(VFSLangFileNamePathEn, "gamelang_en.vfs");
 
 #elif __unix
 	// иним пути для юникса-линукса
@@ -346,6 +351,9 @@
 	strcpy(VFSLangFileNamePath, ProgrammDir);
 	strcat(VFSLangFileNamePath, "gamelang.vfs");
 
+	strcpy(VFSLangFileNamePathEn, ProgrammDir);
+	strcat(VFSLangFileNamePathEn, "gamelang_en.vfs");
+
 	// укладываем в нужном месте (где 100% дають создавать) файл с настройками
 	strcpy(DatFileName, homeval);
 	strcat(DatFileName, "/.astromenace");
@@ -522,9 +530,12 @@
 	}
 	if (vw_OpenVFS(VFSLangFileNamePath) != 0)
 	{
-		fprintf(stderr, "gamelang.vfs file not found or corrupted.\n");
-		ReleaseGameOneCopy();
-		return 0;
+		if (vw_OpenVFS(VFSLangFileNamePathEn) != 0)
+		{
+			fprintf(stderr, "gamelang.vfs or gamelang_en.vfs files not found or corrupted.\n");
+			ReleaseGameOneCopy();
+			return 0;
+		}
 	}
 	printf("\n");
 


--- NEW FILE astromenace.desktop ---
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Astromenace
Exec=astromenace --noAA --dir=/usr/share/astromenace --mode=12
Comment=3D space shooter
Icon=astromenace.png
Terminal=false
Categories=Game;ActionGame;
StartupNotify=false


--- NEW FILE astromenace.spec ---
Name: astromenace
Version:  1.2
Release:  3%{?dist}
Summary: Hardcore 3D space shooter with spaceship upgrade possibilities  

Group: Amusements/Games 
License: GPLv3
URL: http://www.viewizard.com/
Source0: http://www.viewizard.com/download/AstroMenaceSourceCode_070930.zip
Source1: astromenace.desktop
Source2: astromenace.png
Patch0: astromenace-langvfs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root%(%{__id_u} -n)
BuildRequires: cmake, SDL-devel, openal-devel, freealut-devel, libogg-devel
BuildRequires: libvorbis-devel, libjpeg-devel, desktop-file-utils
Requires: astromenace-data = %{version}

%description
Space is a vast area, an unbounded territory where it seems there is a 
room for everybody, but reversal of fortune put things differently. The 
hordes of hostile creatures crawled out from the dark corners of the
universe, craving to conquer your homeland. Their force is compelling,
their legions are interminable. However, humans didn't give up without
a final showdown and put their best pilot to fight back. These malicious
invaders chose the wrong galaxy to conquer and you are to prove it! 
Go ahead and make alien aggressors regret their insolence.

%prep
%setup -qn AstroMenaceSourceCode

sed -i 's/\r//' License.txt
sed -i 's/\r//' gpl-3.0.txt
chmod -x License.txt
chmod -x ReadMe.txt
chmod -x gpl-3.0.txt

%patch0 -p0

%build
cmake .
make CFLAGS="$RPM_OPT_FLAGS"

%install
rm -rf %{buildroot}
mkdir -p  %{buildroot}%{_bindir}
install -m 755 AstroMenace %{buildroot}%{_bindir}/astromenace

desktop-file-install --vendor fedora            \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  %{SOURCE1}

mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps
install -p -m 644 %{SOURCE2} \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/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}/astromenace
%doc ReadMe.txt License.txt gpl-3.0.txt
%{_datadir}/applications/fedora-astromenace.desktop
%{_datadir}/icons/hicolor/64x64/apps/astromenace.png

%changelog
* Mon Oct 08 2007 Jon Ciesla <limb at jcomserv.net> - 1.2-3
- Added support for opengl-games-utils(F7+ only), .desktop cleanup.

* Fri Oct 05 2007 Jon Ciesla <limb at jcomserv.net> - 1.2-2
- Used main upstream sources, not sf.net fork.
- Patched for gamelang paths.

* Tue Oct 02 2007 Jon Ciesla <limb at jcomserv.net> - 1.2-1
- create.


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/astromenace/FC-6/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	8 Oct 2007 18:54:21 -0000	1.1
+++ sources	11 Oct 2007 13:59:39 -0000	1.2
@@ -0,0 +1 @@
+73fe5a3c2fdcf7a5d33005700f5e60ce  AstroMenaceSourceCode_070930.zip




More information about the fedora-extras-commits mailing list