summaryrefslogtreecommitdiff
blob: af628bfb63fd6128323129566ac40b3f747bfcd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: dev-python/starcluster-0.9999.ebuild 2011/04/19 jtriley

EAPI="4"

PYTHON_DEPEND="2:2.5"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.*"
DISTUTILS_SRC_TEST="nosetests"

inherit distutils bash-completion git-2

MY_PN="StarCluster"
MY_P="${MY_PN}-${PV}"

DESCRIPTION="StarCluster is a utility for creating and managing general purpose computing clusters hosted on Amazon's Elastic Compute Cloud (EC2)."
HOMEPAGE="http://web.mit.edu/star/cluster"
KEYWORDS="~amd64"
EGIT_REPO_URI="http://github.com/jtriley/${MY_PN}.git"
EGIT_BRANCH="develop"
LICENSE="LGPL-3"
SLOT="0"

IUSE="doc bash-completion"

RDEPEND=">=dev-python/ssh-1.7.13
	>=dev-python/boto-2.3.0
	>=dev-python/jinja-2.6
	>=dev-python/decorator-3.1.1
	>=dev-python/pyasn1-0.0.13_beta
	>=dev-python/workerpool-0.9.2"

DEPEND="${RDEPEND}
	doc? ( dev-python/sphinx )
	test? ( dev-python/nose )
	dev-python/setuptools"

S="${WORKDIR}/${MY_P}"

PYTHON_MODNAME="${PN}"

DOCS="docs/sphinx/*"

src_compile() {
	distutils_src_compile
	if use doc; then
		einfo "Generation of documentation"
		pushd docs/sphinx > /dev/null
		emake html || die "Generation of documentation failed"
		popd > /dev/null
	fi
}

src_install() {
	distutils_src_install --install-scripts="/usr/bin"
	dobashcompletion completion/${PN}-completion.sh ${PN}
	if use doc; then
		dohtml -A txt -r docs/sphinx/_build/html/*
	fi
}

pkg_postinst() {
	bash-completion_pkg_postinst
	distutils_pkg_postinst
}