From 3883b8d4e0cc987e0459b161a0a3e80f2bd78c78 Mon Sep 17 00:00:00 2001 From: Rosa Date: Thu, 2 Feb 2012 02:15:30 +0400 Subject: [PATCH] Automatic import for version 20111109 --- .abf.yml | 2 + fheroes2-r2693-zlib.patch | 11 ++++++ fheroes2.cfg | 81 ++++++++++++++++++++++++++++++++++++++ fheroes2.desktop | 9 +++++ fheroes2.png | Bin 0 -> 1248 bytes fheroes2.sh | 25 ++++++++++++ fheroes2.spec | 66 +++++++++++++++++++++++++++++++ 7 files changed, 194 insertions(+) create mode 100644 .abf.yml create mode 100644 fheroes2-r2693-zlib.patch create mode 100644 fheroes2.cfg create mode 100644 fheroes2.desktop create mode 100644 fheroes2.png create mode 100755 fheroes2.sh create mode 100644 fheroes2.spec 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 0000000000000000000000000000000000000000..0b90b7304ea818b8ea6169b814581979e5896590 GIT binary patch literal 1248 zcmV<61Rwi}P)HgfB*a6n}HwWJI3nj>hh=Ey zetdjV@Zd zgkeaMB>29M)*53BN+|||fnB@2y!@it8-^jRR*Sc9-!45!pxf;d1OY`+*m)rYQc8pn zb}mU0lu~$}hwuBiu6v8DQi`G|Fvi?E>*L3de`&3MslIF9Mya(%N{Q!r6h(m$06`T0Q)R3s|)aU64Ua)Q>HAP8u+T2`SF zd>3`{2kmwnV+>MC9LKT1LI{eYAPhsa)_1V(D4>+G3*Ybb0Wij3W*LLpIct7^BLr$P z0U$qliR0EdI|}Lbk~<(m2o4Vq?Kuxt!E`!ZO4HOHvgWPbfR`KJygsGZJH!+Pt}8j} zpW(PQCaS<(&Hy;?Z;%h$_RKhrX*Qc=Sw@m1OsCVOM^m7bLI^>yRSM+PN=Y531ncz< z3DyFHQ?v71?I3s0kW$_NlmvG7LJp2zVlHQNwszT# zx=0C*dqc$ino*|_Q*Xt#a`HUq>gwwAqXeon#Bod*hB)EG=C1f+FvjrV&rP(3z5UW7 z!uh&idNo@;Ns`zg;yC8w;-ayT0u|%Rz4K|P{9rC;6sF9(BVhQ!qp_V>A4n<5^PDgY z$+B$mRy>~uV+=tMAl)(wvEopCF?Zy4Jz-VQYKG(1Y#OUzo=m`T9LD2uDZPJg=Rf?K z(Ph z>~DlqLpZScMzP*KwRgco(LYLHJ{`XAm(A$+HEY68gKe}bji|DMjh?#I@rt4#P1ENQ zm`)nL$@F#+B#_54ap6A4IOb`U*dH$gM3n`E!3C0+F-$$$~ z#7b%R_xlaDI!9=&*@(^=oq(*@==b|}Z^z z4SM)Nh;#EyxO9(Ds?W~O4sjg+XY*N@!2B@A;5ZIaNG%7z z+ik|DsjK^d0JYN|6$pk7AK@bo{ z5mHK$Bq7i9XMsP9Kt;m$eVWateXu?U{MiI567z5W=Yanh0RIBeK$Z|ZDwL=I0000< KMNUMnLSTZT30RK+ literal 0 HcmV?d00001 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 +