File dosbox.spec of Package dosbox

#
# spec file for package dosbox
#
# Copyright (c) 2013 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:           dosbox
BuildRequires:  Mesa-devel
BuildRequires:  SDL_sound-devel
BuildRequires:  alsa-devel
BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  libpng-devel
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(glu)
BuildRequires:  pkgconfig(sdl)
%if 0%suse_version > 1020
BuildRequires:  SDL_net-devel
%else
BuildRequires:  SDL_net
%endif
Url:            http://dosbox.sourceforge.net/
Version:        0.74
Release:        0
Summary:        DOS Emulator Well-Suited for Playing Games
License:        GPL-2.0+
Group:          System/Emulators/PC
Source:         http://switch.dl.sourceforge.net/sourceforge/dosbox/dosbox-%{version}.tar.gz
Source1:        dosbox.desktop
Source2:        dosbox.png
Patch:          dosbox-0.71-manpage.diff
Patch2:         gcc46.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
dosbox is a DOS emulator that, thanks to its good graphics and sound
emulation, is exceptionally well-suited for playing games. dosbox
features a built-in DOS operating system and transparent access to the
Linux file system and is therefore very easy to use.

%prep
%setup -q
%patch -p1
%patch2

%build
autoreconf -f -i
CFLAGS="%{optflags}" \
CXXFLAGS="%{optflags} -fno-strict-aliasing" \
%configure
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install 
# we copy the docu ourself
rm -rf %{buildroot}%{_datadir}/doc/dosbox
install -d -m 755 %{buildroot}%{_datadir}/pixmaps
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/dosbox.png
%suse_update_desktop_file -i %name Emulator

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README THANKS 
%{_bindir}/dosbox
%{_mandir}/man?/*
%{_datadir}/applications/*
%{_datadir}/pixmaps/*

%changelog
openSUSE Build Service is sponsored by