File dolphin-emu.spec of Package dolphin-emu

#
# spec file for package dolphin-emu
#
# Copyright (c) 2017 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/
#


%define _revision f9f4381461
%define _revision_description 5.0-2750

Name:           dolphin-emu
Version:        5.0+git.1488759976.f9f4381461
Release:        0
Summary:        GameCube / Wii Emulator
License:        GPL-2.0+
Group:          System/Emulators/Other
Url:            https://dolphin-emu.org/
Source:         %{name}-%{version}.tar.xz
Patch1:         dolphin-emu-remove-obsolete-xinerama-check.patch
BuildRequires:  alsa-devel
BuildRequires:  bluez-devel
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  gcc-c++ >= 4.9
BuildRequires:  git
BuildRequires:  libSM-devel
BuildRequires:  libXrandr-devel
BuildRequires:  libXxf86vm-devel
BuildRequires:  libao-devel
BuildRequires:  libcurl-devel
BuildRequires:  libevdev-devel
BuildRequires:  libgtest0
BuildRequires:  libminiupnpc-devel
BuildRequires:  libpng-devel
BuildRequires:  lzo-devel
BuildRequires:  mbedtls-devel
BuildRequires:  ninja
BuildRequires:  openal-soft-devel
BuildRequires:  pkg-config
BuildRequires:  portaudio-devel
BuildRequires:  soundtouch-devel
%if 0%{?suse_version} > 1315
BuildRequires:  sfml2-devel
%endif
BuildRequires:  gtk2-devel
BuildRequires:  update-desktop-files
BuildRequires:  zlib-devel
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(libavcodec)
BuildRequires:  pkgconfig(libavformat)
BuildRequires:  pkgconfig(libavutil)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(libswscale)
BuildRequires:  pkgconfig(libudev)
BuildRequires:  pkgconfig(libusb-1.0)
BuildRequires:  pkgconfig(xi)
ExclusiveArch:  x86_64 aarch64

%description
Dolphin is an emulator for two Nintendo video game consoles, GameCube and the Wii.
It allows PC gamers to enjoy games for these two consoles in full HD with several
enhancements such as compatibility with all PC controllers, turbo speed,
networked multiplayer, and more.
Most games run perfectly or with minor bugs.

%lang_package

%prep
%setup -q
%patch1 -p1

%build
export CCFLAGS='%{optflags}'
cmake . \
    -DDISTRIBUTOR=openSUSE \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DCMAKE_INSTALL_PREFIX=%{_prefix} \
    -DENABLE_LTO=OFF \
    -DDOLPHIN_WC_DESCRIBE=%{_revision_description} \
    -DDOLPHIN_WC_REVISION=%{_revision} \
    -DDOLPHIN_WC_BRANCH="master" \
    -DDOLPHIN_WC_IS_STABLE=0 \
    -G "Ninja"
ninja

%install
export CCFLAGS='%{optflags}'
DESTDIR=%{buildroot} ninja install

mkdir -p %{buildroot}%{_udevrulesdir}
install -m 0644 Data/51-usb-device.rules %{buildroot}%{_udevrulesdir}/51-dolphin-usb-device.rules

# Remove gtest
rm -rf %{buildroot}%{_prefix}/lib/libgtest*
rm -rf %{buildroot}%{_includedir}/gtest

%fdupes -s %{buildroot}
%find_lang %{name}

%suse_update_desktop_file -c %name Dolphin 'GameCube / Wii Emulator' %{name} %{name} 'System;Emulator;'

%files lang -f %name.lang

%files
%defattr(0644, root, root, 0755)
%doc license.txt
%attr(0755, root, root) %{_bindir}/%{name}
%attr(0755, root, root) %{_bindir}/%{name}-nogui
%{_datadir}/%{name}
%{_datadir}/icons/*
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man6/dolphin-emu.6%{ext_man}
%{_mandir}/man6/dolphin-emu-nogui.6%{ext_man}
%{_udevrulesdir}/51-dolphin-usb-device.rules

%changelog
openSUSE Build Service is sponsored by