## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global forgeurl https://github.com/ptitSeb/box64 # Build for Apple Silicon systems %bcond_with asahi Name: box64 Version: 0.2.2 Release: %autorelease Summary: Linux userspace x86_64 emulator with a twist, targeted at ARM64 License: MIT URL: https://box86.org Source: %{forgeurl}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: gcc BuildRequires: make BuildRequires: systemd-rpm-macros ExcludeArch: %{ix86} s390x %description Box64 lets you run x86_64 Linux programs (such as games) on non-x86_64 Linux systems, like ARM (host system needs to be 64-bit little-endian). %prep %autosetup -p1 # Remove prebuild libraries rm -r x64lib # Fix permissions and encoding chmod -x docs/*.md docs/img/*.png sed -i 's/\r$//' docs/*.md %build %cmake \ %ifarch aarch64 %if %{with asahi} -DM1=ON \ %else -DARM_DYNAREC=ON \ %endif %endif %ifarch ppc64le -DPPC64LE=ON \ %endif %ifarch x86_64 -DLD80BITS=ON \ -DNOALIGN=ON \ %endif -DNOGIT=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo %cmake_build %install %ifarch x86_64 # Install manually as cmake_install doesn't seem to work on x86_64 install -Dpm0755 -t %{buildroot}%{_bindir} %{__cmake_builddir}/%{name} install -Ddpm0755 %{buildroot}%{_binfmtdir} sed 's:${CMAKE_INSTALL_PREFIX}/bin/${BOX64}:%{_bindir}/%{name}:' \ < system/box64.conf.cmake > system/box64.conf install -Dpm0644 -t %{buildroot}%{_binfmtdir} system/box64.conf %else %cmake_install %endif %check %ctest || true %files %license LICENSE %doc docs/*.md docs/img %{_bindir}/%{name} %{_binfmtdir}/box64.conf %changelog * Sat Jun 24 2023 John Doe - 0.2.2-1 - Uncommitted changes