aboutsummaryrefslogtreecommitdiffstats
path: root/testing/anbox/APKBUILD
blob: 75fc1c7886497a8e845dda66375703cabc52b039 (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
111
112
113
114
115
116
117
118
119
120
121
122
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Contributor: Grant Miller <GrantM11235@gmail.com>
# Contributor: Antoine Fontaine <antoine.fontaine@epfl.ch>
# Maintainer:
pkgname=anbox
pkgver=0_git20200303
pkgrel=2
_commit="3ed2e6d5c360d57b6aa61386e279adf3ff155ded"
_cpu_features_commit="b5c271c53759b2b15ff91df19bd0b32f2966e275"
pkgdesc="Android in a box"
url="https://github.com/anbox/anbox"
arch="x86_64 armv7 aarch64"
license="GPL-3.0-or-later"
subpackages="$pkgname-openrc"
install="$pkgname.post-install"
depends="
	dbus
	dbus-libs
	mesa-gles
	mesa-egl
	fuse3
	lxc
	"
makedepends="
	mesa-dev
	python2
	cmake
	cmake-extras
	lxc-dev
	sdl2-dev
	sdl2_image-dev
	boost-dev
	dbus-dev
	libcap-dev
	libdwarf-dev
	protobuf-dev
	elogind-dev
	properties-cpp-dev
	libexecinfo-dev
	gtest-dev
	"
source="
	$pkgname-$_commit.tar.gz::https://github.com/anbox/anbox/archive/$_commit.tar.gz
	cpu_features-$_cpu_features_commit.tar.gz::https://github.com/google/cpu_features/archive/$_cpu_features_commit.tar.gz
	anbox-container-manager.initd
	anbox.confd
	musl-fixes.patch
	input-chmod.patch
	fix-gtest-use.patch
	give-more-time-to-start.patch
	anbox-launch.sh
	anbox.desktop
	"
builddir="$srcdir/$pkgname-$_commit"

prepare() {
	# the bundled cpu_features is outdated and breaks build on arm.
	rm -r external/cpu_features
	cp -r $srcdir/cpu_features-*/ external/cpu_features

	default_prepare

	mkdir -p "$builddir"/build
}

build() {
	cd "$builddir"/build
	cmake "$builddir" \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		-DWerror=OFF

	make
}

check() {
	cd "$builddir"/build
	make test
}

package() {
	cd "$builddir"/build
	DESTDIR="$pkgdir" make install

	# CPU Feature install itself. That's bad.
	rm "$pkgdir"/usr/bin/list_cpu_features
	rm "$pkgdir"/usr/lib/backward/BackwardConfig.cmake
	rm -r "$pkgdir"/usr/lib/cmake/CpuFeatures
	rm -r "$pkgdir"/usr/include

	install -m755 -D "$srcdir"/anbox-container-manager.initd \
		"$pkgdir"/etc/init.d/anbox-container-manager
	install -m644 -D "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/$pkgname
	install -m755 -D "$srcdir"/$pkgname-launch.sh \
		"$pkgdir"/usr/bin/$pkgname-launch

	install -m644 -D "$srcdir"/$pkgname.desktop \
		"$pkgdir"/usr/share/applications/$pkgname.desktop
	install -m644 -D "$builddir"/snap/gui/icon.png \
		"$pkgdir"/usr/share/icons/hicolor/512x512/anbox.png

	# this is a dependency of the init script
	install -m755 -D "$builddir"/scripts/anbox-bridge.sh \
		"$pkgdir"/usr/share/anbox/anbox-bridge.sh
	# this is for convinience, to allow someone to get root access
	install -m755 -D "$builddir"/scripts/anbox-shell.sh \
		"$pkgdir"/usr/share/anbox/anbox-shell.sh
}

sha512sums="e75030e2c522c7561677a61d395fbbde4eb4fee316ccf803a12e338820091384a604198f1a05e6a8746fec766f9a9b06995fadd15917d835fc45010775a2d4e6  anbox-3ed2e6d5c360d57b6aa61386e279adf3ff155ded.tar.gz
c0ec9b603cec2cc9049923e15ef50c85806bc0a0ffe57b63348631061aeddb73c1eca910b25696cf5eac2606aec3f86db29e8a01e01cf438bfee86edfe909e4a  cpu_features-b5c271c53759b2b15ff91df19bd0b32f2966e275.tar.gz
5a8e76fd636670bdfcbf45c290c06f9399df7831af121e0a6238cc5d7d57d6f7036bca2d457c07f3f694df6f7a574a4e5ace6b1ad3a5e17a68fd638a299faa99  anbox-container-manager.initd
6a3bc88142c5287ec54d481a4788eceb7772d9974af950b5286ce63a49d05d9d49fce5ba1d02b4b1c9893896fd4ba218fd4d39b8e640bdd61ad196b5d5c9a021  anbox.confd
401669509e05eb586ad40fc9e8f4284b52183f06c60e87bf4e923be165a72f10263daf226db7fd610ef6ff25d09abd140ca2d59187e2d1b85a0bd6ae887dd944  musl-fixes.patch
bc7fc34cd2cfde57e674c8bce5b1f7fd297bd54ed32e16a7ac197fc36a23993ea468d5e0508fde9be4c1b72e04557b988b6b54e34cc2a52d96bbdf27af777ee7  input-chmod.patch
cb9e11cff5cbc03dbb9f69e3600f1cb8cbff0ef896ea5fc665e41a0556a9c57164cf3cf7b422e229c515af10894817e5b797aba5be7ead6aa05d6a024e7c2e50  fix-gtest-use.patch
67fc97d5274dec6240937981dbd41ae307bc0a77b54ad7200b187423a8184e848a1b8f983cf4b8f17d88b9d77213b06a8e17ba0c80f226f6755a1ae4acbd53ae  give-more-time-to-start.patch
921d69e28a2f63a6eaccdfbd6f53173d2e0c59dd650dd83c0d8f816b5f23f1ba61abb393b0cf5e48d80ce363df4f3e609de34a4e5a73c2b520dba96b76eda0c9  anbox-launch.sh
bc3bec88f271484ef66afb862e517b614568270a4047e400995f73b08ce05cb4faa18a746db161711ec91ef125f0063127e4027699921302406405bbb778583d  anbox.desktop"