/
rvm-0.1.25.ebuild
62 lines (50 loc) · 1.82 KB
/
rvm-0.1.25.ebuild
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
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=2
inherit eutils
DESCRIPTION="RVM facilitates easy installation and management of multiple Ruby environments and sets of gems"
HOMEPAGE="http://rvm.beginrescueend.com/"
# This should be the first 7 characters of the tagged version's commit.
VERSION_SHORT_SHA1="484ea8e4f5b412f8cff0b053c12df16577ff53ae"
SRC_URI="http://github.com/wayneeseguin/rvm/tarball/${PV} -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~x86"
IUSE="mono java"
RDEPEND="net-misc/curl
sys-devel/patch
java? (
dev-java/sun-jdk
dev-java/sun-jre-bin
)
mono? ( dev-lang/mono )"
S="${WORKDIR}/wayneeseguin-rvm-${VERSION_SHORT_SHA1}"
RVM_DIR="/opt/rvm"
src_install() {
for v in `env | egrep '^rvm_' | cut -d '=' -f 1`; do
unset $v
done
export rvm_prefix="${D}"
export rvm_path="${D}${RVM_DIR}"
export rvm_symlink_path="${D}/usr/bin"
./install || die "Installation failed."
echo "rvm_path=${RVM_DIR}" > "${T}"/rvmrc
insinto /etc
doins "${T}"/rvmrc || die "Failed to install /etc/rvmrc."
elog "A default /etc/rvmrc has been installed. Feel free to modify it."
elog
echo 'unset RUBY_VERSION' > "${T}"/system
echo 'unset GEM_HOME' >> "${T}"/system
echo 'unset GEM_PATH' >> "${T}"/system
echo 'unset MY_RUBY_HOME' >> "${T}"/system
insinto ${RVM_DIR}/config
doins "${T}"/system || die "Failed to install ${RVM_DIR}/config/system."
elog "You may also wish to review ${RVM_DIR}/config/system ."
elog
elog "Before any user (including root) can use rvm, the following line must be appended"
elog "to the end of the user's shell's loading files (.bashrc and then .bash_profile"
elog "for bash; or .zshrc for zsh), after all path/variable settings:"
elog
elog " if [[ -s $RVM_DIR/scripts/rvm ]] ; then source $RVM_DIR/scripts/rvm ; fi"
}