void-packages/srcpkgs/android-tools/template

78 lines
2.9 KiB
Bash

# Template file for 'android-tools'
pkgname=android-tools
# NOTE: not all upstream updates has code changes for the parts
# of android used by android-tools. Check for diff with:
# curl -L http://git.io/vvC0Z | sh -s 5.0.2_r1 5.1.0_r1
version=8.1.0r14
revision=2
_distver=${version/r/_r}
create_wrksrc=yes
hostmakedepends="ruby cmake ninja perl go"
makedepends="gtest-devel zlib-devel libressl-devel libusb-devel pcre2-devel"
short_desc="Android platform tools (adb and fastboot)"
maintainer="Eivind Uggedal <eivind@uggedal.com>"
license="Apache-2.0 ISC GPL-2 MIT"
homepage="http://developer.android.com/tools/help/adb.html"
_baseurl=https://android.googlesource.com/platform
distfiles="
${_baseurl}/system/core/+archive/ac8169f45dc9e5332d3ec24d0b14f812668b0c8e.tar.gz>core.tar.gz
${_baseurl}/system/extras/+archive/e563ed1bca5ea0421f654eef82d758ec25c10bdd.tar.gz>extras.tar.gz
${_baseurl}/external/selinux/+archive/90efe04c55f82a7ea166c913405758fd91bc9aa9.tar.gz>selinux.tar.gz
${_baseurl}/external/f2fs-tools/+archive/a3f779d308a10d7e6b87cf0134445e7378de4770.tar.gz>f2fs-tools.tar.gz
${_baseurl}/external/e2fsprogs/+archive/6bdf355a7c96ddd5eb867778d857de82fca793a5.tar.gz>e2fsprogs.tar.gz
https://boringssl.googlesource.com/boringssl/+archive/a20bb7ff8bb5057065a2e7941249773f9676cf45.tar.gz>boringssl.tar.gz"
# Contents checksums because the tarballs change with every download
checksum="@ce40cf2757bdd87d458655dc00d8ad835c69304ecab88faa7eb7e514712ba98d
@7f697f84f3454658ecc609620be344f3496603605158304f2cd1055f143a07c6
@4c7d9b0650f47e83f75088c3fbbedab45e9f1a15081fa20f25104558eb81e406
@ae8c85b3db0f5bdc9b01eacb8b0490e5a34c9d20a9ed962d8b9942b3451c6111
@e4ab1880f0f043da29a04f1c446155f365933a4e46a9f4e8865ec104f64a982b
@748945a2c1f50c40286c963bd4e7a08a8e5bd450a6dc71a9de1a2b451d614a38"
nocross="error: requested alignment 64 is larger than 8 [-Werror=attributes]"
do_extract() {
local tarball p
for p in ${distfiles}; do
tarball=${p##*>}
mkdir -p ${wrksrc}/${tarball/.*}
tar -x --no-same-permissions --no-same-owner -f \
${XBPS_SRCDISTDIR}/${pkgname}-${version}/${tarball} \
-C ${wrksrc}/${tarball/.*}
done
}
pre_configure() {
PKGVER=${_distver} ${FILESDIR}/generate_build.rb > build.ninja
mkdir -p boringssl/build
cd boringssl/build
cmake -GNinja \
-DBUILD_SHARED_LIBS=FALSE \
-DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_C_FLAGS="$CFLAGS" \
..
ninja
}
do_build() {
ninja
}
do_install() {
for i in adb fastboot mke2fs.android e2fsdroid ext2simg \
core/mkbootimg/mkbootimg ;do
vbin $i
done
vlicense boringssl/LICENSE boringssl.LICENSE
vlicense boringssl/third_party/fiat/LICENSE fiat.LICENSE
vlicense boringssl/third_party/googletest/LICENSE gtest.LICENSE
vlicense boringssl/third_party/android-cmake/LICENSE android-cmake.LICENSE
vsv adb
}
# REMARKS:
# If there is any reason at all that fastboot may not be a position independent
# executable, please document it here.