ppsspp/ppsspp.spec

109 lines
3.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package ppsspp
#
# 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/
#
%define debug_package %{nil}
Name: ppsspp
Version: 1.3+git
Release: 0
Summary: PlayStation Portable Emulator
License: GPL-2.0+
Group: System/Emulators/Other
Url: ppsspp.org
Source0: %{name}-%{version}.tar.xz
Patch0: disable-buildtime-git-version-creation.patch
BuildRequires: Mesa-devel
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: libqt5-qttools-devel
BuildRequires: libzip-devel
BuildRequires: pkgconfig
BuildRequires: snappy-devel
BuildRequires: unzip
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5OpenGL)
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(zlib)
%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).
PPSSPP can thus run on quite low-spec hardware, including stronger ARM-based phones and tablets, as long as there's support for OpenGL ES 2.0.
This package contains a GIT snapshot. Updated frequently.
%prep
%setup -q
# give PPSSPP a clue about lrelease
sed -i -e '/LREL_TOOL/s:lrelease$:lrelease-qt5:g' Qt/PPSSPP.pro
%patch0 -p1
#%patch1 -p1
echo "// This is a generated file.
const char *PPSSPP_GIT_VERSION = \"%{version}\";
// If you don't want this file to update/recompile, change to 1.
#define PPSSPP_GIT_VERSION_NO_UPDATE 1
" > git-version.cpp
# try to force usage of system libraries
#rm -rf ext/zlib
#rm -rf ext/snappy
#rm -rf native/ext/libzip
%build
mkdir build
cd build
%qmake5 \
QMAKE_CFLAGS="%{optflags} ${CFLAGS}" \
QMAKE_CXXFLAGS="%{optflags} ${CXXFLAGS}" \
'CONFIG+=release' \
../Qt/PPSSPPQt.pro
%make_jobs
%install
install -D -p -m 755 build/ppsspp %{buildroot}%{_bindir}/ppsspp
for icon in assets/unix-icons/hicolor/*/*/*.png; do
install -D -p -m 644 "${icon}" \
"%{buildroot}%{_datadir}/icons/${icon#assets/unix-icons}"
done
%suse_update_desktop_file -c %{name} PPSSPP 'PSP Emulator' %{name} %{name} System Emulator
%post
%desktop_database_post
%icon_theme_cache_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%files
%defattr(-,root,root)
%doc README.md LICENSE.TXT
%{_bindir}/%{name}
%dir %{_datadir}/icons/hicolor/512x512
%dir %{_datadir}/icons/hicolor/512x512/apps
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_datadir}/applications/%{name}.desktop
%changelog