%global forgeurl https://github.com/ptitSeb/box64 %global common_description %{expand: 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).} %global tag 0.4.5.1 # Exact upstream tag; may carry a -N suffix rpm Version can't hold %global tag_ref v0.4.5-1 %global tag_ref_nov %(echo %{tag_ref} | sed 's/^v//') Name: box64 Version: %{tag} Epoch: 1 Release: 3%{?dist} Summary: Linux userspace x86_64 emulator with a twist, targeted at ARM64 License: MIT URL: https://box86.org Source0: %{forgeurl}/archive/%{tag_ref}/%{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: gcc BuildRequires: make BuildRequires: perl-podlators BuildRequires: systemd-rpm-macros ExclusiveArch: aarch64 %global __requires_exclude_from ^%{_bindir}/box64-bash$ %global __provides_exclude_from ^%{_bindir}/box64-bash$ Requires: %{name}-data = %{epoch}:%{version}-%{release} Recommends: %{name}-binfmts = %{epoch}:%{version}-%{release} Requires(post): %{_sbindir}/update-alternatives Requires(postun): %{_sbindir}/update-alternatives %description %{common_description} %package data Summary: Common files for %{name} BuildArch: noarch %description data %{common_description} This package provides common data files for box64. %package binfmts Summary: binfmt_misc handler configurations for box64 %description binfmts %{common_description} This package provides binfmt_misc handler configurations to use box64 to execute x86_64 binaries. %package asahi Summary: Apple Silicon version of box64 Requires: %{name}-data = %{epoch}:%{version}-%{release} Requires(post): %{_sbindir}/update-alternatives Requires(postun): %{_sbindir}/update-alternatives %description asahi %{common_description} This package contains a version of box64 targeting Apple Silicon systems using a 16k page size. %prep %autosetup -n %{name}-%{tag_ref_nov} -p1 # Remove prebuilt libraries rm -r x64lib # Fix encoding sed -i 's/\r$//' docs/*.md # Fix install paths sed -i 's:/etc/binfmt.d:%{_binfmtdir}:g' CMakeLists.txt %build %global common_flags -DARM_DYNAREC=ON -DNOGIT=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBOX32=ON -DBOX32_BINFMT=ON -DBOX32_FMT=ON # Apple Silicon %cmake %{common_flags} -DM1=ON %cmake_build cp -p %{__cmake_builddir}/%{name} %{name}.asahi rm -r %{__cmake_builddir} %cmake %{common_flags} -DNO_LIB_INSTALL=ON -DARM64=ON %cmake_build # Build manpage pod2man --stderr docs/%{name}.pod > docs/%{name}.1 %install %cmake_install # Install manpage install -Dpm0644 -t %{buildroot}%{_mandir}/man1 docs/%{name}.1 mv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}.aarch64 touch %{buildroot}%{_bindir}/%{name} chmod +x %{buildroot}%{_bindir}/%{name} install -Dpm0755 -t %{buildroot}%{_bindir} \ %{name}.asahi tests/box64-bash %post %{_sbindir}/update-alternatives --install %{_bindir}/%{name} \ %{name} %{_bindir}/%{name}.aarch64 20 %postun if [ $1 -eq 0 ] ; then %{_sbindir}/update-alternatives --remove %{name} %{_bindir}/%{name}.aarch64 fi %post asahi %{_sbindir}/update-alternatives --install %{_bindir}/%{name} \ %{name} %{_bindir}/%{name}.asahi 10 %postun asahi if [ $1 -eq 0 ] ; then %{_sbindir}/update-alternatives --remove %{name} %{_bindir}/%{name}.asahi fi %files %ghost %{_bindir}/%{name} %{_bindir}/%{name}.aarch64 %{_bindir}/box64-configurator %{_bindir}/box64-bash %files asahi %ghost %{_bindir}/%{name} %{_bindir}/%{name}.asahi %{_bindir}/box64-bash %files data %license LICENSE %doc README.md %doc %lang(cn) README_CN.md %doc %lang(uk) README_UK.md %doc docs/*.md docs/img %{_mandir}/man1/box64.1* %config(noreplace) %{_sysconfdir}/box64.box64rc %{_datadir}/applications/box64-configurator.desktop %files binfmts %{_binfmtdir}/box32.conf %{_binfmtdir}/box64.conf %changelog * Tue Oct 06 2026 Lachlan Marie - 1:0.4.5.1-3 - Add Epoch to fix version ordering - Ship box64-bash * Fri Aug 21 2026 Lachlan Marie - 0.4.5.1-2 - Update to 0.4.5.1 * Tue Jun 09 2026 Lachlan Marie - 0.4.33-1 - Update to 0.4.33 * Wed Jun 03 2026 Lachlan Marie - 0.4.32-1 - Update to 0.4.32 * Mon Apr 27 2026 Lachlan Marie - 0.4.31-1 - Update to 0.4.31 * Tue Apr 21 2026 Lachlan Marie - 0.4.2-1 - Update to 0.4.2 ## START: Generated by rpmautospec * Sun Jan 04 2026 Lachlan Marie - 0.4.0-1 - Update to 0.4.0 * Sun Dec 07 2025 Lachlan Marie - 0.3.8-2 - Update to 0.3.8 - Apple silicon only * Wed Aug 06 2025 Davide Cavalca - 0.3.6-1 - Update to 0.3.6; Fixes: RHBZ#2370862 * Wed Jul 23 2025 Fedora Release Engineering - 0.3.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Tue Mar 11 2025 Davide Cavalca - 0.3.4-1 - Update to 0.3.4; Fixes: RHBZ#2351162 * Wed Feb 12 2025 Davide Cavalca - 0.3.2-3 - Do not install binfmt_misc configs on x86_64; Fixes: RHBZ#2344770 * Thu Jan 16 2025 Fedora Release Engineering - 0.3.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Sat Dec 21 2024 Davide Cavalca - 0.3.2-1 - Update to 0.3.2; Fixes: RHBZ#2330808 * Sat Nov 02 2024 Teoh Han Hui - 0.3.0-1 - Update to 0.3.0 * Wed Jul 17 2024 Fedora Release Engineering - 0.2.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Wed May 22 2024 Davide Cavalca - 0.2.8-1 - Update to 0.2.8; Fixes: RHBZ#2282278 * Wed Jan 24 2024 Davide Cavalca - 0.2.6-1 - Update to 0.2.6; Fixes: RHBZ#2254840 * Tue Jan 23 2024 Fedora Release Engineering - 0.2.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jan 19 2024 Fedora Release Engineering - 0.2.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Wed Aug 23 2023 Davide Cavalca - 0.2.4-1 - Update to 0.2.4 * Wed Aug 23 2023 Davide Cavalca - 0.2.2-1 - Initial import; Fixes: RHBZ#2217227 ## END: Generated by rpmautospec