Blob Blame History Raw
Name:           cdogs-sdl
Version:        0.4
Release:        3%{?dist}
Summary:        C-Dogs is an arcade shoot-em-up
Group:          Amusements/Games
License:        GPLv2+
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
Patch2:         cdogs-sdl-0.4-open.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
%patch2 -p1 -z .open
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" 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
* Tue Aug 21 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.4-3
- Rebuild for buildId

* Sun Aug 12 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.4-2
- Update License tag for new Licensing Guidelines compliance
- Fix building with new glibc open() argument checking

* Mon Jul 16 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 0.4-1
- Initial Fedora Extras package