blob: 5cb7ccf9b895018d9e0b7d4eb0d2a507d953409e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
# Maintainer: Christoph Schmidpeter <john.doe@example.com>
# Co-Maintainer: Mubashshir <ahmubashshir@gmail.com>
# Contributor: Iwan Timmer <irtimmer@gmail.com>
# from: git
pkgname=anbox-git
pkgver=r1366.ddf4c57
pkgrel=1
epoch=1
arch=('x86_64')
url="http://anbox.io/"
license=('GPL3')
pkgdesc="Running Android in a container"
depends=('lxc' 'sdl2_image' 'protobuf' 'anbox-image' 'libsystemd' 'libcpufeatures' 'boost-libs' 'sdbus-cpp')
replaces=('anbox-launchers')
conflicts=('anbox-launchers')
makedepends=('cmake' 'git' 'glm' 'boost' 'properties-cpp' 'gtest' 'python' 'systemd' 'dbus')
source=("git+https://github.com/anbox/anbox.git"
'lxc4.patch::https://gitlab.alpinelinux.org/alpine/aports/-/raw/fc60972afd4ff0c096498e28557b9a16e801aa7f/community/anbox/lxc4.patch'
'sdbus.patch::https://gitlab.alpinelinux.org/alpine/aports/-/raw/fc60972afd4ff0c096498e28557b9a16e801aa7f/community/anbox/no-bundled-sdbus.patch'
'delayed-start.patch::https://gitlab.alpinelinux.org/alpine/aports/-/raw/70a1a8afb7b6ac37291d382e6e5cc7561fc88626/community/anbox/give-more-time-to-start.patch'
'egl.patch::https://github.com/anbox/anbox/pull/1877.patch'
'ByteSizeLong.patch::https://github.com/anbox/anbox/pull/1480.patch'
'lxc4010.patch::https://github.com/anbox/anbox/pull/1938.patch'
'cpu_features.patch'
'desktop-dir.patch'
'anbox-container-manager.service'
'anbox-session-manager.service'
'99-anbox.rules'
'anbox.conf'
'anbox.desktop'
'org.anbox.service'
'dev-binderfs.mount'
'anbox-bridge.network'
'anbox-bridge.netdev')
sha256sums=('SKIP'
'c1071203defdeaee56122913a6d7e67ac496c889a0c59cb889d94a58bc655bfa'
'7c0626afaf1ce004ac2c57cd89db393f9a6ba21f1087001d15278a7bd79c8219'
'253c211455ff0cfaa058a0b80eb41d58f84ee646c0c67dbcbcc888b5833009a7'
'c684ff93824137d79a384a134e644849ef33c986f2d9e192636fc8d80ef9baba'
'c922afe6a2cd4fe7296a0921e47e09abedf0104dc23d0037010d1df4cc42308b'
'b01699c635efcff48fc11f8d20e7f88e6497aba912496df2e379be46e584a6f4'
'eeeb4dd40d30d0e8c0f0001d44ca7876c1c564dfc31b24ecfb871fd133037825'
'd1e2e3fa1299b423f1d98cbd3c591d853f1ce8646f508ef838fe714f986fc5b2'
'f76cf723e3436333176bcb778b2c32988d9789f14d339ee1cb8c13ef35e2fdd6'
'1f22dbb5a3ca6925bbf62899cd0f0bbaa0b77c879adcdd12ff9d43adfa61b1d8'
'210eb93342228168f7bb632c8b93d9bfda6f53f62459a6b74987fa1e17530475'
'3e07dc524a827c1651857cce28a06c1565bc5188101c140ed213bbafedc5abff'
'7332d09865be553a259a53819cebddd21f661c7a251d78c2f46acd75c66676b6'
'74e2208e0c03e5f21be3ff54b58160a172e3768a80c41726c06b4ab8cc9288dd'
'c7e9958a9cff1191dca0d50b0ea8392d7728490e56ffb38a475ba516a09a2109'
'44899328725667041e6e84912da81c1d0147b708006eb2c2bb6503f271629ff0'
'559190df4d6d595480b30d8b13b862081fc4aac52790e33eb24cf7fbcb8003b8')
pkgver() {
cd "${pkgname%*-git}"
( set -o pipefail
git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}
prepare() {
cd "${pkgname%*-git}"
# Don't build tests
truncate -s 0 cmake/FindGMock.cmake
truncate -s 0 tests/CMakeLists.txt
# Thanks to @bartus <arch-user-repo@bartus.33mail.com> for suggesting the patch
# checking before applying it.
# Original patch: http://ix.io/3Clr
printf '%s\n' "${source[@]%%::*}" \
| awk -F . '/\.patch/{print $1}' \
| while read -r patch;do
if patch --dry-run -Np1 -Rsf < "$srcdir/$patch.patch" &> /dev/null; then
warning "Patch already applied, please remove $patch.patch from source[]!"
read -t5 -p 'press enter to continue...' || true
else
msg "Applying patch: $patch"
patch -Np1 < "$srcdir/$patch.patch"
fi
done
}
build() {
cmake -B build -S "${pkgname%*-git}" \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_SKIP_INSTALL_RPATH=YES \
-DCMAKE_SKIP_RPATH=YES \
-Wno-dev
make -C build
}
package() {
make -C build DESTDIR="$pkgdir" install
install -Dm 644 -t "$pkgdir/usr/lib/systemd/system" anbox-container-manager.service dev-binderfs.mount
install -Dm 644 -t "$pkgdir/usr/lib/systemd/user" anbox-session-manager.service
install -Dm 644 "$srcdir/anbox-bridge.network" "$pkgdir/usr/lib/systemd/network/80-anbox-bridge.network"
install -Dm 644 "$srcdir/anbox-bridge.netdev" "$pkgdir/usr/lib/systemd/network/80-anbox-bridge.netdev"
install -Dm 644 -t "$pkgdir/usr/lib/udev/rules.d" 99-anbox.rules
install -Dm 644 -t "$pkgdir/usr/share/applications" anbox.desktop
install -Dm 644 -t "$pkgdir/usr/share/dbus-1/services" org.anbox.service
install -Dm 644 "${pkgname%*-git}/snap/gui/icon.png" "$pkgdir/usr/share/pixmaps/anbox.png"
install -Dm 644 -t "$pkgdir/usr/share/desktop-directories" "${pkgname%*-git}/data/desktop/anbox-android.directory"
install -Dm 644 -t "$pkgdir/etc/xdg/menus/applications-merged" "${pkgname%*-git}/data/desktop/anbox-android.menu"
}
|