PKGBUILDs/community/android-tools/PKGBUILD

78 lines
2.8 KiB
Bash
Raw Normal View History

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-06-05 23:56:47 +00:00
pkgver=9.0.0_r41
2019-04-23 23:54:45 +00:00
pkgrel=1
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)
optdepends=('python: for mkbootimg script')
makedepends=(git clang gtest ruby cmake ninja go-pie)
2019-06-05 23:56:47 +00:00
provides=(fastboot adb)
conflicts=(fastboot adb)
2018-08-08 19:39:14 +00:00
# keep the boringssl commit in sync with android tree https://android.googlesource.com/platform/external/boringssl/+/$pkgver/BORINGSSL_REVISION
_boringssl_commit=45210dd4e21ace9d28cb76b3f83303fcdd2efcce
2018-03-22 03:56:30 +00:00
source=(git+https://android.googlesource.com/platform/system/core#tag=android-$pkgver
git+https://android.googlesource.com/platform/system/extras#tag=android-$pkgver
git+https://android.googlesource.com/platform/external/selinux#tag=android-$pkgver
git+https://android.googlesource.com/platform/external/f2fs-tools#tag=android-$pkgver
git+https://android.googlesource.com/platform/external/e2fsprogs#tag=android-$pkgver
2019-01-19 20:49:34 +00:00
git+https://android.googlesource.com/platform/external/avb#tag=android-$pkgver
2018-03-22 03:56:30 +00:00
git+https://boringssl.googlesource.com/boringssl#commit=$_boringssl_commit
generate_build.rb
fix_build_core.patch
fix_build_selinux.patch
fix_build_e2fsprogs.patch
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'
2018-08-08 19:39:14 +00:00
'238507086a99134820cc9900545cbff06772dc30'
'62446582a96b3a39e5d91e3e2ef8b8b38a5a735e'
2018-03-22 03:56:30 +00:00
'ec473160d7445f97bccabd1c32ac0ae2f77900c1'
2018-08-08 19:39:14 +00:00
'5df8c7e00a4066733d59050e8e1fcd4cc2b22104'
2018-03-22 03:56:30 +00:00
'7004dbd0c193668827174880de6f8434de8ceaee')
prepare() {
2019-01-19 20:49:34 +00:00
PKGVER=$pkgver LDFLAGS='-Wl,-z,relro,-z,now' ./generate_build.rb > build.ninja
2018-03-22 03:56:30 +00:00
cd $srcdir/core
patch -p1 < ../fix_build_core.patch
cd $srcdir/selinux
patch -p1 < ../fix_build_selinux.patch
cd $srcdir/e2fsprogs
patch -p1 < ../fix_build_e2fsprogs.patch
2019-01-19 20:49:34 +00:00
cd $srcdir/avb
sed -i 's|/usr/bin/env python$|/usr/bin/env python2|g' avbtool
2018-06-12 00:30:11 +00:00
sed -i 's/-fno-common/-fno-common -Wno-error=attributes/' $srcdir/boringssl/CMakeLists.txt
2018-03-22 03:56:30 +00:00
mkdir -p $srcdir/boringssl/build && cd $srcdir/boringssl/build && cmake -GNinja ..; ninja
}
build() {
ninja
}
package(){
install -m755 -d "$pkgdir"/usr/bin
2019-01-19 20:49:34 +00:00
install -m755 -t "$pkgdir"/usr/bin fastboot adb mke2fs.android e2fsdroid ext2simg core/mkbootimg/mkbootimg avb/avbtool
2018-03-22 03:56:30 +00:00
install -Dm 644 bash_completion.fastboot "$pkgdir"/usr/share/bash-completion/completions/fastboot
}