diff --git a/.cvsignore b/.cvsignore index e69de29..5af3217 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +abe-1_0.tar.gz diff --git a/abe-1.0-datapath.patch b/abe-1.0-datapath.patch new file mode 100644 index 0000000..d889a47 --- /dev/null +++ b/abe-1.0-datapath.patch @@ -0,0 +1,55 @@ +--- abe-1_0/src/Sound.h.path 2003-02-19 08:10:28.000000000 +0200 ++++ abe-1_0/src/Sound.h 2003-08-01 01:13:36.000000000 +0300 +@@ -3,7 +3,7 @@ + + #include "Main.h" + +-#define SOUND_DIR "sounds" ++#define SOUND_DIR "/usr/share/abe/sounds" + + #define DOOR_SOUND 0 + #define OBJECT_SOUND 1 +--- abe-1_0/src/Image.h.path 2003-04-12 21:16:13.000000000 +0300 ++++ abe-1_0/src/Image.h 2003-08-01 01:13:36.000000000 +0300 +@@ -5,7 +5,7 @@ + #include + #include "Main.h" + +-#define IMAGES_DIR "images" ++#define IMAGES_DIR "/usr/share/abe/images" + + extern SDL_Surface *title, *score_image; + extern SDL_Surface *tom[13]; +--- abe-1_0/src/Map.h.path 2003-03-23 08:13:28.000000000 +0200 ++++ abe-1_0/src/Map.h 2003-08-01 01:13:36.000000000 +0300 +@@ -4,7 +4,7 @@ + #include "Main.h" + + // Where to store the map files (no ending /) +-#define MAPS_DIR "maps" ++#define MAPS_DIR "/usr/share/abe/maps" + + // Throttle the game speed at 25 fps (for fast machines) + #define FPS_THROTTLE 30 +--- abe-1_0/src/MapIO.h.path 2003-02-25 02:39:17.000000000 +0200 ++++ abe-1_0/src/MapIO.h 2003-08-01 01:13:36.000000000 +0300 +@@ -6,7 +6,7 @@ + #include "SDL_endian.h" + + // Where to store the map files (no ending /) +-#define MAPS_DIR "maps" ++#define MAPS_DIR "/usr/share/abe/maps" + + void saveMap(); + int loadMap(int drawMap); +--- abe-1_0/src/Game.h.path 2003-08-01 02:00:05.000000000 +0300 ++++ abe-1_0/src/Game.h 2003-08-01 02:00:35.000000000 +0300 +@@ -19,7 +19,7 @@ + + #define SPRING_JUMP 30 + +-#define SAVEGAME_DIR "savegame" ++#define SAVEGAME_DIR ".abe" + + #define MAX_HEALTH 100 + diff --git a/abe-1.0-tmppath.patch b/abe-1.0-tmppath.patch new file mode 100644 index 0000000..0ba467e --- /dev/null +++ b/abe-1.0-tmppath.patch @@ -0,0 +1,11 @@ +--- abe-1_0/src/Image.c.tmppath 2003-04-12 21:16:13.000000000 +0300 ++++ abe-1_0/src/Image.c 2003-08-03 20:01:33.000000000 +0300 +@@ -305,7 +305,7 @@ + int block = 0; + + image_count = 0; +- sprintf(tmp_path, "%s%s%s", IMAGES_DIR, PATH_SEP, "tmp.bmp"); ++ sprintf(tmp_path, "%s%s%s", getenv("HOME") , PATH_SEP, ".abetmp.bmp"); + + sprintf(path, "%s%s%s", IMAGES_DIR, PATH_SEP, "images.tar"); + fprintf(stderr, "Opening %s for reading.\n", path); diff --git a/abe.png b/abe.png new file mode 100644 index 0000000..41e380c Binary files /dev/null and b/abe.png differ diff --git a/abe.spec b/abe.spec new file mode 100644 index 0000000..38ed5c4 --- /dev/null +++ b/abe.spec @@ -0,0 +1,80 @@ +Name: abe +Version: 1.0 +Release: 0.fdr.3.rh90 +Epoch: 0 +Summary: A scrolling, platform-jumping, ancient pyramid exploring game. +Group: Amusements/Games +License: GPL +URL: http://abe.sourceforge.net/ +Source0: http://download.sourceforge.net/abe/abe-1_0.tar.gz +Source1: %{name}.png +Patch0: %{name}-%{version}-datapath.patch +Patch1: %{name}-%{version}-tmppath.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: SDL-devel >= 0:1.2.3, SDL_mixer-devel >= 0:1.2.3 +BuildRequires: desktop-file-utils + +%description +A scrolling, platform-jumping, key-collecting, ancient pyramid exploring game, +vaguely in the style of similar games for the Commodore+4. + +%prep +%setup -q -n %{name}-1_0 +# Abe assumes it runs from its build directory and thus assumes everything +# is writable there etc.. ugh: +# Hardcode /usr/share/abe/ paths +%patch0 -p1 -b .datapath +# Write temporary image files into home directory, not data directory +%patch1 -p1 -b .tmppath + +%build +%configure +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{name} +mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications/ +mkdir -p $RPM_BUILD_ROOT/%{_datadir}/pixmaps/ +mkdir -p $RPM_BUILD_ROOT/%{_bindir} +cp -p -r images maps sounds $RPM_BUILD_ROOT/%{_datadir}/%{name} +install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_datadir}/pixmaps/ +install -p -m 755 %{name} $RPM_BUILD_ROOT/%{_bindir}/ + +cat << EOF > %{name}.desktop +[Desktop Entry] +Name=Abe +Comment="Abe's Amazing Adventure" +Exec=abe +Icon=abe.png +Terminal=false +Type=Application +Encoding=UTF-8 +Categories=Game;Application;X-Fedora; +EOF + +desktop-file-install --vendor fedora --dir $RPM_BUILD_ROOT/%{_datadir}/applications/ %{name}.desktop + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc COPYING README +%{_bindir}/* +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/* +%{_datadir}/applications/* +%{_datadir}/pixmaps/* + +%changelog +* Wed Aug 13 2003 Panu Matilainen 0:1.0-0.fdr.3 +- doh.. remember to update the icon to png in desktop file too + +* Fri Aug 08 2003 Panu Matilainen 0:1.0-0.fdr.2 +- fix QA issues in #555 + +* Sun Aug 03 2003 Panu Matilainen 0:1.0-0.fdr.1 +- Initial Fedora packaging. diff --git a/sources b/sources index e69de29..8b0da11 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +a7e44d5e605b2d32fffdf46f019f7119 abe-1_0.tar.gz