SHA256
1
0
forked from pool/rpcs3
rpcs3/rpcs3.spec

111 lines
3.0 KiB
RPMSpec

#
# spec file for package RPCS3
#
# 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: rpcs3
Version: 0.0.2~git20170611
Release: 0
Summary: PS3 emulator/debugger
License: GPL-2.0
Url: https://rpcs3.net/
Source0: %{name}-%{version}.tar.xz
Patch0: cmake.patch
ExclusiveArch: x86_64
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: pkgconfig(glew)
BuildRequires: pkgconfig(glu)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(openal)
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(yaml-cpp)
BuildRequires: pkgconfig(libudev)
BuildRequires: vulkan-devel
BuildRequires: -post-build-checks
#ffmpeg deps
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libswscale)
BuildRequires: pkgconfig(libavformat)
#qt deps
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Widgets)
#LLVM deps
BuildRequires: libLLVM4
BuildRequires: llvm-devel
Requires(post): hicolor-icon-theme
Requires(postun): hicolor-icon-theme
Requires(post): update-desktop-files
Requires(postun): update-desktop-files
%description
An open-source PlayStation 3 emulator/debugger written in C++.
%prep
%setup -q
%patch0 -p1
#Exclude -lLLVM from linker flags
sed -i 's|set(LLVM_LIBS LLVM)|set(LLVM_LIBS)|g' %{name}/CMakeLists.txt
%build
cmake . \
-DUSE_SYSTEM_FFMPEG="ON" \
-DUSE_SYSTEM_LIBPNG="ON" \
-DCMAKE_INSTALL_PREFIX="%{_prefix}" \
-DCMAKE_INSTALL_LIBEXEC="%{_libexecdir}" \
-DCMAKE_C_FLAGS="%{optflags}" \
-DCMAKE_CXX_FLAGS="%{optflags}" \
-DCMAKE_BUILD_TYPE="RelWithDebugInfo" \
-DCMAKE_SKIP_RPATH="YES" \
-DCMAKE_EXE_LINKER_FLAGS="-ldl -lyaml-cpp $(llvm-config --libs mcjit vectorize ipo x86codegen x86disassembler)"
%make_jobs
%post
%desktop_database_post
%icon_theme_cache_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%install
#move compiled binary to expected folder
mv %{name}/%{name} bin/%{name}
%make_install
%files
%defattr(-,root,root)
#Fix SLE_12_SP2 and LEAP 42.1 builds
%if 0%{?sle_version} <= 120200 && 0%{?suse_version} <= 1320
%doc README.md LICENSE
%else
%doc README.md
%license LICENSE
%endif
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%changelog