box64/pkgbuilds/PKGBUILD-lx2160a-DEBUG

45 lines
1.2 KiB
Plaintext
Raw Normal View History

2021-11-24 10:43:12 +00:00
# Maintainer: Jai-JAP <parjailu@gmail.com>
# Author: Sebastien Chevalier <ptitseb@box86.org>
pkgname=box64-lx2160a-git
pkgver=1116.9243ea4
pkgrel=1
pkgdesc="Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices."
arch=('aarch64')
url="https://github.com/ptitSeb/box64"
license=('MIT')
optdepends=('gl4es: OpenGL 2 for GLES 2 devices')
makedepends=('git' 'cmake' 'make')
provides=("${pkgname%-git}" "${pkgname%-lx2160a-git}-git" "${pkgname%-lx2160a-git}")
conflicts=("${pkgname%-git}" "${pkgname%-lx2160a-git}-git" "${pkgname%-lx2160a-git}")
source=('git+https://github.com/ptitSeb/box64')
md5sums=('SKIP')
pkgver() {
cd "$srcdir/${pkgname%-lx2160a-git}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "${srcdir}/${pkgname%-lx2160a-git}"
if [[ ! -d ./build ]]; then
mkdir build && cd build
cmake .. -DLX2160A=1 -DCMAKE_BUILD_TYPE=Debug
fi
}
build() {
cd "$srcdir/${pkgname%-lx2160a-git}/build"
make -j$(nproc)
}
package() {
cd "$srcdir/${pkgname%-lx2160a-git}/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
}