| 1 |
# Copyright 1999-2013 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/app-shells/autojump/autojump-21.1.2.ebuild,v 1.1 2013/01/09 08:45:42 xmw Exp $ |
| 4 |
|
| 5 |
EAPI=4 |
| 6 |
|
| 7 |
PYTHON_DEPEND="python? *" |
| 8 |
SUPPORT_PYTHON_ABIS="1" |
| 9 |
|
| 10 |
inherit python vcs-snapshot |
| 11 |
|
| 12 |
DESCRIPTION="change directory command that learns" |
| 13 |
HOMEPAGE="http://github.com/joelthelion/autojump" |
| 14 |
SRC_URI="https://github.com/joelthelion/${PN}/archive/release-v${PV}.tar.gz -> ${P}.tar.gz" |
| 15 |
|
| 16 |
LICENSE="GPL-3" |
| 17 |
SLOT="0" |
| 18 |
KEYWORDS="~amd64 ~x86" |
| 19 |
IUSE="bash-completion gtk python test zsh-completion" |
| 20 |
|
| 21 |
RDEPEND="gtk? ( dev-python/pygtk:2 ) |
| 22 |
bash-completion? ( >=app-shells/bash-4 ) |
| 23 |
zsh-completion? ( app-shells/zsh app-shells/zsh-completion )" |
| 24 |
DEPEND="test? ( dev-lang/python )" |
| 25 |
|
| 26 |
src_prepare() { |
| 27 |
#https://github.com/joelthelion/autojump/issues/129 |
| 28 |
sed -e '/def test_db_load_migrate/,/autojump.CONFIG_DIR = ORIG_CONFIG_DIR/d' \ |
| 29 |
-i tests/runtests.py || die |
| 30 |
} |
| 31 |
|
| 32 |
src_compile() { |
| 33 |
true |
| 34 |
} |
| 35 |
|
| 36 |
src_install() { |
| 37 |
dobin bin/autojump |
| 38 |
|
| 39 |
if use gtk ; then |
| 40 |
dobin bin/jumpapplet |
| 41 |
insinto /usr/share/${PN} |
| 42 |
doins bin/icon.png |
| 43 |
fi |
| 44 |
|
| 45 |
insinto /etc/profile.d |
| 46 |
doins bin/${PN}.sh |
| 47 |
|
| 48 |
if use bash-completion ; then |
| 49 |
doins bin/${PN}.bash |
| 50 |
fi |
| 51 |
|
| 52 |
if use zsh-completion ; then |
| 53 |
doins bin/${PN}.zsh |
| 54 |
insinto /usr/share/zsh/site-functions |
| 55 |
doins bin/_j |
| 56 |
fi |
| 57 |
|
| 58 |
if use python ; then |
| 59 |
install_python() { |
| 60 |
insinto "$(python_get_sitedir)" |
| 61 |
doins tools/autojump_ipython.py |
| 62 |
} |
| 63 |
python_execute_function -q install_python |
| 64 |
|
| 65 |
einfo "This tool provides \"j\" for ipython, please add" |
| 66 |
einfo "\"imporrt autojump_ipython\" to your ipy_user_conf.py." |
| 67 |
fi |
| 68 |
|
| 69 |
doman docs/${PN}.1 |
| 70 |
dodoc README.md |
| 71 |
} |