2018-03-22 03:56:30 +00:00
|
|
|
# Maintainer: Anatol Pomozov
|
|
|
|
# Contributor: 謝致邦 <Yeking@Red54.com>
|
|
|
|
# Contributor: Alucryd <alucryd at gmail dot com>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
# - set -Wno-error=attributes to stop alignas(64) warnings as errors
|
|
|
|
|
2018-08-09 12:53:29 +00:00
|
|
|
buildarch=28
|
|
|
|
|
2018-03-22 03:56:30 +00:00
|
|
|
pkgname=android-tools
|
2019-09-30 23:59:15 +00:00
|
|
|
pkgver=29.0.4
|
2019-10-14 23:18:27 +00:00
|
|
|
pkgrel=2
|
2019-08-05 02:25:49 +00:00
|
|
|
tag=platform-tools-$pkgver
|
2018-03-22 03:56:30 +00:00
|
|
|
pkgdesc='Android platform tools'
|
|
|
|
arch=(x86_64)
|
|
|
|
url='http://tools.android.com/'
|
|
|
|
license=(Apache MIT)
|
|
|
|
depends=(pcre2 libusb)
|
2019-09-19 04:36:09 +00:00
|
|
|
optdepends=('python: for mkbootimg script'
|
|
|
|
'python2: for unpack_bootimg & avbtool scripts')
|
2018-03-22 03:56:30 +00:00
|
|
|
makedepends=(git clang gtest ruby cmake ninja go-pie)
|
2019-06-05 23:56:47 +00:00
|
|
|
provides=(fastboot adb)
|
|
|
|
conflicts=(fastboot adb)
|
2019-08-30 12:24:51 +00:00
|
|
|
_boringssl_commit=$(curl https://android.googlesource.com/platform/external/boringssl/+/refs/tags/$tag/BORINGSSL_REVISION?format=TEXT | base64 -d)
|
2019-08-05 02:25:49 +00:00
|
|
|
source=(git+https://android.googlesource.com/platform/system/core#tag=$tag
|
|
|
|
git+https://android.googlesource.com/platform/system/extras#tag=$tag
|
2019-08-05 12:35:51 +00:00
|
|
|
git+https://android.googlesource.com/platform/system/tools/mkbootimg#tag=$tag
|
2019-08-05 02:25:49 +00:00
|
|
|
git+https://android.googlesource.com/platform/external/selinux#tag=$tag
|
|
|
|
git+https://android.googlesource.com/platform/external/f2fs-tools#tag=$tag
|
|
|
|
git+https://android.googlesource.com/platform/external/e2fsprogs#tag=$tag
|
|
|
|
git+https://android.googlesource.com/platform/external/avb#tag=$tag
|
2018-03-22 03:56:30 +00:00
|
|
|
git+https://boringssl.googlesource.com/boringssl#commit=$_boringssl_commit
|
|
|
|
generate_build.rb
|
|
|
|
fix_build_core.patch
|
2019-10-14 23:18:27 +00:00
|
|
|
fix_sparse_img.patch
|
2018-03-22 03:56:30 +00:00
|
|
|
bash_completion.fastboot)
|
|
|
|
# Bash completion file was taken from https://github.com/mbrubeck/android-completion
|
|
|
|
sha1sums=('SKIP'
|
|
|
|
'SKIP'
|
|
|
|
'SKIP'
|
|
|
|
'SKIP'
|
|
|
|
'SKIP'
|
|
|
|
'SKIP'
|
2019-01-19 20:49:34 +00:00
|
|
|
'SKIP'
|
2019-08-05 12:35:51 +00:00
|
|
|
'SKIP'
|
2019-08-30 12:24:51 +00:00
|
|
|
'afca7974ad8658e52fd028ead12ad0a959d63273'
|
2019-10-14 23:18:27 +00:00
|
|
|
'9d35e4e9c4d1064783f3b1edaae0a2fae49493a4'
|
|
|
|
'2b57a4cf8012473c1a4fc6adae16573756272b02'
|
2018-03-22 03:56:30 +00:00
|
|
|
'7004dbd0c193668827174880de6f8434de8ceaee')
|
|
|
|
|
|
|
|
prepare() {
|
2019-09-19 04:36:09 +00:00
|
|
|
PLATFORM_TOOLS_VERSION="$pkgver-$pkgrel" LDFLAGS='-Wl,-z,relro,-z,now' ./generate_build.rb > build.ninja
|
2018-03-22 03:56:30 +00:00
|
|
|
|
2019-08-30 12:24:51 +00:00
|
|
|
cd "$srcdir"/core
|
2018-03-22 03:56:30 +00:00
|
|
|
patch -p1 < ../fix_build_core.patch
|
2019-10-14 23:18:27 +00:00
|
|
|
patch -p1 < ../fix_sparse_img.patch # FS#63370
|
2018-03-22 03:56:30 +00:00
|
|
|
|
2019-08-30 12:24:51 +00:00
|
|
|
cd "$srcdir"/avb
|
2019-01-19 20:49:34 +00:00
|
|
|
sed -i 's|/usr/bin/env python$|/usr/bin/env python2|g' avbtool
|
|
|
|
|
2019-08-30 12:24:51 +00:00
|
|
|
cd "$srcdir"/mkbootimg
|
|
|
|
sed -i 's|/usr/bin/env python$|/usr/bin/env python2|g' unpack_bootimg.py
|
|
|
|
|
2018-06-12 00:30:11 +00:00
|
|
|
sed -i 's/-fno-common/-fno-common -Wno-error=attributes/' $srcdir/boringssl/CMakeLists.txt
|
2019-08-30 12:24:51 +00:00
|
|
|
mkdir -p "$srcdir"/boringssl/build && cd "$srcdir"/boringssl/build && cmake -GNinja ..; ninja crypto/libcrypto.a
|
2018-03-22 03:56:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
ninja
|
|
|
|
}
|
|
|
|
|
2019-08-30 12:24:51 +00:00
|
|
|
package() {
|
2018-03-22 03:56:30 +00:00
|
|
|
install -m755 -d "$pkgdir"/usr/bin
|
2019-08-05 02:25:49 +00:00
|
|
|
install -m755 -t "$pkgdir"/usr/bin fastboot adb mke2fs.android e2fsdroid ext2simg avb/avbtool
|
2019-08-05 12:35:51 +00:00
|
|
|
install -Dm 755 mkbootimg/mkbootimg.py "$pkgdir"/usr/bin/mkbootimg
|
|
|
|
install -Dm 755 mkbootimg/unpack_bootimg.py "$pkgdir"/usr/bin/unpack_bootimg
|
2018-03-22 03:56:30 +00:00
|
|
|
install -Dm 644 bash_completion.fastboot "$pkgdir"/usr/share/bash-completion/completions/fastboot
|
|
|
|
}
|