/[gentoo-x86]/dev-util/android-sdk-update-manager/android-sdk-update-manager-20.0.3.ebuild
Gentoo

Contents of /dev-util/android-sdk-update-manager/android-sdk-update-manager-20.0.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Mon Aug 20 14:22:24 2012 UTC (23 months, 1 week ago) by rich0
Branch: MAIN
Changes since 1.1: +2 -2 lines
Fix for breakage with swt-4.2.

(Portage version: 2.1.11.9/cvs/Linux x86_64)

1 rich0 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 rich0 1.2 # $Header: /var/cvsroot/gentoo-x86/dev-util/android-sdk-update-manager/android-sdk-update-manager-20.0.3.ebuild,v 1.1 2012/08/14 13:36:49 rich0 Exp $
4 rich0 1.1
5     EAPI="3"
6    
7     inherit eutils user
8    
9     MY_P="android-sdk_r${PV}-linux"
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"
16    
17     LICENSE="android"
18     SLOT="0"
19     KEYWORDS="~amd64 ~x86"
20    
21     DEPEND="app-arch/tar
22     app-arch/gzip"
23     RDEPEND=">=virtual/jdk-1.5
24     >=dev-java/ant-core-1.6.5
25     >=dev-java/swt-3.5
26     amd64? ( app-emulation/emul-linux-x86-gtklibs )
27     x86? ( x11-libs/gtk+:2 )"
28    
29     ANDROID_SDK_DIR="/opt/${PN}"
30     QA_DT_HASH_x86="
31     ${ANDROID_SDK_DIR/\/}/tools/emulator
32     ${ANDROID_SDK_DIR/\/}/tools/adb
33     ${ANDROID_SDK_DIR/\/}/tools/mksdcard
34     ${ANDROID_SDK_DIR/\/}/tools/sqlite3
35     ${ANDROID_SDK_DIR/\/}/tools/hprof-conv
36     ${ANDROID_SDK_DIR/\/}/tools/zipalign
37     ${ANDROID_SDK_DIR/\/}/tools/dmtracedump
38     "
39     QA_DT_HASH_amd64="${QA_DT_HASH_x86}"
40    
41     S="${WORKDIR}/android-sdk-linux"
42    
43     pkg_setup() {
44     enewgroup android
45     }
46    
47     src_prepare(){
48     rm -rf tools/lib/x86*
49     }
50    
51     src_install(){
52     dodoc tools/NOTICE.txt "SDK Readme.txt" || die
53     rm -f tools/NOTICE.txt "SDK Readme.txt"
54    
55     dodir "${ANDROID_SDK_DIR}/tools"
56     cp -pPR tools/* "${ED}${ANDROID_SDK_DIR}/tools" || die "failed to install tools"
57    
58     # Maybe this is needed for the tools directory too.
59     dodir "${ANDROID_SDK_DIR}"/{add-ons,docs,platforms,temp} || die "failed to dodir"
60    
61     fowners root:android "${ANDROID_SDK_DIR}"/{,add-ons,docs,platforms,temp,tools} || die
62     fperms 0775 "${ANDROID_SDK_DIR}"/{,add-ons,docs,platforms,temp,tools} || die
63    
64     echo "PATH=\"${EPREFIX}${ANDROID_SDK_DIR}/tools:${EPREFIX}${ANDROID_SDK_DIR}/platform-tools\"" > "${T}/80${PN}" || die
65    
66     SWT_PATH=
67 rich0 1.2 SWT_VERSIONS="4.2 3.7 3.6 3.5"
68 rich0 1.1 for version in $SWT_VERSIONS; do
69     # redirecting stderr to /dev/null
70     # not sure if this is best, but avoids misleading error messages
71     SWT_PATH="`dirname \`java-config -p swt-\$version 2>/dev/null\` 2>/dev/null`"
72     if [ $SWT_PATH ]; then
73     einfo "SWT_PATH=$SWT_PATH selecting version $version of SWT."
74     break
75     fi
76     done
77    
78     echo "ANDROID_SWT=\"${SWT_PATH}\"" >> "${T}/80${PN}" || die
79    
80     doenvd "${T}/80${PN}" || die
81    
82     echo "SEARCH_DIRS_MASK=\"${EPREFIX}${ANDROID_SDK_DIR}\"" > "${T}/80${PN}" || die
83    
84     insinto "/etc/revdep-rebuild" && doins "${T}/80${PN}" || die
85    
86     }
87    
88     pkg_postinst() {
89     elog "The Android SDK now uses its own manager for the development environment."
90     elog "Run 'android' to download the full SDK, including some of the platform tools."
91     elog "You must be in the android group to manage the development environment."
92     elog "Just run 'gpasswd -a <USER> android', then have <USER> re-login."
93     elog "See http://developer.android.com/sdk/adding-components.html for more"
94     elog "information."
95     elog "If you have problems downloading the SDK, see http://code.google.com/p/android/issues/detail?id=4406"
96     elog "You need to run env-update and source /etc/profile in any open shells"
97     elog "if you get an SWT error."
98     }

  ViewVC Help
Powered by ViewVC 1.1.20