aboutsummaryrefslogtreecommitdiffstats
path: root/community/waydroid/APKBUILD
blob: b046d6b7cfd74f1725ff148f9c18ea6a4b16306b (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
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=waydroid
pkgver=1.4.2
pkgrel=4
pkgdesc="A container-based approach to boot a full Android system on a regular Linux system"
url="https://github.com/waydroid/waydroid"
# Only x86, armv7, x86_64 and aarch64 supported upstream
arch="noarch !armhf !riscv64 !ppc64le !s390x"
license="GPL-3.0-only"
depends="
	dnsmasq
	gbinder-python
	iptables
	kmod
	lxc
	py3-dbus
	py3-gobject3
	py3-pyclip
	python3
	"
triggers="$pkgname.trigger=/usr/share/waydroid-extra/images"
install="$pkgname.post-upgrade"
subpackages="
	$pkgname-openrc
	$pkgname-pyc
	$pkgname-nftables
	"
source="https://github.com/waydroid/waydroid/archive/$pkgver/waydroid-$pkgver.tar.gz
	waydroid-container.initd
	waydroid-container.confd
	51_waydroid.nft
	waydroid-session.desktop
	"
options="!check" # No tests

package() {
	make DESTDIR="$pkgdir" USE_SYSTEMD=0 USE_NFTABLES=1 install

	# Generate __pycache__ packaging time instead of runtime
	python -m compileall "$pkgdir"/usr/lib/waydroid/tools

	install -Dm644 -t "$pkgdir"/etc/xdg/autostart "$srcdir"/waydroid-session.desktop

	install -Dm755 "$srcdir"/waydroid-container.initd "$pkgdir"/etc/init.d/waydroid-container
	install -Dm644 "$srcdir"/waydroid-container.confd "$pkgdir"/etc/conf.d/waydroid-container
}

nftables() {
	pkgdesc="$pkgdesc (nftables rules)"
	install_if="$pkgname=$pkgver-r$pkgrel nftables"

	install -Dm644 -t "$subpkgdir"/etc/nftables.d "$srcdir"/51_waydroid.nft
}

pyc() {
	default_pyc

	cd "$pkgdir"
	local IFS=$'\n'
	amove $(find usr/lib/waydroid -type d -name __pycache__)
}

sha512sums="
0d3eba799895c853545b7087e3c07160d593d4a3166822039973669bc0ee93a8a6b9c394a7d982e57cfbbfbd8df1ba7991dd33b1b1517d79fcbe191d8a86890a  waydroid-1.4.2.tar.gz
a173f927586c4d036113bee7170775a497cd833ea683957ed4b29746500769f407ba47f6c8b2c6280d411d0663e84be660cb5883c844d1b7a70f2c8d700a71a6  waydroid-container.initd
b841282b96110ec59a7aa539db0737327b09549d55c78dc4b2c3b28b4a6ad1facf015b3175cb6d3a38f13e47aa6314ef3dc1514a4e60dd653a97409ec54ba706  waydroid-container.confd
27cec579cfda197ff70d6328043755fc3d1719347bf4987edb86a07341bc4f02b99b65a6ef1fcde58b48a925176e6d770ed7cef304edff6a860bf4d408a62e06  51_waydroid.nft
56dc332d66c3eb3af08887eb2f4b8235419ff87a4e4632108cdde39cf274bc88b9e95c650a7d407d05a72f1ce2edf5d465a06b7e526113d9c9ae3817a6ed1f78  waydroid-session.desktop
"