1 # Copyright 1999-2009 Gentoo Foundation |
|
2 # Distributed under the terms of the GNU General Public License v2 |
|
3 # $Header: /var/cvsroot/gentoo-x86/dev-util/android-sdk-update-manager/android-sdk-update-manager-3-r1.ebuild,v 1.2 2009/11/19 02:41:03 mr_bones_ Exp $ |
|
4 |
|
5 EAPI="2" |
|
6 |
|
7 inherit eutils |
|
8 |
|
9 MY_P="android-sdk_r0${PV}-linux_86" |
|
10 |
|
11 DESCRIPTION="Open Handset Alliance's Android SDK/" |
|
12 HOMEPAGE="http://developer.android.com" |
|
13 SRC_URI="http://dl.google.com/android/${MY_P}.tgz" |
|
14 IUSE="" |
|
15 RESTRICT="mirror strip" |
|
16 |
|
17 LICENSE="Apache-2.0 as-is BSD BZIP2 CPL-1.0 EPL-1.0 GPL-2 LGPL-2.1 MIT SPL ZLIB" |
|
18 SLOT="0" |
|
19 KEYWORDS="~amd64 ~x86" |
|
20 |
|
21 RDEPEND=">=virtual/jdk-1.5 |
|
22 >=dev-java/ant-core-1.6.5 |
|
23 amd64? ( app-emulation/emul-linux-x86-gtklibs ) |
|
24 x86? ( x11-libs/gtk+:2 )" |
|
25 |
|
26 ANDROID_SDK_DIR="/opt/${PN}" |
|
27 QA_DT_HASH_x86=" |
|
28 ${ANDROID_SDK_DIR/\/}/tools/emulator |
|
29 ${ANDROID_SDK_DIR/\/}/tools/adb |
|
30 ${ANDROID_SDK_DIR/\/}/tools/mksdcard |
|
31 ${ANDROID_SDK_DIR/\/}/tools/sqlite3 |
|
32 ${ANDROID_SDK_DIR/\/}/tools/hprof-conv |
|
33 ${ANDROID_SDK_DIR/\/}/tools/zipalign |
|
34 ${ANDROID_SDK_DIR/\/}/tools/dmtracedump |
|
35 " |
|
36 QA_DT_HASH_amd64="${QA_DT_HASH_x86}" |
|
37 |
|
38 S="${WORKDIR}/android-sdk-linux_86" |
|
39 |
|
40 pkg_setup() { |
|
41 enewgroup android || die |
|
42 } |
|
43 |
|
44 src_install(){ |
|
45 dodoc tools/NOTICE.txt "SDK Readme.txt" || die |
|
46 rm -f tools/NOTICE.txt "SDK Readme.txt" |
|
47 |
|
48 insinto "${ANDROID_SDK_DIR}/tools" |
|
49 doins -r tools/lib || die "failed to doins tools/lib" |
|
50 rm -rf tools/lib || die |
|
51 |
|
52 exeinto "${ANDROID_SDK_DIR}/tools" |
|
53 doexe tools/* || die "failed to doexe tools/" |
|
54 |
|
55 # Maybe this is needed for the tools directory too. |
|
56 #keepdir "${ANDROID_SDK_DIR}"/{add-ons,docs,platforms,temp} || die "failed to keepdir" |
|
57 dodir "${ANDROID_SDK_DIR}"/{add-ons,docs,platforms,temp} || die "failed to dodir" |
|
58 |
|
59 fowners root:android "${ANDROID_SDK_DIR}"/{,add-ons,docs,platforms,temp} || die |
|
60 fperms 0775 "${ANDROID_SDK_DIR}"/{,add-ons,docs,platforms,temp} || die |
|
61 |
|
62 echo "PATH=\"${ANDROID_SDK_DIR}/tools\"" > "${T}/80${PN}" || die |
|
63 doenvd "${T}/80${PN}" || die |
|
64 } |
|
65 |
|
66 pkg_postinst() { |
|
67 elog "The Android SDK now uses its own manager for the development environment." |
|
68 elog "You must be in the android group to manage the development environment." |
|
69 elog "Just run 'gpasswd -a <USER> android', then have <USER> re-login." |
|
70 elog "See http://dev.android.com/sdk/adding-components.html for more information." |
|
71 elog "If you have problems downloading the SDK, see http://code.google.com/p/android/issues/detail?id=4406" |
|
72 } |
|