File freedink.spec of Package freedink

Name:		freedink
Version:	1.08.20080920
Release:	1%{?dist}
Summary:	Adventure and role-playing game

Group:		Amusements/Games
BuildRequires:	SDL-devel SDL_gfx-devel SDL_ttf-devel SDL_image-devel SDL_mixer-devel fontconfig-devel
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
License:	GPLv3+
URL:		http://www.freedink.org/
Source0:	ftp://ftp.gnu.org/gnu/freedink/freedink-%{version}.tar.gz
#Source0:	http://www.freedink.org/snapshots/freedink-%{version}.tar.gz

BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires:	freedink-engine freedink-dfarc

%description
Dink Smallwood is an adventure/role-playing game, similar to Zelda,
made by RTsoft. Besides twisted humour, it includes the actual game
editor, allowing players to create hundreds of new adventures called
Dink Modules or D-Mods for short.

GNU FreeDink is a new and portable version of the game engine, which
runs the original game as well as its D-Mods, with close
compatibility, under multiple platforms.

This package is a metapackage to install the game, its data and a
front-end to manage game options and D-Mods.


%package engine
Summary:	Adventure and role-playing game (engine)
Group:		Amusements/Games
Requires:	freedink-data
# TiMidity++ is useful to play midis when /dev/sequencer isn't
# functional (most of the case) and installing it prevents some
# SDL_mixer freezes (see TROUBLESHOOTING).  In Fedora this is done
# through SDL_mixer dependencies.
%if 0%{?suse_version}
Requires: timidity
%endif
%if 0%{?fedora_version} >= 10
# See %install for explanation
Requires: liberation-fonts
%endif

%description engine
Dink Smallwood is an adventure/role-playing game, similar to Zelda,
made by RTsoft. Besides twisted humour, it includes the actual game
editor, allowing players to create hundreds of new adventures called
Dink Modules or D-Mods for short.

GNU FreeDink is a new and portable version of the game engine, which
runs the original game as well as its D-Mods, with close
compatibility, under multiple platforms.

This package contains the game engine alone.


%prep
%setup -q
# openSUSE does not allow empty packages, so create at least one file
%if 0%{?suse_version}
cat > README.META << EOF
This is just a meta package to require all needed packages.
EOF
%endif

%build
# Using '--disable-embedded-resources' because 'rpmbuild' will remove
# them anyway (so it can make the -debuginfo package -- too bad :/
%configure --disable-embedded-resources 
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
%if 0%{?suse_version}
%suse_update_desktop_file -i %name
%suse_update_desktop_file -i %{name}edit
%endif
%if 0%{?fedora_version} >= 10
# Policy insists on not installing a different version of "Liberation
# Sans". Beware that the system version may be different than the
# official FreeDink font, because Liberation changes regularly.
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/LiberationSans-Regular.ttf
%endif

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
# openSUSE does not allow empty packages
%if 0%{?suse_version}
%doc README.META
%endif

%files engine
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README THANKS TROUBLESHOOTING
%{_bindir}/*
%{_datadir}/applications/*
%{_datadir}/%{name}/
%{_datadir}/pixmaps/*
%{_mandir}/man6/*


%changelog
* Sat Sep 20 2008 Sylvain Beucler <beuc@beuc.net> 1.08.20080920-1
- New upstream release

* Thu Aug 28 2008 Sylvain Beucler <beuc@beuc.net> 1.08.20080828-1
- Initial package
openSUSE Build Service is sponsored by