dev-util/android-sdk-update-manager/android-sdk-update-manager-15.ebuild
author Da Risk <da_risk@geekorum.com>
Sat, 29 Dec 2012 02:01:03 +0100
changeset 55 a19fd6a6e6d3
parent 25 8b435e1f15e0
permissions -rw-r--r--
Add repoze-who needed for mozilla sync
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
     1
# Copyright 1999-2011 Gentoo Foundation
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
     2
# Distributed under the terms of the GNU General Public License v2
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
     3
# $Header: /var/cvsroot/gentoo-x86/dev-util/android-sdk-update-manager/android-sdk-update-manager-14.ebuild,v 1.2 2011/11/02 21:44:03 vapier Exp $
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
     4
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
     5
EAPI="3"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
     6
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
     7
inherit eutils
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
     8
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
     9
MY_P="android-sdk_r${PV}-linux"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    10
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    11
DESCRIPTION="Open Handset Alliance's Android SDK"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    12
HOMEPAGE="http://developer.android.com"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    13
SRC_URI="http://dl.google.com/android/${MY_P}.tgz"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    14
IUSE="+X"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    15
RESTRICT="mirror"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    16
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    17
LICENSE="android"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    18
SLOT="0"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    19
KEYWORDS="~amd64 ~x86"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    20
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    21
DEPEND="app-arch/tar
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    22
		app-arch/gzip"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    23
RDEPEND=">=virtual/jdk-1.5
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    24
	>=dev-java/ant-core-1.6.5
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    25
	X? (
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    26
		|| ( dev-java/swt:3.5 dev-java/swt:3.6 )
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    27
		amd64? ( app-emulation/emul-linux-x86-gtklibs )
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    28
		x86? ( x11-libs/gtk+:2 )
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    29
	)"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    30
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    31
ANDROID_SDK_DIR="/opt/${PN}"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    32
QA_DT_HASH_x86="
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    33
	${ANDROID_SDK_DIR/\/}/tools/emulator
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    34
	${ANDROID_SDK_DIR/\/}/tools/adb
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    35
	${ANDROID_SDK_DIR/\/}/tools/mksdcard
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    36
	${ANDROID_SDK_DIR/\/}/tools/sqlite3
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    37
	${ANDROID_SDK_DIR/\/}/tools/hprof-conv
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    38
	${ANDROID_SDK_DIR/\/}/tools/zipalign
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    39
	${ANDROID_SDK_DIR/\/}/tools/dmtracedump
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    40
"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    41
QA_DT_HASH_amd64="${QA_DT_HASH_x86}"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    42
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    43
S="${WORKDIR}/android-sdk-linux"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    44
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    45
pkg_setup() {
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    46
	enewgroup android
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    47
}
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    48
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    49
src_prepare(){
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    50
#	epatch "${FILESDIR}/${PN}-8-swt.patch"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    51
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    52
	rm -rf tools/lib/x86*
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    53
}
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    54
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    55
src_install(){
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    56
	dodoc tools/NOTICE.txt "SDK Readme.txt" || die
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    57
	rm -f tools/NOTICE.txt "SDK Readme.txt"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    58
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    59
	dodir "${ANDROID_SDK_DIR}/tools"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    60
	cp -pPR tools/* "${ED}${ANDROID_SDK_DIR}/tools" || die "failed to install tools"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    61
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    62
	# Maybe this is needed for the tools directory too.
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    63
	#keepdir "${ANDROID_SDK_DIR}"/{add-ons,docs,platforms,temp} || die "failed to keepdir"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    64
	dodir "${ANDROID_SDK_DIR}"/{add-ons,docs,platforms,temp} || die "failed to dodir"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    65
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    66
	fowners root:android "${ANDROID_SDK_DIR}"/{,add-ons,docs,platforms,temp,tools} || die
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    67
	fperms 0775 "${ANDROID_SDK_DIR}"/{,add-ons,docs,platforms,temp,tools} || die
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    68
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    69
	echo "PATH=\"${EPREFIX}${ANDROID_SDK_DIR}/tools:${EPREFIX}${ANDROID_SDK_DIR}/platform-tools\"" > "${T}/80${PN}" || die
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    70
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    71
	if use X ; then
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    72
		SWT_PATH="`dirname \`java-config -p swt-3.?\``"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    73
	else
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    74
		SWT_PATH="/tmp"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    75
	fi
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    76
	echo "ANDROID_SWT=\"${SWT_PATH}\"" >> "${T}/80${PN}" || die
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    77
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    78
	doenvd "${T}/80${PN}" || die
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    79
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    80
	echo "SEARCH_DIRS_MASK=\"${EPREFIX}${ANDROID_SDK_DIR}\"" > "${T}/80${PN}" || die
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    81
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    82
	insinto "/etc/revdep-rebuild" && doins "${T}/80${PN}" || die
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    83
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    84
}
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    85
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    86
pkg_postinst() {
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    87
	elog "The Android SDK now uses its own manager for the development	environment."
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    88
	elog "You must be in the android group to manage the development environment."
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    89
	elog "Just run 'gpasswd -a <USER> android', then have <USER> re-login."
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    90
	elog "See http://developer.android.com/sdk/adding-components.html for more"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    91
	elog "information."
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    92
	elog "If you have problems downloading the SDK, see http://code.google.com/p/android/issues/detail?id=4406"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    93
	elog "You need to run env-update and source /etc/profile in any open shells"
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    94
	elog "if you get an SWT error."
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    95
	use X || ewarn "You specified -X use-flag, the programs emulator and ddms will not work."
8b435e1f15e0 Add custom ebuild with -X for android-sdk-update-manager-15
Frédéric Barthéléry <frederic.barthelery.ext@parrot.com>
parents:
diff changeset
    96
}