File egoboo.spec of Package egoboo
#
# spec file for package egoboo
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: egoboo
Version: 2.8.1
Release: 0
Summary: A top down graphical (3D) RPG in the spirit of Nethack
License: GPL-3.0+
Group: Amusements/Games/RPG
Url: http://egoboo.sourceforge.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Source1: %{name}.png
Source2: %{name}.desktop
# PATCH-FIX-UPSTREAM egoboo-2.8.1-add-destdir.patch
Patch0: egoboo-2.8.1-add-destdir.patch
# PATCH-FIX-UPSTREAM egoboo-2.8.1-use-datadir-for-config.patch
Patch1: egoboo-2.8.1-use-datadir-for-config.patch
# PATCH-FIX-UPSTREAM egoboo-2.8.1-link-against-libm.patch
Patch2: egoboo-2.8.1-link-against-libm.patch
BuildRequires: fdupes
BuildRequires: Mesa-devel
BuildRequires: SDL-devel
BuildRequires: SDL_image-devel
BuildRequires: SDL_mixer-devel
BuildRequires: SDL_ttf-devel
BuildRequires: dos2unix
BuildRequires: physfs-devel
BuildRequires: update-desktop-files
Requires: %{name}-data = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Egoboo is a top down rpg in the spirit of Nethack and other games of the
Roguelike genre. It uses OpenGL graphics and will have randomly generated
maps and customizable characters. The objective of the project is to bring the
fun and depth of roguelike gameplay, kicking and screaming, into the third
dimension.
%package data
Summary: Data files for the Egoboo RPG
Group: Amusements/Games/RPG
Requires: egoboo = %{version}
BuildArch: noarch
%description data
Data files for the Egoboo RPG.
%prep
%setup -q
%patch0 -p1 -b .destdir~
%patch1 -p1 -b .conf_dir~
%patch2 -p1 -b .libm~
for f in `find -name \*.c -o -name \*.h -o -name README\* -o -name change.log -o -name \*.txt -o -name \*.TXT`; do
dos2unix $f
chmod 644 $f
done
find -name \*.pdf -exec chmod 644 {} \;
%build
cd src
make %{?_smp_mflags} OPT='-DPREFIX=\"%{_prefix}\" -D_NIX_PREFIX -Wall %{optflags}'
%install
cd src
make install PREFIX=%{buildroot}%{_prefix}
cd ..
install -D -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -D -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/applications/%{name}.desktop
%suse_update_desktop_file %{name}
cp -rp basicdat modules %{buildroot}%{_datadir}/egoboo
%fdupes %{buildroot}%{_datadir}/egoboo
%files
%defattr(-,root,root,-)
%doc BUGS.txt Changelog.txt license.txt src/README.Linux src/DEPENDENCIES.txt src/game/change.log doc
%{_bindir}/%{name}
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/controls.txt
%{_datadir}/%{name}/setup.txt
%{_datadir}/applications/egoboo.desktop
%{_datadir}/pixmaps/%{name}.png
%files data
%defattr(-,root,root,-)
%doc BUGS.txt Changelog.txt license.txt
%dir %{_datadir}/%{name}/basicdat
%dir %{_datadir}/%{name}/modules
%{_datadir}/%{name}/basicdat/*
%{_datadir}/%{name}/modules/*
%changelog