File previous.spec of Package Previous
#
# spec file for package Previous
#
# 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: previous
Version: 2.2_r1648
Release: 0
Summary: A NeXT computer emulator based on hatari emulator source code
License: GPL-2.0+
Group: System/Emulators/Other
Url: http://previous.alternative-system.com
Source0: %{name}-%{version}.tar.xz
Source1: date_and_time_filelist.txt
Source2: %{name}.desktop
Patch6: no-install-roms.patch
BuildRequires: ImageMagick
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libpng-devel
BuildRequires: libpcap-devel
BuildRequires: cmake(sdl2)
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Previous is an emulator for the NeXT computer "black" hardware based on the hatari source code
%prep
%setup -q
#%%patch -P6 -p1
# fix builddate info
# Remove build time references so build-compare can do its work
#cp %{SOURCE1} .
#FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M')
#FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
#sed -e "s/__TIME__/\"$FAKE_BUILDTIME\"/" -i $(cat date_and_time_filelist.txt)
#sed -e "s/__DATE__/\"$FAKE_BUILDDATE\"/" -i $(cat date_and_time_filelist.txt)
%build
#%%define __builder ninja
#%%cmake
LDFLAGS="$(sdl2-config --libs)" \
CFLAGS="-O3 -fomit-frame-pointer" \
./configure --prefix=%{_prefix}
make %{?_smp_mflags}
%install
#%%cmake_install
make DESTDIR=%{buildroot} %{?_smp_mflags} install
mkdir -p %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/pixmaps
convert -resize 128x128 src/Previous-icon.bmp %{name}.png
install -m0644 %{name}.png -t %{buildroot}%{_datadir}/pixmaps
install -m0644 %{SOURCE2} -t %{buildroot}%{_datadir}/applications
%files
%defattr(-,root,root)
%doc readme.previous.txt networking.howto.txt gpl.txt
%dir %{_datadir}/%{name}
%{_bindir}/previous
%{_datadir}/previous/*.BIN
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/previous/Previous-icon.bmp
%changelog