add headless build
OBS-URL: https://build.opensuse.org/package/show/Emulators/ppsspp?expand=0&rev=81
This commit is contained in:
parent
5e555878b4
commit
036645a8a7
43
ppsspp.spec
43
ppsspp.spec
@ -69,6 +69,13 @@ Requires: %{name}-common
|
||||
%description
|
||||
PPSSPP is a PSP emulator written in C++, and translates PSP CPU instructions directly into optimized x86, x64 and ARM machine code, using JIT recompilers (dynarecs).
|
||||
|
||||
%package headless
|
||||
Summary: PPSSPP headless
|
||||
Group: System/Emulators/Other
|
||||
|
||||
%description headless
|
||||
PPSSPP headless build
|
||||
|
||||
%package qt
|
||||
Summary: PPSSPP Qt backend
|
||||
Group: System/Emulators/Other
|
||||
@ -110,9 +117,20 @@ const char *PPSSPP_GIT_VERSION = \"%{version}\";
|
||||
|
||||
#Restore -DUSE_SYSTEM_FFMPEG="ON" \ once ffmpeg bug is fixed upstream
|
||||
|
||||
mkdir build-qt build
|
||||
mkdir build-headless build-qt build
|
||||
|
||||
cd build-qt
|
||||
cd build-headless
|
||||
cmake .. \
|
||||
-DUSE_FFMPEG="ON" \
|
||||
-DHEADLESS="ON" \
|
||||
-DCMAKE_C_FLAGS="%optflags" \
|
||||
-DCMAKE_CXX_FLAGS="%optflags" \
|
||||
-DCMAKE_BUILD_TYPE="Release|RelWithDebugInfo" \
|
||||
-DCMAKE_SKIP_RPATH="YES" \
|
||||
-Wno-dev
|
||||
%make_jobs
|
||||
|
||||
cd ../build-qt
|
||||
cmake .. \
|
||||
-DUSE_FFMPEG="ON" \
|
||||
-DUSING_QT_UI="ON" \
|
||||
@ -139,6 +157,11 @@ mkdir -p %{buildroot}%{_bindir}
|
||||
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
||||
|
||||
#setup wrapper(s)
|
||||
cat > %{buildroot}%{_bindir}/%{name}-headless << 'EOF'
|
||||
#!/bin/sh
|
||||
exec %{_libexecdir}/%{name}/%{name}-headless "$@"
|
||||
|
||||
EOF
|
||||
|
||||
cat > %{buildroot}%{_bindir}/%{name}-qt << 'EOF'
|
||||
#!/bin/sh
|
||||
@ -153,6 +176,7 @@ exec %{_libexecdir}/%{name}/%{name} "$@"
|
||||
EOF
|
||||
|
||||
#install files
|
||||
install -m 755 -D build-headless/PPSSPPHeadless %{buildroot}%{_libexecdir}/%{name}/%{name}-headless
|
||||
|
||||
install -m 755 -D build-qt/PPSSPPQt %{buildroot}%{_libexecdir}/%{name}/%{name}-qt
|
||||
|
||||
@ -177,24 +201,29 @@ install -m 444 -D icons/icon.svg %{buildroot}%{_datadir}/pixmaps/%{name}.svg
|
||||
%desktop_database_postun
|
||||
%icon_theme_cache_postun
|
||||
|
||||
%files headless
|
||||
%defattr(644,root,root)
|
||||
%attr(755,root,root) %{_bindir}/%{name}-headless
|
||||
%attr(755,root,root) %{_libexecdir}/%{name}/%{name}-headless
|
||||
|
||||
%files qt
|
||||
%defattr(-,root,root)
|
||||
%defattr(644,root,root)
|
||||
%attr(755, root, root) %{_bindir}/%{name}-qt
|
||||
%{_libexecdir}/%{name}/%{name}-qt
|
||||
%attr(755, root, root) %{_libexecdir}/%{name}/%{name}-qt
|
||||
%{_datadir}/applications/%{name}-qt.desktop
|
||||
|
||||
%files common
|
||||
%defattr(-,root,root)
|
||||
%defattr(644,root,root)
|
||||
%doc README.md
|
||||
%license LICENSE.TXT
|
||||
%{_libexecdir}/%{name}/assets
|
||||
%{_datadir}/pixmaps/%{name}.svg
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%defattr(644,root,root)
|
||||
%dir %{_libexecdir}/%{name}
|
||||
%attr(755, root, root) %{_bindir}/%{name}
|
||||
%{_libexecdir}/%{name}/%{name}
|
||||
%attr(755, root, root) %{_libexecdir}/%{name}/%{name}
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user