LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File dolphin-emu.spec of Package game-dolphin-emu (Project home:Kenzy:packages)

%define debug_package %{nil}

# openSUSE Leap 42.x defaults to GCC 4
%if 0%{?suse_version} == 1315
%define _cxx g++-7
BuildRequires:    gcc7 gcc7-c++
%else
%define _cxx g++
BuildRequires:    gcc gcc-c++
%endif

%global Source           %(ls %{_sourcedir} | grep .xz)
%global gitrev           8bb6cf2cc4
%global commit_timestamp %(echo %{Source} | cut -c 19-28)

Name:       dolphin-emu
Summary:    Dolphin Emulator
Version:    5.0.0
Release:    %{?gitrev}.%{?dist}
Group:      System/Emulators/Other
License:    GPL-2.0
URL:        http://www.dolphin-emu.org/
Source0:    %{name}-%{version}.%{commit_timestamp}.%{gitrev}.tar.xz
Patch0:     GCC8_workaround.patch
#git clone https://github.com/dolphin-emu/dolphin.git
#BuildArch:  x86_64 armv7l aarch64

# Package names verified with, CentOS, Fedora and openSUSE.
# Should the packages in your distro be named differently,
# see http://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
#
# All other distros should work as well as Dolphin bundles
# its dependencies for static linking.

BuildRequires:  desktop-file-utils
BuildRequires:  cmake >= 2.8
BuildRequires:  gcc-c++
BuildRequires:  gtk2-devel
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(ao)
BuildRequires:  pkgconfig(bluez)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(xrandr)
BuildRequires:  pkgconfig(zlib)


%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
#BuildRequires:  systemd-devel
BuildRequires:  libusb-devel
BuildRequires:  lzo-devel
BuildRequires:  miniupnpc-devel
BuildRequires:  openal-soft-devel
BuildRequires:  mbedtls-devel
BuildRequires:  SDL2-devel
BuildRequires:  SFML-devel
BuildRequires:  SOIL-devel
BuildRequires:  soundtouch-devel
BuildRequires:  systemd-devel
BuildRequires:  libevdev-devel
BuildRequires:	libSM-devel
BuildRequires:	mesa-libGL-devel
BuildRequires:	qt5-devel
#BuildRequires:  ffmpeg ffmpeg-libs ffmpeg-devel
%endif

%if 0%{?suse_version}
BuildRequires:  libminiupnpc-devel
BuildRequires:  libSOIL-devel
BuildRequires:  sfml2-devel
BuildRequires:  wxWidgets-3_0-devel
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(libavcodec)
BuildRequires:  pkgconfig(libavformat)
BuildRequires:  pkgconfig(libavutil)
BuildRequires:  pkgconfig(libswscale)
%endif


%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.

# ------------------------------------------------------

%package lang
Summary:        Translations for Dolphin Emulator
BuildArch:      noarch

%description lang
Translations into various languages for Dolphin Emulator

%files lang
%{_datadir}/locale

# ------------------------------------------------------

%prep
%setup -q -n %{name}-%{version}.%{commit_timestamp}.%{gitrev}
%patch0 -p1

%build
export CCFLAGS='%{optflags}'

# CMake options:
# - CMAKE_CXX_COMPILER: Set GCC version
# - ENABLE_ALSA: ALSA sound back-end (on by default, crashes Qt port)
# - ENABLE_ANALYTICS: Analytics on (turn off for forks)
# - ENABLE_QT: Qt GUI (on by default)
# - DOLPHIN_WC_REVISION: Set vesion number for About window
# - DOLPHIN_WC_BRANCH: Set branch name for About window (usually set to "master")
# - USE_DISCORD_PRESENCE: Enables Discord Rich Presence, show the current game on Discord

cmake \
      -DCMAKE_CXX_COMPILER=%{_cxx} \
      -DENABLE_ALSA=OFF \
      -DENABLE_QT=ON \
      -DENABLE_ANALYTICS=ON \
      -DUSE_DISCORD_PRESENCE=ON \
      -DDOLPHIN_WC_DESCRIBE=%{version} \
      -DDOLPHIN_WC_REVISION=%{_revision} \
      -DDOLPHIN_WC_BRANCH=master \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_INSTALL_PREFIX=%{_prefix} \
#make %{?_smp_mflags}

%install
export CCFLAGS='%{optflags}'
make %{?_smp_mflags} install DESTDIR="%{?buildroot}"

# Delete static libraries
find %{buildroot} -name '*.a' -delete
# Delete development files
rm -rf %{buildroot}%{_includedir}/

%if 0%{?suse_version}
# Replace desktop file category 'Game;Emulator;' with 'System;Emulator;'
# under openSUSE or else build fails.
%suse_update_desktop_file -c %name Dolphin 'GameCube and Wii emulator' %{name} %{name} 'System;Emulator;'
%endif

%files
%defattr(-,root,root,-)
%doc license.txt Readme.md
%{_bindir}/%{name}*
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_mandir}/man6/%{name}*

%clean
rm -rf %{buildroot}

%changelog
* Thu Nov 26 2015 Muhammad Shaban <Mr.Muhammad@outlook.com> - 5.0.0-e1fe2db
- update

* Wed Nov 05 2014 Muhammad Shaban <Mr.Muhammad@outlook.com> - 4.0.2-0515ab8
- update

* Wed Oct 29 2014 Muhammad Shaban <Mr.Muhammad@outlook.com> - 4.0.2-089e32b
- initial build