File emilia.spec of Package emilia
#
# spec file for package emilia
#
# 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/
#
BuildRequires: libtool
BuildRequires: SDL-devel
BuildRequires: SDL_image-devel
BuildRequires: SDL_mixer-devel
BuildRequires: gcc-c++
BuildRequires: libjpeg-devel
BuildRequires: libmikmod-devel
BuildRequires: libogg-devel
BuildRequires: libpng-devel
BuildRequires: libstdc++-devel
BuildRequires: libvorbis-devel
BuildRequires: slang-devel
BuildRequires: update-desktop-files
BuildRequires: xorg-x11-Mesa-devel
BuildRequires: xorg-x11-devel
BuildRequires: xorg-x11-libs
%if 0%{?suse_version} > 1020
BuildRequires: fdupes
%endif
Name: emilia
Url: http://pinball.sourceforge.net/
Version: 0.3.1
Release: 0
Summary: Pinball game
License: GPL-1.0+
Group: Amusements/Games/Action/Arcade
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: pinball-%{version}.tar.bz2
Patch0: pinball-0.3.1-sys-ltdl.patch
Patch1: pinball-0.3.1-hiscore.patch
Patch2: pinball-0.3.1-strictproto.patch
Patch3: pinball-0.3.1-lacomment.patch
Patch4: pinball-0.3.1-cstddef.patch
%description
Emilia is a very simple pinball game that comes with
two tables you have to load first before you can start the game
%prep
%setup -n pinball-%{version}
%patch0 -p1 -z .sys-ltdl
%patch1 -p1 -z .hiscore
%patch2 -p0
%patch3 -p0
%patch4 -p0
%build
rm -fr libltdl
# sigh stop autoxxx from rerunning because of our patches above
touch aclocal.m4
touch configure
touch `find -name Makefile.in`
touch pinconfig.h.in
# cleanup a bit
chmod -x ChangeLog */*.h */*.cpp data/*/Module*.cpp
%configure \
--disable-debug
make CXXFLAGS="%optflags"
%install
make DESTDIR=%{buildroot} install
make DESTDIR=%{buildroot} -C data install
# remove unused global higescorefiles:
rm -fr $RPM_BUILD_ROOT%{_localstatedir}
# remove unused test module
rm $RPM_BUILD_ROOT%{_libdir}/pinball/libModuleTest.*
# .la files are needed for ltdl
rm $RPM_BUILD_ROOT%{_libdir}/pinball/lib*.{a,so}
# remove bogus development files
rm $RPM_BUILD_ROOT%{_bindir}/pinball-config
rm -r $RPM_BUILD_ROOT%{_includedir}/pinball
%if 0%{?suse_version} > 1020
%fdupes "%{buildroot}/%{_datadir}/pinball/"
%endif
%files
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README
%{_bindir}/pinball
%{_libdir}/pinball
%{_datadir}/pinball
%changelog