%global timestamp %(date +%%Y%%m%%d) Name: pcsx2 Version: %{timestamp} Release: 1%{?dist} Summary: PCSX2 - The Playstation 2 Emulator License: GPLv3 URL: https://github.com/PCSX2/pcsx2 Source0: https://github.com/PCSX2/pcsx2/archive/refs/heads/master.tar.gz Patch0: https://pagure.io/PCSX2/raw/master/f/version-fixes.diff BuildRequires: gcc cmake make git ninja-build lld clang BuildRequires: qt6-qtbase-devel qt6-qtbase-private-devel qt6-qttools-devel BuildRequires: rapidyaml-devel extra-cmake-modules BuildRequires: libaio-devel xz-devel BuildRequires: wayland-devel ffmpeg-free-devel BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(fmt) BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(libpcap) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(libzip) BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(soundtouch) BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(x11-xcb) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(libzstd) Requires: ffmpeg Requires: libaio Requires: qt5-qtbase qt5-qtmultimedia Requires: rapidyaml Requires: xz Requires: zstd %description PCSX2 is a free and open-source PlayStation 2 (PS2) emulator. Its purpose is to emulate the PS2's hardware, using a combination of MIPS CPU Interpreters, Recompilers and a Virtual Machine which manages hardware states and PS2 system memory. This allows you to play PS2 games on your PC, with many additional features and benefits. %prep git clone https://github.com/PCSX2/pcsx2 --recursive cd pcsx2 %patch -P 0 git submodule update --init --recursive %build cd pcsx2 cmake -B build --preset=clang-release -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \ -DUSE_DISCORD_PRESENCE=ON \ -DUSE_LINKED_FFMPEG=ON \ -DUSE_SYSTEM_LIBS=ON \ ninja -C build \ %{?_smp_mflags} %install cd pcsx2 install -d "%{buildroot}/usr/bin" install -d "%{buildroot}/opt/PCSX2" install -d "%{buildroot}/usr/share/doc/PCSX2" cp -r build/bin/* "%{buildroot}/opt/PCSX2" install -Dm644 COPYING.GPLv3 COPYING.LGPLv3 README.md "%{buildroot}/usr/share/doc/PCSX2" install -Dm644 .github/workflows/scripts/linux/pcsx2-qt.desktop "%{buildroot}/usr/share/applications/PCSX2.desktop" install -Dm644 build/bin/resources/icons/AppIconLarge.png "%{buildroot}/usr/share/icons/hicolor/512x512/apps/PCSX2.png" cd "%{buildroot}" ln -sr "opt/PCSX2/pcsx2-qt" "usr/bin/pcsx2-qt" %files %{_bindir}/pcsx2-qt %{_datarootdir}/applications/PCSX2.desktop %{_datarootdir}/icons/hicolor/512x512/apps/PCSX2.png /opt/PCSX2/ %doc /usr/share/doc/PCSX2/README.md %license /usr/share/doc/PCSX2/COPYING.GPLv3 %license /usr/share/doc/PCSX2/COPYING.LGPLv3