blob: 5eed4351694f5f38a4f5c4f4113ee7034f8d5ff1 (
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
|
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=android-tools
pkgver=8.1.0_p7
_realver=${pkgver/_p/_r}
# See https://android.googlesource.com/platform/external/boringssl/+/$_realver/BORINGSSL_REVISION
_boringssl=14308731e5446a73ac2258688a9688b524483cb6
pkgrel=0
pkgdesc="Android platform tools"
url="http://tools.android.com/"
arch="all"
license="Apache-2.0 MIT"
depends=""
depends_dev=""
makedepends="zlib-dev pcre2-dev linux-headers bsd-compat-headers go perl
ruby gtest-dev cmake ninja clang clang-dev libressl-dev libusb-dev"
source="https://dev.alpinelinux.org/archive/$pkgname/$pkgname-core-$_realver.tar.gz
https://dev.alpinelinux.org/archive/$pkgname/$pkgname-extras-$_realver.tar.gz
https://dev.alpinelinux.org/archive/$pkgname/$pkgname-selinux-$_realver.tar.gz
https://dev.alpinelinux.org/archive/$pkgname/$pkgname-f2fs-tools-$_realver.tar.gz
https://dev.alpinelinux.org/archive/$pkgname/$pkgname-e2fsprogs-$_realver.tar.gz
$pkgname-boringssl-$_realver.tar.gz::https://github.com/google/boringssl/archive/$_boringssl.tar.gz
musl-fixes.patch
generate_build.rb
"
_giturl="https://android.googlesource.com/platform"
_gittag="android-$_realver"
builddir="$srcdir"
patch_args="-p0"
snapshot() {
mkdir -p "$srcdir" && cd "$srcdir"
local r=
for r in system/core system/extras external/selinux external/f2fs-tools external/e2fsprogs; do
local n="${r##*/}.git"
local f=$pkgname-"${r##*/}"
if [ -d "$n" ]; then
git --git-dir $n fetch || return 1
else
git clone --bare $_giturl/$r || return 1
fi
git --git-dir $n archive --prefix ${f#$pkgname-}/ -o "$srcdir"/$f-$_realver.tar.gz $_gittag
done
scp "$srcdir"/$pkgname-*-$_realver.tar.gz dev.alpinelinux.org:/archive/$pkgname/
}
prepare() {
default_prepare
cd "$builddir"
ln -s boringssl-$_boringssl boringssl
PKGVER=$_realver \
CFLAGS="$CFLAGS -Wno-cpp" \
CXXFLAGS="$CXXFLAGS -Wno-#warnings" \
ruby ./generate_build.rb > build.ninja
}
build() {
mkdir -p "$builddir"/boringssl/build
cd "$builddir"/boringssl/build
cmake -GNinja \
-DBUILD_SHARED_LIBS=False \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_C_FLAGS="$CFLAGS" \
..
ninja
cd "$builddir"
ninja
}
package() {
cd "$builddir"
mkdir -p "$pkgdir"/usr/bin
install -m755 fastboot adb mke2fs.android \
e2fsdroid ext2simg core/mkbootimg/mkbootimg \
"$pkgdir"/usr/bin
}
sha512sums="0592d04a12ee992750a2975c7c6eaa0db6001fcabdd046dd4385878600f5549d74c5b418306d29faa20f1aeb0342323f1a274d6209941ca6a09c696c267d0d4d android-tools-core-8.1.0_r7.tar.gz
bd11d9b6c02f35715c8130f11f51ad74c1efbfe883a84c2c36bb6427de0d600494ffc5dfb9a6a60cca25b2410bd08c624fd319f01272e91afe983e72e8c9ea0d android-tools-extras-8.1.0_r7.tar.gz
85a55a2b9ea2205a9fd81f04a899851b498745e11bd915db8297924ab1ed71fefc9a9ea3b360f8ed9798124bff590fd7408128f19b0ff36f6118407ed7318602 android-tools-selinux-8.1.0_r7.tar.gz
9ead522e8e82d380833bb46b8b154f46f722ef6edd3f268ba992b746c1e896e61d3b8d92c69ef0862b7e00d8f8f54b9cc298de99a5ac80338ef91357f403e75b android-tools-f2fs-tools-8.1.0_r7.tar.gz
722d30b43cbb7ff325927c1696cec02a4d0dbb4ded4b9016f35908d2e87d5f65875f9cbdbb935c3cb6c790ea722c3119240ad2f3adfb33e01a6a7ca62d69c158 android-tools-e2fsprogs-8.1.0_r7.tar.gz
171b524b0452a48853b2c8010ff5e14d5d720e69eeaf1d3b79f675838f3afa94aee9de2f47b37303feb2d92cbf77639efe585786625b7b37b8cc2ba727c37fdc android-tools-boringssl-8.1.0_r7.tar.gz
785e201dd8131a6dc49b6b40b54bc698a33cc9500ad2161187d2505541fddd68a66aac951f0794c0d852383bb4ae2f5bd9c37455b8777462b3e3c9fa7bfe455e musl-fixes.patch
052bd5e602a600c21aaf30bd734dd6da37aaa62a0712a2a5cbb7f781bc2e59aad97516b65a6f985049307f849994a6b34a8646bd9b5eac247271ff5819b6a2e5 generate_build.rb"
|