1
- # Maintainer: SpacingBat3 <youremail@domain .com>
2
- # Contributor: Sebastien Chevalier
1
+ # Maintainer: SpacingBat3 <git@spacingbat3.anonaddy .com>
2
+ # Contributor: Sebastien Chevalier <sebastien.chev@gmail.com>
3
3
pkgname=box86-rpi-git
4
+ _pkgname=box86-git
4
5
pkgver=r2798.0edc0374
5
6
pkgrel=1
6
7
pkgdesc="Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices."
@@ -9,29 +10,30 @@ url="https://github.com/ptitSeb/box86"
9
10
license=('MIT')
10
11
optdepends=('gl4es: OpenGL 2 for GLES 2 devices')
11
12
makedepends=('git' 'cmake' 'make')
12
- provides=("${pkgname%-git}")
13
- conflicts=("${pkgname%-git}")
13
+ provides=("${pkgname%-git}" "${pkgname%-rpi-git}-git" "${pkgname%--rpi-git}" )
14
+ conflicts=("${pkgname%-git}" "${pkgname%-rpi-git}-git" "${pkgname%--rpi-git}" )
14
15
source=('git+https://github.com/ptitSeb/box86')
15
16
md5sums=('SKIP')
16
17
_pimodel=`tr -d '\0' < /sys/firmware/devicetree/base/model`
17
18
18
19
pkgver() {
19
- cd "$srcdir/${pkgname%-git}"
20
+ cd "$srcdir/${pkgname%-rpi- git}"
20
21
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
21
22
}
22
23
23
24
prepare() {
24
- cd "${srcdir}/${pkgname%-git}"
25
+ cd "${srcdir}/${pkgname%-rpi- git}"
25
26
# Check for Pi version number
26
- if [[ ${_pimodel} ~= "Raspberry Pi 4" ]]; then
27
+ if [[ ${_pimodel} =~ "Raspberry Pi 4" ]]; then
27
28
_piversion=4
28
- elif [[ ${_pimodel} ~= "Raspberry Pi 3" ]]; then
29
+ elif [[ ${_pimodel} =~ "Raspberry Pi 3" ]]; then
29
30
_piversion=3
30
- elif [[ ${_pimodel} ~= "Raspberry Pi 2" ]]; then
31
+ elif [[ ${_pimodel} =~ "Raspberry Pi 2" ]]; then
31
32
_piversion=2
32
33
else
33
- # Your RPI is not supported or this device is not a pi, cancel build then
34
- 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"
34
+ # This RPI is not supported or this device is not a pi.
35
+ # We should cancel then the build.
36
+ 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 isn't supported yet).\033[00m"
35
37
exit 1
36
38
fi
37
39
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"
@@ -42,11 +44,17 @@ prepare() {
42
44
}
43
45
44
46
build() {
45
- cd "$srcdir/${pkgname%-git}/build"
47
+ cd "$srcdir/${pkgname%-rpi- git}/build"
46
48
make -j$(nproc)
47
49
}
48
50
49
51
package() {
50
- cd "$srcdir/${pkgname%-git}/build"
52
+ cd "$srcdir/${pkgname%-rpi- git}/build"
51
53
make DESTDIR="${pkgdir}/" install
54
+ # /usr/local/bin isn't in PATH by the default,
55
+ # we should move it to /usr/bin
56
+ cd ${pkgdir}
57
+ mv usr/local/bin/ usr/bin/
58
+ # cleanup when dir is empty
59
+ rmdir usr/local || exit 0
52
60
}
0 commit comments