aboutsummaryrefslogtreecommitdiffstats
path: root/testing/anbox/APKBUILD
blob: 185f27b2b2601fc9a8921e64cdb79de47991eadc (plain) (blame)
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
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Contributor: Grant Miller <GrantM11235@gmail.com>
# Contributor: Antoine Fontaine <antoine.fontaine@epfl.ch>
# Maintainer:
pkgname=anbox
pkgver=0_git20200102
pkgrel=0
_commit="b18e62218af49ee882abd00da2ef540142e59784"
_cpu_features_commit="b5c271c53759b2b15ff91df19bd0b32f2966e275"
pkgdesc="Android in a box"
url="https://github.com/anbox/anbox"
arch="x86_64 armhf armv7 aarch64"
license="GPL-3.0-or-later"
options="!check" # TODO: make checks work
subpackages="$pkgname-openrc $pkgname-networkmanager"
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
	"
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
	disable-tests.patch
	musl-fixes.patch
	fix-arm-build.patch
	give-more-time-to-start.patch
	anbox-launch.sh
	anbox.desktop
	"
builddir="$srcdir/$pkgname-$_commit"

prepare() {
	default_prepare

	rm -rf external/cpu_features
	cp -r $srcdir/cpu_features-*/ external/cpu_features

	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=RelWithDebInfo \
		-DBUILD_TESTING=OFF \
		-DWerror=OFF

	make
}

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

	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 -m755 -D "$builddir"/scripts/anbox-bridge.sh \
		"$pkgdir"/usr/share/anbox/anbox-bridge.sh
}

networkmanager() {
	#install_if="$pkgname networkmanager" # causes issues, let's keep it installed manually for now
	depends="$pkgname networkmanager"
	install="$pkgname-networkmanager.post-install $pkgname-networkmanager.post-deinstall"
	pkgdesc="$pkgdesc, internet access support"
	mkdir "$subpkgdir"
}

sha512sums="5abf2191968a68f2d9fcde5e85a9d174212506d3c848115e0859b2c41baadaeab08a6828449e3edd5023829432698aa8bbd9c6e16c8ce8560974db1403bbd556  anbox-b18e62218af49ee882abd00da2ef540142e59784.tar.gz
c0ec9b603cec2cc9049923e15ef50c85806bc0a0ffe57b63348631061aeddb73c1eca910b25696cf5eac2606aec3f86db29e8a01e01cf438bfee86edfe909e4a  cpu_features-b5c271c53759b2b15ff91df19bd0b32f2966e275.tar.gz
5a8e76fd636670bdfcbf45c290c06f9399df7831af121e0a6238cc5d7d57d6f7036bca2d457c07f3f694df6f7a574a4e5ace6b1ad3a5e17a68fd638a299faa99  anbox-container-manager.initd
6a3bc88142c5287ec54d481a4788eceb7772d9974af950b5286ce63a49d05d9d49fce5ba1d02b4b1c9893896fd4ba218fd4d39b8e640bdd61ad196b5d5c9a021  anbox.confd
3351edbd50370f514e405f10584264b110cd3d5eff766185b23d4c7e885933f0378330df5222fbd4b5161ff81f292ea63b4940f4afb1c457a2511fe8b5110195  disable-tests.patch
401669509e05eb586ad40fc9e8f4284b52183f06c60e87bf4e923be165a72f10263daf226db7fd610ef6ff25d09abd140ca2d59187e2d1b85a0bd6ae887dd944  musl-fixes.patch
897a6f0fddd9d963f6c66e4561f5b468856dd94c8df500f27b08b2bfcef8c0d253f985333b501447afbe3e2abf5d354523b1db0304b87e762abcd4f1d8cac2e7  fix-arm-build.patch
4f4439a0f991a77a157464280fd9d43fcff1319effc9bdd235fc61f16c3fbef59d8585ae363326179dd4b1f71e4d206498844361d1418846eb42c5a0d40db33b  give-more-time-to-start.patch
d88bc45b681b6ed318279ee4485ae0d47fd648f207722c094906b61c74d7c373762cdaba890fa577467da99204681cd502051071ee61b2c1c555732e403b4e15  anbox-launch.sh
bc3bec88f271484ef66afb862e517b614568270a4047e400995f73b08ce05cb4faa18a746db161711ec91ef125f0063127e4027699921302406405bbb778583d  anbox.desktop"