summaryrefslogtreecommitdiff
blob: 0642d55ac19f06c0631bd6c9fb3800aaef4ac33e (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-misc/reflector/reflector-2011.05.13.1.ebuild,v 1.3 2012/10/29 16:39:49 mgorny Exp $

EAPI=3

DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES=1
PYTHON_DEPEND="*:2.6"
RESTRICT_PYTHON_ABIS="2.[45]"
SUPPORT_PYTHON_ABIS=1

inherit eutils distutils

DESCRIPTION="archlinux's take on mirrorselect"
HOMEPAGE="http://xyne.archlinux.ca/projects/reflector/"
SRC_URI="http://xyne.archlinux.ca/src/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

RDEPEND="virtual/python-argparse"

S=${WORKDIR}/${PN}

PYTHON_MODNAME="Reflector.py"

src_prepare() {
	distutils_src_prepare

	my_src_prepare() {
		[[ $(python_get_version --major) == 2 ]] && epatch 3to2.patch
		:
	}

	python_execute_function -s my_src_prepare

	python_convert_shebangs "" ${PN}
}

src_install() {
	distutils_src_install

	dobin ${PN} || die
}