mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
75 lines
2.9 KiB
Bash
75 lines
2.9 KiB
Bash
# 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
|
|
|
|
buildarch=28
|
|
|
|
pkgname=android-tools
|
|
pkgver=29.0.4
|
|
pkgrel=1
|
|
tag=platform-tools-$pkgver
|
|
pkgdesc='Android platform tools'
|
|
arch=(x86_64)
|
|
url='http://tools.android.com/'
|
|
license=(Apache MIT)
|
|
depends=(pcre2 libusb)
|
|
optdepends=('python: for mkbootimg script'
|
|
'python2: for unpack_bootimg & avbtool scripts')
|
|
makedepends=(git clang gtest ruby cmake ninja go-pie)
|
|
provides=(fastboot adb)
|
|
conflicts=(fastboot adb)
|
|
_boringssl_commit=$(curl https://android.googlesource.com/platform/external/boringssl/+/refs/tags/$tag/BORINGSSL_REVISION?format=TEXT | base64 -d)
|
|
source=(git+https://android.googlesource.com/platform/system/core#tag=$tag
|
|
git+https://android.googlesource.com/platform/system/extras#tag=$tag
|
|
git+https://android.googlesource.com/platform/system/tools/mkbootimg#tag=$tag
|
|
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
|
|
git+https://boringssl.googlesource.com/boringssl#commit=$_boringssl_commit
|
|
generate_build.rb
|
|
fix_build_core.patch
|
|
bash_completion.fastboot)
|
|
# Bash completion file was taken from https://github.com/mbrubeck/android-completion
|
|
sha1sums=('SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'afca7974ad8658e52fd028ead12ad0a959d63273'
|
|
'6f3d6ca9112b0f2b3049febb46cf311ddc883567'
|
|
'7004dbd0c193668827174880de6f8434de8ceaee')
|
|
|
|
prepare() {
|
|
PLATFORM_TOOLS_VERSION="$pkgver-$pkgrel" LDFLAGS='-Wl,-z,relro,-z,now' ./generate_build.rb > build.ninja
|
|
|
|
cd "$srcdir"/core
|
|
patch -p1 < ../fix_build_core.patch
|
|
|
|
cd "$srcdir"/avb
|
|
sed -i 's|/usr/bin/env python$|/usr/bin/env python2|g' avbtool
|
|
|
|
cd "$srcdir"/mkbootimg
|
|
sed -i 's|/usr/bin/env python$|/usr/bin/env python2|g' unpack_bootimg.py
|
|
|
|
sed -i 's/-fno-common/-fno-common -Wno-error=attributes/' $srcdir/boringssl/CMakeLists.txt
|
|
mkdir -p "$srcdir"/boringssl/build && cd "$srcdir"/boringssl/build && cmake -GNinja ..; ninja crypto/libcrypto.a
|
|
}
|
|
|
|
build() {
|
|
ninja
|
|
}
|
|
|
|
package() {
|
|
install -m755 -d "$pkgdir"/usr/bin
|
|
install -m755 -t "$pkgdir"/usr/bin fastboot adb mke2fs.android e2fsdroid ext2simg avb/avbtool
|
|
install -Dm 755 mkbootimg/mkbootimg.py "$pkgdir"/usr/bin/mkbootimg
|
|
install -Dm 755 mkbootimg/unpack_bootimg.py "$pkgdir"/usr/bin/unpack_bootimg
|
|
install -Dm 644 bash_completion.fastboot "$pkgdir"/usr/share/bash-completion/completions/fastboot
|
|
}
|