Created
February 25, 2020 17:41
-
-
Save AndreVallestero/32bac70e5a6f7d299e07df57605dd70a to your computer and use it in GitHub Desktop.
android-sdk aarch64 PKGBUILD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Zhang Hai <[email protected]> | |
# Contributor: Alexander F Rødseth <[email protected]> | |
# Contributor: Daniel Micay <[email protected]> | |
# Contributor: Gordin <[email protected]> | |
# Finding dependencies: | |
# ELF dependencies: | |
# cd /lib/ && find /opt/android-sdk/tools/ -type f -executable \ | |
# | LANG=C xargs readelf -d 2>/dev/null \ | |
# | grep -oP '(?<=Shared library: \[).*(?=\])' | LANG=C xargs pacman -Qo \ | |
# | cut -d' ' -f5 | sort | uniq | |
# .so in JAR files: | |
# find /opt/android-sdk/tools/ -type f -exec unzip -l {} 2>&1 \; \ | |
# | grep -P '^Archive:|\.so$' \ | |
# | awk 'BEGIN { archive = ""; } { if (NF == 2) { archive = $0; } else { \ | |
# if (length(archive) > 0) { print archive; archive="" } print $0; } }' | |
# Note that dependency on libxtst is from swt. | |
pkgname=android-sdk | |
pkgver=26.1.1 | |
pkgrel=1 | |
pkgdesc='Google Android SDK' | |
arch=('x86_64' 'i686' 'aarch64') | |
url='https://developer.android.com/studio/releases/sdk-tools.html' | |
license=('custom') | |
depends_i686=('java-environment' 'libxtst' 'fontconfig' 'freetype2' 'gcc-libs' | |
'libx11' 'libxext' 'libxrender' 'zlib') | |
depends_x86_64=('java-environment' 'libxtst' 'fontconfig' 'freetype2' | |
'lib32-gcc-libs' 'lib32-glibc' 'libx11' 'libxext' 'libxrender' | |
'zlib') | |
depends_aarch64=('java-environment' 'libxtst' 'fontconfig' 'freetype2' | |
'gcc-libs' 'glibc' 'libx11' 'libxext' 'libxrender' 'zlib') | |
optdepends=('android-emulator: emulator has become standalone since 25.3.0' | |
'android-sdk-platform-tools: adb, aapt, aidl, dexdump and dx' | |
'android-udev: udev rules for Android devices') | |
install="${pkgname}.install" | |
source=('https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip' | |
"${pkgname}.sh" | |
"${pkgname}.csh" | |
"${pkgname}.conf" | |
'license.html') | |
sha1sums=('8c7c28554a32318461802c1291d76fccfafde054' | |
'30a6ed281d54f8b7be08663a18c367f79c0d8d47' | |
'1bd09bf137fd09171cb426daa5748f117cfb3c25' | |
'145bdf3eb41a56574b289c1577a24bc47097ec83' | |
'bfb91be7e0b602d765b7a1fcaf0ce1b7e1a93faa') | |
package() { | |
install -Dm755 "${pkgname}.sh" "${pkgdir}/etc/profile.d/${pkgname}.sh" | |
install -Dm755 "${pkgname}.csh" "${pkgdir}/etc/profile.d/${pkgname}.csh" | |
install -Dm644 "${pkgname}.conf" "${pkgdir}/etc/ld.so.conf.d/${pkgname}.conf" | |
install -Dm644 license.html "${pkgdir}/usr/share/licenses/${pkgname}/license.html" | |
install -d "${pkgdir}/opt/${pkgname}/platforms" | |
install -d "${pkgdir}/opt/${pkgname}/add-ons" | |
cp -a tools "${pkgdir}/opt/${pkgname}" | |
if [[ $CARCH = i686 ]]; then | |
rm -rf "${pkgdir}"/opt/android-sdk/tools/lib/{monitor-,}x86_64 | |
fi | |
# Fix broken permissions | |
chmod -R o=g "${pkgdir}/opt/${pkgname}" | |
find "${pkgdir}/opt/${pkgname}" -perm 744 -exec chmod 755 {} + | |
} | |
# getver: https://developer.android.com/studio/releases/sdk-tools.html | |
# see https://dl.google.com/android/repository/repository2-1.xml for new versions | |
# vim:set ts=2 sw=2 et: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment