# Maintainer: Jai-JAP # Author: Sebastien Chevalier pkgname=box64 pkgver=0.1.8 pkgrel=1 pkgdesc="Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices." arch=('riscv64') url="https://github.com/ptitSeb/box64" license=('MIT') optdepends=('gl4es: OpenGL 2 for GLES 2 devices') makedepends=('git' 'cmake' 'make') provides=("${pkgname%-git}" "${pkgname%-riscv64-git}-git" "${pkgname%-riscv64-git}") conflicts=("${pkgname%-git}" "${pkgname%-riscv64-git}-git" "${pkgname%-riscv64-git}") source=("${pkgname}-${pkgver}.tar.gz::https://github.com/ptitSeb/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz") sha256sums=('f30ae33b42008ab8c00e79d506d2d771d37fe17e5cd1f27913006a16f12420fb') prepare() { cd "${srcdir}/${pkgname}-${pkgver}" if [[ ! -d ./build ]]; then mkdir build && cd build cmake .. -DRV64=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo fi } build() { cd "$srcdir/${pkgname}-${pkgver}/build" make -j$(nproc) } package() { cd "$srcdir/${pkgname}-${pkgver}/build" make DESTDIR="${pkgdir}/" install # /usr/local/bin isn't in PATH by the default, # we should move it to /usr/bin cd ${pkgdir} mv usr/local/bin/ usr/bin/ # cleanup when dir is empty rmdir usr/local || exit 0 }