From 0f8323ffdeb257f185292560a6626c6abc10137b Mon Sep 17 00:00:00 2001 From: Bart De Vries Date: Wed, 7 Jul 2021 15:36:26 +0200 Subject: [PATCH] Initial version of box64-git --- .SRCINFO | 17 +++++++++++++++++ PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..c6f96de --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = box64-git + pkgdesc = Linux Userspace x86_64 Emulator with a twist + pkgver = v0.1.2.r237.g1cb55b2 + pkgrel = 1 + url = https://github.com/ptitSeb/box64 + arch = x86_64 + arch = aarch64 + license = MIT + makedepends = git + makedepends = cmake + depends = gcc-libs + provides = box64 + conflicts = box64 + source = git+https://github.com/ptitSeb/box64.git#branch=main + sha256sums = SKIP + +pkgname = box64-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..be51d1c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: Bart De Vries + +_pkgname=box64 +pkgname=${_pkgname}-git +pkgver=v0.1.2.r237.g1cb55b2 +pkgrel=1 +pkgdesc='Linux Userspace x86_64 Emulator with a twist' +arch=('x86_64' 'aarch64') +url='https://github.com/ptitSeb/box64' +license=('MIT') +depends=('gcc-libs') +#optdepends=('') +makedepends=('git' 'cmake') +provides=(box64) +conflicts=(box64) +source=("git+https://github.com/ptitSeb/box64.git#branch=main") +sha256sums=('SKIP') + +pkgver() { + cd ${_pkgname} + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd ${_pkgname} + if [[ $CARCH == "aarch64" ]]; then + cmake -B build -S . \ + -DARM_DYNAREC=ON \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX=/usr + elif [[ $CARCH == "x86_64" ]]; then + cmake -B build -S . \ + -DLD80BITS=1 -DNOALIGN=1 \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX=/usr + fi + make -C build +} + +package() { + cd ${_pkgname}/build + if [[ $CARCH == "aarch64" ]]; then + make DESTDIR=${pkgdir} install + elif [[ $CARCH == "x86_64" ]]; then + install -Dm755 box64 -t "${pkgdir}/usr/bin/" + fi + + install -Dm644 ../LICENSE -t "${pkgdir}/usr/share/licenses/${_pkgname}/" + + # Install documentation + install -d "${pkgdir}/usr/share/doc/${_pkgname}/" + cp -R ../docs/* "${pkgdir}/usr/share/doc/${_pkgname}/" + +}