Commit 0c96aeae authored by John Johnson's avatar John Johnson

dev-ruby/chruby: prefix; global profile.d

Using `/usr` as the prefix, rather than `/usr/local` to comply with FHS/Gentoo policy
The config file is installed globally into `/etc/profile.d/`
parent 87386c0c
DIST chruby-0.3.9.tar.gz 20911 SHA256 7220a96e355b8a613929881c091ca85ec809153988d7d691299e0a16806b42fd SHA512 7d9565dc5285ba53d5c3a9e87a70079d16d7933353d31ea8eca9de21eb59f3bd5134f1883e72019e002bf2eaab5b562bdcd20a154663590fc97e8b8506956f3c WHIRLPOOL c39b683aa9c06add831d5d584ad4b64c48747133491c95f4bb93d531f2ea2c5a93d4bdf1c77efc0b9782a221f04b3876d833c3fef1b44c4e47d14527880b5781
DIST v0.3.9.tar.gz 20911 SHA256 7220a96e355b8a613929881c091ca85ec809153988d7d691299e0a16806b42fd SHA512 7d9565dc5285ba53d5c3a9e87a70079d16d7933353d31ea8eca9de21eb59f3bd5134f1883e72019e002bf2eaab5b562bdcd20a154663590fc97e8b8506956f3c WHIRLPOOL c39b683aa9c06add831d5d584ad4b64c48747133491c95f4bb93d531f2ea2c5a93d4bdf1c77efc0b9782a221f04b3876d833c3fef1b44c4e47d14527880b5781 DIST v0.3.9.tar.gz 20911 SHA256 7220a96e355b8a613929881c091ca85ec809153988d7d691299e0a16806b42fd SHA512 7d9565dc5285ba53d5c3a9e87a70079d16d7933353d31ea8eca9de21eb59f3bd5134f1883e72019e002bf2eaab5b562bdcd20a154663590fc97e8b8506956f3c WHIRLPOOL c39b683aa9c06add831d5d584ad4b64c48747133491c95f4bb93d531f2ea2c5a93d4bdf1c77efc0b9782a221f04b3876d833c3fef1b44c4e47d14527880b5781
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=7
MY_PV=$(ver_cut 1-3)
MY_P="${PN}-${MY_PV}"
DESCRIPTION="Small script for changing current Ruby version in shell."
HOMEPAGE="https://github.com/postmodern/chruby"
SRC_URI="https://github.com/postmodern/chruby/archive/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND="|| ( app-shells/bash app-shells/zsh )"
RDEPEND="${DEPEND}"
src_prepare() {
default
sed -i 's/DOC_DIR=/DOC_DIR?=/' Makefile
}
src_install() {
# The default, with changed prefix only
if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]] ; then
emake PREFIX="${D}/usr" DESTDIR="${D}" install
fi
insinto /etc/profile.d
newins "${FILESDIR}/${PN}env.sh" "${PN}"
}
pkg_postinst() {
elog " "
elog "chruby aims to be a project-specific Ruby version changer. "
elog "For changing system default Ruby version, please use "
elog "app-eselect/eselect-ruby."
elog " "
}
# Global shell setup for chruby
# Restrict to interactive shell only
# [[ $- == *i* ]] || return 0
if [ -n \"\$BASH_VERSION\" ] || [ -n \"\$ZSH_VERSION\" ]; then
source "/usr/share/chruby/chruby.sh"
source "/usr/share/chruby/auto.sh"
# else
# return 0
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment