File yabause-git.spec of Package yabause-git
%define realname yabause
Name: %{realname}-git
Version: 20180707T125000.7e38821
Release: 0
License: GPL-2.0
Summary: Emulator of Sega Saturn videogame console
Url: http://www.yabause.org
Group: System/Emulators/Other
Source: %{realname}-%{version}.tar.xz
Source1: %{realname}.desktop
Conflicts: %{realname} %{realname}-svn
BuildRequires: cmake libXi-devel Mesa-devel unzip openal-soft-devel
%if 0%{?suse_version} >= 1320
BuildRequires: libSDL2-devel libqt5-qtbase-devel libqt5-qtmultimedia-devel
Provides: %{realname}-qt5
%else
BuildRequires: libSDL-devel libqt4-devel
%endif
BuildRequires: fdupes update-desktop-files
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Yabause is a Sega Saturn emulator under GNU GPL. It currently runs on FreeBSD, GNU/Linux, Mac OS X, Windows, Dreamcast, PSP and Wii. Yabause support booting games using Saturn cds or iso files.
This package provides a GIT version of QT port.
%prep
%setup -q -n %{realname}-%{version}
%build
cd %{realname}
cmake -DCMAKE_BUILD_TYPE='Release' \
-DCMAKE_INSTALL_PREFIX='%{_prefix}' \
-DYAB_PORTS='qt' \
-DYAB_PORT_OSD='ON' \
-DYAB_NETWORK='ON' \
-DYAB_OPTIMIZED_DMA='ON'
make %{?_smp_mflags}
%install
cd %{realname}
%make_install
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications
install -m 444 %{SOURCE1} $RPM_BUILD_ROOT/%{_datadir}/applications
%suse_update_desktop_file -r %{realname} System Emulator
%fdupes %{buildroot}
%post
%if 0%{?suse_version}
%desktop_database_post
%endif
%postun
%if 0%{?suse_version}
%desktop_database_postun
%endif
%files
%defattr(-,root,root)
%doc %{_datadir}/man/man1/%{realname}.1.gz
%{_bindir}/%{realname}
%{_datadir}/%{realname}
%{_datadir}/pixmaps/%{realname}.png
%{_datadir}/applications/%{realname}.desktop
%changelog