summaryrefslogtreecommitdiff
path: root/dev-util/android-sdk-cmdline-tools/android-sdk-cmdline-tools-0_p11076708.ebuild
diff options
context:
space:
mode:
authorFlorian Schmaus <flow@gentoo.org>2024-11-08 08:47:20 +0100
committerFlorian Schmaus <flow@gentoo.org>2024-11-08 08:49:43 +0100
commitfd61ec9ab3ecd70bea3b68727a336688dd279d95 (patch)
tree929a913104fe75f12402279ba35aa3f8e4153a81 /dev-util/android-sdk-cmdline-tools/android-sdk-cmdline-tools-0_p11076708.ebuild
parent72c8855d34035202533fe8d4d59bf17b9d74fee6 (diff)
downloadgentoo-fd61ec9ab3ecd70bea3b68727a336688dd279d95.tar.gz
gentoo-fd61ec9ab3ecd70bea3b68727a336688dd279d95.tar.bz2
gentoo-fd61ec9ab3ecd70bea3b68727a336688dd279d95.zip
dev-util/android-sdk-cmdline-tools: new package, add 0_p11076708
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-util/android-sdk-cmdline-tools/android-sdk-cmdline-tools-0_p11076708.ebuild')
-rw-r--r--dev-util/android-sdk-cmdline-tools/android-sdk-cmdline-tools-0_p11076708.ebuild59
1 files changed, 59 insertions, 0 deletions
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
+}