diff --git a/.cvsignore b/.cvsignore index e69de29..d28c313 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +cdogs-sdl-0.4.tar.bz2 diff --git a/cdogs-sdl-0.4-64bit.patch b/cdogs-sdl-0.4-64bit.patch new file mode 100644 index 0000000..8dffe19 --- /dev/null +++ b/cdogs-sdl-0.4-64bit.patch @@ -0,0 +1,12 @@ +diff -up cdogs-sdl-0.4/src/grafx.c~ cdogs-sdl-0.4/src/grafx.c +--- cdogs-sdl-0.4/src/grafx.c~ 2007-07-16 20:36:01.000000000 +0200 ++++ cdogs-sdl-0.4/src/grafx.c 2007-07-16 20:36:01.000000000 +0200 +@@ -219,7 +219,7 @@ void ShutDownVideo(void) + typedef struct _Pic { + short int w; + short int h; +- char *data; ++ char data; + } Pic; + + int ReadPics(const char *filename, void **pics, int maxPics, diff --git a/cdogs-sdl-0.4-default-cfg.patch b/cdogs-sdl-0.4-default-cfg.patch new file mode 100644 index 0000000..fc9f64f --- /dev/null +++ b/cdogs-sdl-0.4-default-cfg.patch @@ -0,0 +1,15 @@ +diff -up cdogs-sdl-0.4/src/grafx.c~ cdogs-sdl-0.4/src/grafx.c +--- cdogs-sdl-0.4/src/grafx.c~ 2007-07-16 22:01:51.000000000 +0200 ++++ cdogs-sdl-0.4/src/grafx.c 2007-07-16 22:01:51.000000000 +0200 +@@ -107,9 +107,9 @@ static int ValidMode(int w, int h) + + /* These are the default hints as used by the graphics subsystem */ + int hints[HINT_END] = { +- 0, // HINT_FULLSCREEN ++ 1, // HINT_FULLSCREEN + 1, // HINT_WINDOW +- 1, // HINT_SCALEFACTOR ++ 2, // HINT_SCALEFACTOR + 320, // HINT_WIDTH + 240, // HINT_HEIGHT + 0 // HINT_FORCEMODE diff --git a/cdogs-sdl.desktop b/cdogs-sdl.desktop new file mode 100644 index 0000000..97131ea --- /dev/null +++ b/cdogs-sdl.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=C-Dogs +Comment=An arcade shoot-em-up +Exec=cdogs +Icon=cdogs.png +Terminal=false +StartupNotify=false +Type=Application +Categories=Game;ActionGame; diff --git a/cdogs-sdl.spec b/cdogs-sdl.spec new file mode 100644 index 0000000..1e83db1 --- /dev/null +++ b/cdogs-sdl.spec @@ -0,0 +1,67 @@ +Name: cdogs-sdl +Version: 0.4 +Release: 1%{?dist} +Summary: C-Dogs is an arcade shoot-em-up +Group: Amusements/Games +License: GPL +URL: http://lumaki.com/code/cdogs/ +Source0: http://icculus.org/%{name}/files/src/%{name}-%{version}.tar.bz2 +Source1: %{name}.desktop +Patch0: cdogs-sdl-0.4-64bit.patch +Patch1: cdogs-sdl-0.4-default-cfg.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: SDL_mixer-devel desktop-file-utils +Requires: cdogs-data = 0.4 + +%description +C-Dogs SDL is a port of the old DOS arcade game C-Dogs to modern operating +systems utilising the SDL Media Libraries. C-Dogs is an arcade shoot-em-up +which lets players work alone and cooperatively during missions or fight +against each other in the “dogfight” deathmatch mode. The DOS version of +C-Dogs came with several built in missions and dogfight maps. This version +does too. The author of the DOS version of C-Dogs was Ronny Wester. We would +like to thank Ronny for releasing the C-Dogs sources to the public. + + +%prep +%setup -q +%patch0 -p1 -z .64bit +%patch1 -p1 -z .cfg +sed -i 's/\r//' doc/original_readme.txt +# stop this from getting installed as %doc +rm doc/INSTALL + + +%build +pushd src +make %{?_smp_mflags} DATADIR=%{_datadir}/cdogs-data \ + CFLAGS="$RPM_OPT_FLAGS -fsigned-char -lefence" I_AM_CONFIGURED=yes cdogs +popd + + +%install +rm -rf $RPM_BUILD_ROOT +# DIY, as make install wants to install the data too, and thats in another rpm +mkdir -p $RPM_BUILD_ROOT%{_bindir} +install -m 755 src/cdogs $RPM_BUILD_ROOT%{_bindir} + +mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications +desktop-file-install --vendor fedora \ + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + %{SOURCE1} + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc doc/* +%{_bindir}/cdogs +%{_datadir}/applications/fedora-%{name}.desktop + + +%changelog +* Mon Jul 16 2007 Hans de Goede 0.4-1 +- Initial Fedora Extras package diff --git a/sources b/sources index e69de29..26329f4 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +62f7e055d5febfb8d27ea7ef2c45019f cdogs-sdl-0.4.tar.bz2