%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 BuildRequires: alsa-lib-devel brotli-devel clang cmake dbus-devel egl-wayland-devel BuildRequires: extra-cmake-modules fontconfig-devel gcc-c++ gtk3-devel libaio-devel BuildRequires: libcurl-devel libdecor-devel libevdev-devel libICE-devel libinput-devel BuildRequires: libpcap-devel libSM-devel libX11-devel libXau-devel libxcb-devel BuildRequires: libXcomposite-devel libXcursor-devel libXext-devel libXfixes-devel BuildRequires: libXft-devel libXi-devel libxkbcommon-devel libxkbcommon-x11-devel BuildRequires: libXpresent-devel libXrandr-devel libXrender-devel lld llvm make BuildRequires: mesa-libEGL-devel mesa-libGL-devel ninja-build openssl-devel patch BuildRequires: pcre2-devel perl-Digest-SHA pipewire-devel pulseaudio-libs-devel BuildRequires: systemd-devel wayland-devel xcb-util-cursor-devel xcb-util-devel BuildRequires: xcb-util-errors-devel xcb-util-image-devel xcb-util-keysyms-devel BuildRequires: xcb-util-renderutil-devel xcb-util-wm-devel xcb-util-xrm-devel zlib-devel Requires: ffmpeg Requires: libaio libpcap pcre2 Requires: qt5-qtbase qt5-qtmultimedia Requires: rapidyaml Requires: xzhttps://seccdn.libravatar.org/avatar/3eeed604d2f5cc48ad385c073b61cf85328cd3977ad33a12c9bcc8cf72376054?s=16&d=retro 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 git submodule update --init --recursive %build cd pcsx2 .github/workflows/scripts/linux/build-dependencies-qt.sh deps cmake -B build \ -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \ -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld" \ -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \ -DCMAKE_PREFIX_PATH="$PWD/deps" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \ -DUSE_LINKED_FFMPEG=ON \ -DUSE_DISCORD_PRESENCE=ON \ -DUSE_SYSTEM_LIBS=ON \ -GNinja 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