%global debug_package %{nil}
%global toolchain clang

Name:           PS3Dec
Version:        git.g7d1d27f
Release:        1%{?dist}
Summary:        An alternative ISO encryptor/decryptor for PS3 disc images

License:        WTFPL and ASL 2.0 or GPLv2+
URL:            https://github.com/al3xtjames/%{name}

BuildRequires:  clang
BuildRequires:  cmake
BuildRequires:  git-core
BuildRequires:  libomp-devel

%description
This is a slightly modified version of PS3Dec r5, using statically-linked mbedTLS for AES encryption/decryption and CMake as the build system.


%prep
git clone --depth=1 --recurse-submodules %{url}


%build
mkdir -p %{_builddir}/%{name}/build
cd %{_builddir}/%{name}/build
%cmake -S %{_builddir}/%{name}
cd %{_builddir}/%{name}/build/redhat-linux-build
%make_build


%install
mkdir -p %{buildroot}%{_bindir}
install -m 755 %{_builddir}/%{name}/build/redhat-linux-build/Release/%{name} %{buildroot}%{_bindir}/


%files
%{_bindir}/%{name}


%changelog
* Fri Aug 02 2024 David Andres Ramirez Salomon <david35mm@disroot.org> - git.g7d1d27f-1
- First build