File neo4all.spec of Package neo4all

#
# spec file for package neo4all
#
# Copyright (c) 2016 SUSE LINUX 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:           neo4all
Version:        rc4
Release:        0
Summary:        SNK Neo Geo CD and AES/MVS Emulators
License:        GPL-2.0+
Group:          System/Emulators/Other
Url:            http://chui.dcemu.co.uk/neo4all.html
Source0:        http://chui.dcemu.co.uk/releases/%{name}-src-%{version}.tar.bz2
Patch0:         %{name}-Makefile.patch
Patch1:         %{name}-paths.patch
Patch2:         sinddiebescheuert.patch
BuildRequires:  SDL-devel
BuildRequires:  SDL_image-devel
BuildRequires:  SDL_mixer-devel
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  nasm
BuildRequires:  xorg-x11-Mesa-devel
BuildRequires:  zlib-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %{ix86}

%description
Neo Geo CD (neo4all) and AES/MVS (aes4all) emulators. Neo Geo ROM sets have to
be converted to aes4all format using the included convertneo tool. convertneo
expects BIOS files in %{_datadir}/neo4all/bios.

%prep
%setup -q -n %{name}-src-%{version}
%patch0 -p1
%patch1 -p1
#%%patch2

%build
pushd neo4all
make -f Makefile.linux %{?_smp_mflags}
find -name *.o -delete
make -f Makefile.linux %{?_smp_mflags} AES=1
popd
pushd convertneo
make -f Makefile.linux %{?_smp_mflags}
make %{?_smp_mflags}
popd

%install
install -d -m 755 %{buildroot}%{_prefix}/bin
install -d -m 755 %{buildroot}%{_datadir}/neo4all
cp -a neo4all/data -t %{buildroot}%{_datadir}/neo4all
cp -a convertneo/bios convertneo/prefetch -t %{buildroot}%{_datadir}/neo4all
install -m 644 convertneo/romrc.linux %{buildroot}%{_datadir}/neo4all/romrc
install -m 755 neo4all/neo4all neo4all/aes4all convertneo/convertneo -t %{buildroot}%{_bindir}
%fdupes -s %{buildroot}

%files
%defattr(-,root,root)
%{_bindir}/aes4all
%{_bindir}/convertneo
%{_bindir}/neo4all
%dir %{_datadir}/neo4all
%{_datadir}/neo4all/bios
%{_datadir}/neo4all/data
%{_datadir}/neo4all/prefetch
%{_datadir}/neo4all/romrc

%changelog
openSUSE Build Service is sponsored by