commit 3883b8d4e0cc987e0459b161a0a3e80f2bd78c78 Author: Rosa Date: Thu Feb 2 02:15:30 2012 +0400 Automatic import for version 20111109 diff --git a/.abf.yml b/.abf.yml new file mode 100644 index 0000000..83da6ef --- /dev/null +++ b/.abf.yml @@ -0,0 +1,2 @@ +sources: + "fheroes2-src-r2693.tgz": eb2ea3323e1f3bde05ba5c35a12db6f7f8b6f39e diff --git a/fheroes2-r2693-zlib.patch b/fheroes2-r2693-zlib.patch new file mode 100644 index 0000000..f5dbbf8 --- /dev/null +++ b/fheroes2-r2693-zlib.patch @@ -0,0 +1,11 @@ +diff -urN fheroes-src/src/engine/IMG_savepng.cpp fheroes-src-patched/src/engine/IMG_savepng.cpp +--- fheroes-src/src/engine/IMG_savepng.cpp 2010-03-23 11:44:39.000000000 +1000 ++++ fheroes-src-patched/src/engine/IMG_savepng.cpp 2011-12-09 00:48:27.819222589 +1100 +@@ -29,6 +29,7 @@ + * 11/08/2004 - Compr fix, levels -1,1-7 now work - Tyler Montbriand + */ + #include ++#include + #include "SDL.h" + #include "IMG_savepng.h" + diff --git a/fheroes2.cfg b/fheroes2.cfg new file mode 100644 index 0000000..c4bd0af --- /dev/null +++ b/fheroes2.cfg @@ -0,0 +1,81 @@ +# Default config fheroes2.cfg options: +# +# path to directory data +# data = data +# +# path to directory maps, you can set few maps +# maps = maps +# maps = c:\other_maps +# +# use alternative resource +# alt resource = off +# +# sound: on off +sound = on +# +# music: on,midi,cd,ext,off +music = on +# +# sound volume: 0 - 10 +sound volume = 6 +# +# music volume: 0 - 10 +music volume = 6 +# +# external play music command: +# playmus command = "" +# +# video mode (640x480, 800x576, 1024x768, 1280x1024 or other divisible 32) +videomode = 1024x768 +# +# heroes move speed: 0 - 10 +# heroes speed = 5 +# +# AI move speed: 0 - 10 +# ai speed = 5 +# +# battle speed: 0 - 10 +# battle speed = 5 +# +# scroll speed: 1 - 4 +# scroll speed = 2 +# +# fullscreen: on off (F4 switch) +fullscreen = on +# +# debug (0 - 9) +debug = off +# +# use ttf fonts +# unicode = off +# +# force lang +# lang = en +# +# force encode maps text +# maps charset = +# +# font name (only with unicode = on) +# fonts normal = bigfonts.ttf +# fonts small = smallfonts.ttf +# fonts normal size = 15 +# fonts small size = 10 +# +# fonts render engine: (blended/solid) (only with unicode = on) +# fonts small render = solid +# fonts normal render = solid +# +# network port: +# port = 5154 +# +# pocket pc emulation (set auto on for videomode < 640x480) +# pocket pc = off +# +# pocket pc options: +# tap delay = 1050 +# pointer offset x = 0 +# pointer offset y = 0 +# +# move mouse from keyboard (also see fheroes2.key): +# emulate mouse = off +# emulate mouse step = 10 diff --git a/fheroes2.desktop b/fheroes2.desktop new file mode 100644 index 0000000..586a0c9 --- /dev/null +++ b/fheroes2.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Free Heroes 2 +Comment=Heroes Of Might And Magic 2 Engine +Exec=/usr/games/fheroes2 +Icon=fheroes2 +StartupNotify=true +Terminal=false +Type=Application +Categories=Game;StrategyGame; diff --git a/fheroes2.png b/fheroes2.png new file mode 100644 index 0000000..0b90b73 Binary files /dev/null and b/fheroes2.png differ diff --git a/fheroes2.sh b/fheroes2.sh new file mode 100755 index 0000000..b705f2c --- /dev/null +++ b/fheroes2.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +if [ ! -s /usr/share/games/fheroes2/data/HEROES2.AGG ]; then + echo "You need to copy files from data and maps directories from original game" + echo "into your /usr/share/games/fheroes2/{maps,data} directories respectively" + exit 1; +fi + + +if [ ! -d "$HOME/.fheroes2" ]; then + mkdir -p $HOME/.fheroes2/files/save + + ln -s /usr/share/games/fheroes2/data $HOME/.fheroes2/data + ln -s /usr/share/games/fheroes2/maps $HOME/.fheroes2/maps + + for i in fonts images lang music sounds stats; do + ln -s /usr/share/games/fheroes2/files/$i $HOME/.fheroes2/files/$i + done + + cp /usr/share/games/fheroes2/fheroes2.cfg $HOME/.fheroes2/ +fi + +export FHEROES2_DATA=$HOME/.fheroes2 +/usr/games/fheroes2.bin + diff --git a/fheroes2.spec b/fheroes2.spec new file mode 100644 index 0000000..4d5b6e6 --- /dev/null +++ b/fheroes2.spec @@ -0,0 +1,66 @@ +%define rev r2693 +Name: fheroes2 +Version: 20111109 +Release: %mkrel 1 +Summary: Free implementation of Heroes of the Might and Magic II engine +License: GPL +Group: Games/Strategy +Url: http://sourceforge.net/projects/fheroes2/ +Source: http://sourceforge.net/projects/fheroes2/files/fheroes2/%{name}-src-%{rev}.tgz +Source2: %{name}.sh +Source3: %{name}.png +Source4: %{name}.desktop +Source5: %{name}.cfg +Patch0: fheroes2-r2693-zlib.patch +BuildRequires: gcc-c++ +BuildRequires: SDL_image-devel +BuildRequires: SDL_mixer-devel +BuildRequires: SDL_net-devel +BuildRequires: SDL_ttf-devel +BuildRequires: freetype-devel +BuildRequires: png-devel +BuildRequires: zlib-devel + +%description +Free implementation of Heroes of the Might and Magic II engine. +You need to copy files from data and maps directories from original game +into your /usr/share/games/fheroes2/{maps,data} directories respectively + +%prep +%setup -qn fheroes-src +%patch0 -p1 -b .zlib + +%build +%make WITH_AI=simple CONFIGURE_FHEROES2_DATA="%{_gamesdatadir}/%{name}/" + +%install +# let's create directory structure... +%__mkdir_p %{buildroot}%{_gamesbindir} +%__mkdir_p %{buildroot}%{_datadir}/applications +%__mkdir_p %{buildroot}%{_datadir}/pixmaps +%__mkdir_p %{buildroot}%{_gamesdatadir}/%{name}/{data,maps} + +# and install what we need where we need it to be... +%__install -pm755 %{name} %{buildroot}%{_gamesbindir}/%{name}.bin +%__install -pm755 %{SOURCE2} %{buildroot}%{_gamesbindir}/%{name} +%__install -pm 644 %{name}.cfg %{buildroot}%{_gamesdatadir}/%{name}/ +%__install -pm 644 %{name}.key %{buildroot}%{_gamesdatadir}/%{name}/ +%__install -pm 644 %{SOURCE3} %{buildroot}%{_datadir}/pixmaps/%{name}.png +%__install -pm 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/%{name}.desktop +%__install -pm 644 %{SOURCE5} %{buildroot}%{_gamesdatadir}/%{name}/ + +%files +%defattr(-,root,root) +%doc AUTHORS changelog.txt COPYING LICENSE README +%{_gamesbindir}/* +%{_datadir}/pixmaps/%{name}.png +%{_datadir}/applications/%{name}.desktop +%{_gamesdatadir}/%{name} + + + +%changelog +* Thu Dec 08 2011 Andrey Bondrov 20111109-1mdv2012.0 ++ Revision: 739019 +- imported package fheroes2 +