summaryrefslogtreecommitdiff
path: root/dev-util/android-sdk-cmdline-tools
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/android-sdk-cmdline-tools')
-rw-r--r--dev-util/android-sdk-cmdline-tools/Manifest4
-rw-r--r--dev-util/android-sdk-cmdline-tools/android-sdk-cmdline-tools-0_p11076708.ebuild59
-rw-r--r--dev-util/android-sdk-cmdline-tools/files/80-android-device.rules4
-rw-r--r--dev-util/android-sdk-cmdline-tools/metadata.xml8
4 files changed, 75 insertions, 0 deletions
diff --git a/dev-util/android-sdk-cmdline-tools/Manifest b/dev-util/android-sdk-cmdline-tools/Manifest
new file mode 100644
index 000000000000..c648badd78ab
--- /dev/null
+++ b/dev-util/android-sdk-cmdline-tools/Manifest
@@ -0,0 +1,4 @@
+AUX 80-android-device.rules 284 BLAKE2B a45cd541f9812a9657312ae7c83ee36f9d6c3c53d2caa036d1649455389bd7244efa277d41c3e6eec4a0b10d9a97d5e81acd0d17aac8df3bfa3ec72bad5e8d87 SHA512 f78834e2b33afa88f59a636f9fb7804d341847568a638a68beba9ca842e78e40a52a9ad8396ae79d105d87e52f585d523e8f0d847fc7708ddc3351c031571f19
+DIST commandlinetools-linux-11076708_latest.zip 153607504 BLAKE2B bd2b96dff99fe429907f8b0b108177d53e4165f9995efa1ab2839ae7e8cd4cc14aa64f1901e6c6ae5e7255a6b63cd6840bad1d4cd5c5267cfe01e7003421f483 SHA512 d143221d0957256c5b172a5be70e5f098a08b2b3097a20c576c8febf444a00a64f626a7f651a7d5123b9ba32418dc0ae7053d0b4b52c40f772a6a1fb19a95417
+EBUILD android-sdk-cmdline-tools-0_p11076708.ebuild 1546 BLAKE2B d2655c8fb910e3f43aecdcf33906d7a8acdec27d4515491b2495ae433f9e244f8960cdf59e44041ca618ce2880271aecbd058c690317adfdabbaa183a0f468e0 SHA512 99ff94cd1854ea95789c8462762a2fa606439c4a899d4345813d20641a869b87208e30dd73426f8eb19cc9bea52b059ea2c9cd97608746b2dd90e703fd1ad2a4
+MISC metadata.xml 247 BLAKE2B f18c471812d5b8c75f2e05c4fb556108fb93554b59ee61a8215803f2654854a7401fcd62964192c228bfebfb52ae4573cfd24b29a944630c8c733d154d2b0d9a SHA512 cea16f7db3110bd4629b9265d5acdec6d70877330664f8e83f726002eb69aec7f822e9cde9c7da900451cdef60f1ceba373dfe73c73f82173bbf1d2f9f7338b7
diff --git a/dev-util/android-sdk-cmdline-tools/android-sdk-cmdline-tools-0_p11076708.ebuild b/dev-util/android-sdk-cmdline-tools/android-sdk-cmdline-tools-0_p11076708.ebuild
new file mode 100644
index 000000000000..af6f1b4370dd
--- /dev/null
+++ b/dev-util/android-sdk-cmdline-tools/android-sdk-cmdline-tools-0_p11076708.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit greadme udev
+
+DESCRIPTION="Open Handset Alliance's Android SDK"
+HOMEPAGE="https://developer.android.com/tools https://developer.android.com/studio#command-tools"
+SRC_URI="https://dl.google.com/android/repository/commandlinetools-linux-$(ver_cut 3)_latest.zip"
+
+S="${WORKDIR}/cmdline-tools"
+
+LICENSE="android"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RESTRICT="bindist mirror"
+
+DEPEND="acct-group/android"
+RDEPEND="
+ ${DEPEND}
+ virtual/jre
+"
+BDEPEND="app-arch/unzip"
+
+src_install() {
+ local android_sdk_dir="/opt/android-sdk"
+ local target="${android_sdk_dir}/cmdline-tools/latest"
+
+ insinto "${target}"
+ doins -r .
+
+ fowners -R root:android "${android_sdk_dir}"
+ fperms -R 0775 "${android_sdk_dir}"
+
+ newenvd - "80${PN}" <<-EOF
+ PATH="${EPREFIX}${target}/bin"
+ ANDROID_HOME="${EPREFIX}${android_sdk_dir}"
+EOF
+
+ udev_dorules "${FILESDIR}"/80-android-device.rules
+
+ greadme_stdin <<-EOF
+ The Android SDK now uses its own manager for the development environment.
+ Run 'sdkmanager' to download the full SDK, including some of the platform tools.
+ You must be in the android group to manage the development environment.
+ Just run 'gpasswd -a <USER> android', then have <USER> re-login.
+EOF
+}
+
+pkg_postinst() {
+ greadme_pkg_postinst
+
+ if has_version dev-util/android-sdk-update-manager; then
+ ewarn "This package (${P}) superseeds dev-util/android-sdk-update-manager"
+ ewarn "Consider uninstalling dev-util/android-sdk-update-manager"
+ fi
+}
diff --git a/dev-util/android-sdk-cmdline-tools/files/80-android-device.rules b/dev-util/android-sdk-cmdline-tools/files/80-android-device.rules
new file mode 100644
index 000000000000..e6eda7c938a0
--- /dev/null
+++ b/dev-util/android-sdk-cmdline-tools/files/80-android-device.rules
@@ -0,0 +1,4 @@
+SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0664", GROUP="android"
+SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0664", GROUP="android"
+SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0664", GROUP="android"
+SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0664", GROUP="android"
diff --git a/dev-util/android-sdk-cmdline-tools/metadata.xml b/dev-util/android-sdk-cmdline-tools/metadata.xml
new file mode 100644
index 000000000000..a7fa285c7476
--- /dev/null
+++ b/dev-util/android-sdk-cmdline-tools/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <name>Florian Schmaus</name>
+ <email>flow@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>