summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHai Zhang2020-03-11 01:45:05 -0700
committerHai Zhang2020-03-11 01:45:05 -0700
commit459cc2845d435856a6083e8e9e8006e88617e21e (patch)
treeaf65244bb1416640d7a4ca766dd6c8782969292e
downloadaur-459cc2845d435856a6083e8e9e8006e88617e21e.tar.gz
Add 1.0.
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD27
-rw-r--r--android-sdk-cmdline-tools-latest.csh2
-rw-r--r--android-sdk-cmdline-tools-latest.install3
-rw-r--r--android-sdk-cmdline-tools-latest.sh2
5 files changed, 57 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9edb69de5b1f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = android-sdk-cmdline-tools-latest
+ pkgdesc = Android SDK Command-line Tools (latest)
+ pkgver = 1.0
+ pkgrel = 1
+ url = https://developer.android.com/studio
+ install = android-sdk-cmdline-tools-latest.install
+ arch = x86_64
+ arch = i686
+ license = custom
+ depends = glibc
+ depends = java-environment
+ optdepends = android-sdk-platform-tools: adb, aapt, aidl, dexdump and dx
+ optdepends = android-udev: udev rules for Android devices
+ provides = android-sdk
+ source = https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip
+ source = android-sdk-cmdline-tools-latest.sh
+ source = android-sdk-cmdline-tools-latest.csh
+ sha1sums = 6ffc5bd72db2c755f9b374ed829202262a6d8aaf
+ sha1sums = d16076f0a7cbc78605b5669d0928963a9866e7f4
+ sha1sums = 3e844b22bfcbc159280c5f9e8dfb07ff9559dde5
+
+pkgname = android-sdk-cmdline-tools-latest
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c103102a4c86
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Hai Zhang <dreaming.in.code.zh@gmail.com>
+
+pkgname=android-sdk-cmdline-tools-latest
+pkgver=1.0
+pkgrel=1
+pkgdesc='Android SDK Command-line Tools (latest)'
+arch=('x86_64' 'i686')
+url='https://developer.android.com/studio'
+license=('custom')
+depends=('glibc' 'java-environment')
+optdepends=('android-sdk-platform-tools: adb, aapt, aidl, dexdump and dx'
+ 'android-udev: udev rules for Android devices')
+provides=('android-sdk')
+install="${pkgname}.install"
+source=('https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip'
+ "${pkgname}.sh"
+ "${pkgname}.csh")
+sha1sums=('6ffc5bd72db2c755f9b374ed829202262a6d8aaf'
+ 'd16076f0a7cbc78605b5669d0928963a9866e7f4'
+ '3e844b22bfcbc159280c5f9e8dfb07ff9559dde5')
+
+package() {
+ mkdir -p "${pkgdir}/opt/android-sdk/cmdline-tools/"
+ cp -a 'tools' "${pkgdir}/opt/android-sdk/cmdline-tools/latest"
+ install -Dm755 "${pkgname}.sh" "${pkgdir}/etc/profile.d/${pkgname}.sh"
+ install -Dm755 "${pkgname}.csh" "${pkgdir}/etc/profile.d/${pkgname}.csh"
+}
diff --git a/android-sdk-cmdline-tools-latest.csh b/android-sdk-cmdline-tools-latest.csh
new file mode 100644
index 000000000000..af7eaaa50bf0
--- /dev/null
+++ b/android-sdk-cmdline-tools-latest.csh
@@ -0,0 +1,2 @@
+setenv ANDROID_HOME '/opt/android-sdk'
+setenv PATH "${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin"
diff --git a/android-sdk-cmdline-tools-latest.install b/android-sdk-cmdline-tools-latest.install
new file mode 100644
index 000000000000..d71aaba232d5
--- /dev/null
+++ b/android-sdk-cmdline-tools-latest.install
@@ -0,0 +1,3 @@
+post_install() {
+ echo 'You need to source /etc/profile or relogin to add Android SDK Command-line Tools (latest) to your path.'
+}
diff --git a/android-sdk-cmdline-tools-latest.sh b/android-sdk-cmdline-tools-latest.sh
new file mode 100644
index 000000000000..b002c0fa11cb
--- /dev/null
+++ b/android-sdk-cmdline-tools-latest.sh
@@ -0,0 +1,2 @@
+export ANDROID_HOME='/opt/android-sdk'
+export PATH="${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin"