diff --git a/archlinux/PKGBUILD-arm b/archlinux/PKGBUILD-arm new file mode 100644 index 0000000000..8590e6b30a --- /dev/null +++ b/archlinux/PKGBUILD-arm @@ -0,0 +1,38 @@ +# Maintainer: SpacingBat3 +# Contributor: Sebastien Chevalier +pkgname=box86-arm-git +pkgver=r2798.0edc0374 +pkgrel=1 +pkgdesc="Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices." +arch=('armv7h') +url="https://github.com/ptitSeb/box86" +license=('MIT') +optdepends=('gl4es: OpenGL 2 for GLES 2 devices') +makedepends=('git' 'cmake' 'make') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +source=('git+https://github.com/ptitSeb/box86') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DARM_DYNAREC=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo + fi +} + +build() { + cd "$srcdir/${pkgname%-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-git}/build" + make DESTDIR="${pkgdir}/" install +} diff --git a/archlinux/PKGBUILD-gameshell b/archlinux/PKGBUILD-gameshell new file mode 100644 index 0000000000..c90f4a92ad --- /dev/null +++ b/archlinux/PKGBUILD-gameshell @@ -0,0 +1,38 @@ +# Maintainer: SpacingBat3 +# Contributor: Sebastien Chevalier +pkgname=box86-gameshell-git +pkgver=r2798.0edc0374 +pkgrel=1 +pkgdesc="Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices." +arch=('armv7h') +url="https://github.com/ptitSeb/box86" +license=('MIT') +optdepends=('gl4es: OpenGL 2 for GLES 2 devices') +makedepends=('git' 'cmake' 'make') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +source=('git+https://github.com/ptitSeb/box86') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DGAMESHELL=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + fi +} + +build() { + cd "$srcdir/${pkgname%-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-git}/build" + make DESTDIR="${pkgdir}/" install +} diff --git a/archlinux/PKGBUILD-odroid b/archlinux/PKGBUILD-odroid new file mode 100644 index 0000000000..a300c3bde1 --- /dev/null +++ b/archlinux/PKGBUILD-odroid @@ -0,0 +1,38 @@ +# Maintainer: SpacingBat3 +# Contributor: Sebastien Chevalier +pkgname=box86-odroid-git +pkgver=r2798.0edc0374 +pkgrel=1 +pkgdesc="Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices." +arch=('armv7h') +url="https://github.com/ptitSeb/box86" +license=('MIT') +optdepends=('gl4es: OpenGL 2 for GLES 2 devices') +makedepends=('git' 'cmake' 'make') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +source=('git+https://github.com/ptitSeb/box86') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DODROID=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + fi +} + +build() { + cd "$srcdir/${pkgname%-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-git}/build" + make DESTDIR="${pkgdir}/" install +} diff --git a/archlinux/PKGBUILD-pandora b/archlinux/PKGBUILD-pandora new file mode 100644 index 0000000000..13c4d65c67 --- /dev/null +++ b/archlinux/PKGBUILD-pandora @@ -0,0 +1,38 @@ +# Maintainer: SpacingBat3 +# Contributor: Sebastien Chevalier +pkgname=box86-pandora-git +pkgver=r2798.0edc0374 +pkgrel=1 +pkgdesc="Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices." +arch=('armv7h') +url="https://github.com/ptitSeb/box86" +license=('MIT') +optdepends=('gl4es: OpenGL 2 for GLES 2 devices') +makedepends=('git' 'cmake' 'make') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +source=('git+https://github.com/ptitSeb/box86') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DPANDORA=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + fi +} + +build() { + cd "$srcdir/${pkgname%-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-git}/build" + make DESTDIR="${pkgdir}/" install +} diff --git a/archlinux/PKGBUILD-pyra b/archlinux/PKGBUILD-pyra new file mode 100644 index 0000000000..8cffbde150 --- /dev/null +++ b/archlinux/PKGBUILD-pyra @@ -0,0 +1,38 @@ +# Maintainer: SpacingBat3 +# Contributor: Sebastien Chevalier +pkgname=box86-pyra-git +pkgver=r2798.0edc0374 +pkgrel=1 +pkgdesc="Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices." +arch=('armv7h') +url="https://github.com/ptitSeb/box86" +license=('MIT') +optdepends=('gl4es: OpenGL 2 for GLES 2 devices') +makedepends=('git' 'cmake' 'make') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +source=('git+https://github.com/ptitSeb/box86') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DPYRA=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + fi +} + +build() { + cd "$srcdir/${pkgname%-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-git}/build" + make DESTDIR="${pkgdir}/" install +} diff --git a/archlinux/PKGBUILD-raspberrypi b/archlinux/PKGBUILD-raspberrypi new file mode 100644 index 0000000000..4dcfe904c8 --- /dev/null +++ b/archlinux/PKGBUILD-raspberrypi @@ -0,0 +1,52 @@ +# Maintainer: SpacingBat3 +# Contributor: Sebastien Chevalier +pkgname=box86-rpi-git +pkgver=r2798.0edc0374 +pkgrel=1 +pkgdesc="Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices." +arch=('armv7h') +url="https://github.com/ptitSeb/box86" +license=('MIT') +optdepends=('gl4es: OpenGL 2 for GLES 2 devices') +makedepends=('git' 'cmake' 'make') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +source=('git+https://github.com/ptitSeb/box86') +md5sums=('SKIP') +_pimodel=`tr -d '\0' < /sys/firmware/devicetree/base/model` + +pkgver() { + cd "$srcdir/${pkgname%-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-git}" + # Check for Pi version number + if [[ ${_pimodel} ~= "Raspberry Pi 4" ]]; then + _piversion=4 + elif [[ ${_pimodel} ~= "Raspberry Pi 3" ]]; then + _piversion=3 + elif [[ ${_pimodel} ~= "Raspberry Pi 2" ]]; then + _piversion=2 + else + # Your RPI is not supported or this device is not a pi, cancel build then + echo -e "\033[01m\033[01;31m==> ERROR:\033[00;01m Your device is not supported! This script is for RPi model 4/3/2 (1/0 not supported).\033[00m" + exit 1 + fi + echo -e "\033[01m\033[01;34m==> INFO:\033[00;01m Your detected Pi verion number is: \033[01;31m${_piversion}\033[01m.\033[00m" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DRPI${_piversion}=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + fi +} + +build() { + cd "$srcdir/${pkgname%-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-git}/build" + make DESTDIR="${pkgdir}/" install +} diff --git a/archlinux/PKGBUILD-x86 b/archlinux/PKGBUILD-x86 new file mode 100644 index 0000000000..3e7eaab780 --- /dev/null +++ b/archlinux/PKGBUILD-x86 @@ -0,0 +1,37 @@ +# Maintainer: SpacingBat3 +# Contributor: Sebastien Chevalier +pkgname=box86-x86-git +pkgver=r2798.0edc0374 +pkgrel=1 +pkgdesc="Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices." +arch=('i386') +url="https://github.com/ptitSeb/box86" +license=('MIT') +makedepends=('git' 'cmake' 'make') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +source=('git+https://github.com/ptitSeb/box86') +md5sums=('SKIP') + +pkgver() { + cd "$srcdir/${pkgname%-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/${pkgname%-git}" + if [[ ! -d ./build ]]; then + mkdir build && cd build + cmake .. -DLD80BITS=1 -DNOALIGN=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo + fi +} + +build() { + cd "$srcdir/${pkgname%-git}/build" + make -j$(nproc) +} + +package() { + cd "$srcdir/${pkgname%-git}/build" + make DESTDIR="${pkgdir}/" install +} diff --git a/archlinux/README.md b/archlinux/README.md new file mode 100644 index 0000000000..171afc238b --- /dev/null +++ b/archlinux/README.md @@ -0,0 +1,21 @@ +# The directory containing all PKGBUILDs for BOX86 +## 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 32-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 `box86` installation is recognized as a package (where it wasn't when installing with `make install`).