File caprice32.spec of Package caprice32

#
# spec file for package caprice32
#
# 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:           caprice32
Version:        4.2.0
Release:        0
Summary:        Amstrad CPC Emulator
License:        GPL-2.0
Group:          System/Emulators/Other
# http://www.caprice32.cybercube.com is dead
Url:            http://caprice32.sourceforge.net
Source:         %{name}-%{version}-src.zip
Patch0:         %{name}.dif
Patch1:         %{name}-overflow.patch
BuildRequires:  SDL-devel
BuildRequires:  dos2unix
BuildRequires:  gcc-c++
BuildRequires:  unzip
BuildRequires:  xorg-x11-Mesa-devel
BuildRequires:  zlib-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Caprice32 is a software emulator of the Amstrad CPC 8bit home computer
series. The emulator faithfully imitates the CPC464, CPC664, and CPC6128
models. By recreating the operations of all hardware components at a low
level, the emulator achieves a high degree of compatibility with original
CPC software. These programs or games can be run unmodified at real-time
or higher speeds, depending on the emulator host environment.

%prep
%setup -q -c -T
unzip %{SOURCE0}
%patch0
%patch1
sed -e 's|__ROMDIR__|%{_datadir}|' -i cap32.cpp
dos2unix README.txt

%build
# build section
make %{?_smp_mflags} -f makefile.unix CFLAGS="%{optflags} -std=gnu++98 -fno-strict-aliasing `sdl-config --cflags`"

%install
# install section
install -D -m 755 cap32 %{buildroot}%{_bindir}/cap32
install -d -m 755 %{buildroot}%{_datadir}/caprice32
cp -a rom %{buildroot}%{_datadir}/caprice32

%files
%defattr(-,root,root)
%doc README.txt COPYING.txt
%{_bindir}/cap32
%{_datadir}/caprice32

%changelog
openSUSE Build Service is sponsored by