diff --git a/archlinux/PKGBUILD-arm64 b/archlinux/PKGBUILD-arm64 new file mode 100644 index 00000000..13799481 --- /dev/null +++ b/archlinux/PKGBUILD-arm64 @@ -0,0 +1,44 @@ +# Maintainer: Jai-JAP +# Contributor: Sebastien Chevalier +pkgname=box64-arm64-git +pkgver=r1116.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%-arm64-git}-git" "${pkgname%-arm64-git}") +conflicts=("${pkgname%-git}" "${pkgname%-arm64-git}-git" "${pkgname%-arm64-git}") +source=('git+https://github.com/ptitSeb/box64') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-arm64-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-arm64-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DARM_DYNAREC=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo + fi +} + +build() { + cd "$srcdir/${pkgname%-arm64-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-arm64-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 +} diff --git a/archlinux/PKGBUILD-rk3399 b/archlinux/PKGBUILD-rk3399 new file mode 100644 index 00000000..d0d123ad --- /dev/null +++ b/archlinux/PKGBUILD-rk3399 @@ -0,0 +1,44 @@ +# Maintainer: Jai-JAP +# Contributor: Sebastien Chevalier +pkgname=box86-rk3399-git +pkgver=r1116.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%-rk3399-git}-git" "${pkgname%-rk3399-git}") +conflicts=("${pkgname%-git}" "${pkgname%-rk3399-git}-git" "${pkgname%-rk3399-git}") +source=('git+https://github.com/ptitSeb/box64') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-rk3399-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-rk3399-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DRK3399=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + fi +} + +build() { + cd "$srcdir/${pkgname%-rk3399-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-rk3399-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 +} \ No newline at end of file diff --git a/archlinux/PKGBUILD-rpi4 b/archlinux/PKGBUILD-rpi4 new file mode 100644 index 00000000..f343ed4b --- /dev/null +++ b/archlinux/PKGBUILD-rpi4 @@ -0,0 +1,44 @@ +# Maintainer: Jai-JAP +# Contributor: Sebastien Chevalier +pkgname=box64-rpi-git +pkgver=r1116.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%-rpi-git}-git" "${pkgname%-rpi-git}") +conflicts=("${pkgname%-git}" "${pkgname%-rpi-git}-git" "${pkgname%-rpi-git}") +source=('git+https://github.com/ptitSeb/box64') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-rpi-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-rpi-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DRPI4ARM64=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + fi +} + +build() { + cd "$srcdir/${pkgname%-rpi-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-rpi-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 +} diff --git a/archlinux/PKGBUILD-tegra b/archlinux/PKGBUILD-tegra new file mode 100644 index 00000000..737efe43 --- /dev/null +++ b/archlinux/PKGBUILD-tegra @@ -0,0 +1,44 @@ +# Maintainer: Jai-JAP +# Contributor: Sebastien Chevalier +pkgname=box64-tegra-git +pkgver=r1116.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%-tegra-git}-git" "${pkgname%-tegra-git}") +conflicts=("${pkgname%-git}" "${pkgname%-tegra-git}-git" "${pkgname%-tegra-git}") +source=('git+https://github.com/ptitSeb/box64') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-tegra-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-tegra-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DTEGRAX1=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + fi +} + +build() { + cd "$srcdir/${pkgname%-tegra-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-tegra-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 +} diff --git a/archlinux/PKGBUILD-x86_64 b/archlinux/PKGBUILD-x86_64 new file mode 100644 index 00000000..8d4cd848 --- /dev/null +++ b/archlinux/PKGBUILD-x86_64 @@ -0,0 +1,44 @@ +# Maintainer: Jai-JAP +# Contributor: Sebastien Chevalier +pkgname=box64-x64-git +pkgver=r1116.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%-x64-git}-git" "${pkgname%-x64-git}") +conflicts=("${pkgname%-git}" "${pkgname%-x64-git}-git" "${pkgname%-x64-git}") +source=('git+https://github.com/ptitSeb/box64') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-x64-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-x64-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DLD80BITS=1 -DNOALIGN=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + fi +} + +build() { + cd "$srcdir/${pkgname%-x64-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-x64-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 +} diff --git a/archlinux/README.md b/archlinux/README.md new file mode 100644 index 00000000..5242f272 --- /dev/null +++ b/archlinux/README.md @@ -0,0 +1,21 @@ +# The directory containing all PKGBUILDs for BOX64 +## FAQ +### 1. How to use it? +Just download the `PKGBUILD-` (no need to download the whole repository), go to directory where you downloaded and type: +```sh +mv ./PKGBUILD- ./PKGBUILD +cd .. +makepkg -si +``` +This will copy the PKGBUILD for your platform (where you type your platform name instead of ``), build it and install the PKGBUILD on 64-bit Archlinux ARM. + +In the future, I might try to do an unified PKGBUILD for all platforms that will recognize your platform automatically. + +### 2. What platforms are currently supported. +All specified in [COMPILE.md](../COMPILE.md). + +### 3. Any advantages with that sollution? +This might give you some advantages like those: +- automatic updates (with some AUR frontends like [`pamac-aur`](https://aur.archlinux.org/packages/pamac-aur/) or [`yay`](https://aur.archlinux.org/packages/yay)); +- easily uninstall with `pacman -R` when no needed (no need other scripts nor Makefile to do this); +- your `box64` installation is recognized as a package (where it wasn't when installing with `make install`).