aboutsummaryrefslogtreecommitdiffstats
path: root/community/android-tools/APKBUILD
blob: f972cde7711a733acf306c4a7888963fba81bd6f (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=android-tools
pkgver=33.0.3p1
pkgrel=2
pkgdesc="Android platform tools"
url="https://sites.google.com/a/android.com/tools/"
# s390x: Vendored BoringSSL has no support for s390x
arch="all !s390x"
license="Apache-2.0 MIT"
options="net !check" # upstream doesn't have a test suite
depends="python3"
makedepends="pcre2-dev linux-headers libusb-dev gtest-dev go perl cmake
	protobuf-dev brotli-dev zstd-dev lz4-dev samurai"
subpackages="$pkgname-bash-completion:bashcomp:noarch"
source="https://github.com/nmeum/android-tools/releases/download/$pkgver/android-tools-$pkgver.tar.xz"

[ "$CARCH" = "riscv64" ] && options="$options textrels"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_BUILD_TYPE=None
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

bashcomp() {
	default_bashcomp
	amove usr/share/android-tools/completions
}

sha512sums="
22ed3d9a71a962764998c8c4759215d24a1af121d43942c77c00878d636aea16a6b940811624bb1ae56ac416922d7262d5ced5436e646fe2dae0944b593ad4fe  android-tools-33.0.3p1.tar.xz
"