forked from ungleich-public/cdist
properly handle rvm and ruby dependencies
This commit is contained in:
parent
eb83190efd
commit
8cc0d6f0e7
2 changed files with 76 additions and 1 deletions
25
conf/type/__rvm/manifest
Executable file
25
conf/type/__rvm/manifest
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# 2012 Evax Software <contact@evax.fr>
|
||||||
|
#
|
||||||
|
# This file is part of cdist.
|
||||||
|
#
|
||||||
|
# cdist is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# cdist is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
# rvm core dependencies
|
||||||
|
__package bash --state installed
|
||||||
|
__package curl --state installed
|
||||||
|
__package git-core --state installed
|
||||||
|
__package patch --state installed
|
|
@ -29,5 +29,55 @@ ruby="$__object_id"
|
||||||
user="$(cat "$__object/parameter/user")"
|
user="$(cat "$__object/parameter/user")"
|
||||||
state="$(cat "$__object/explorer/state")"
|
state="$(cat "$__object/explorer/state")"
|
||||||
|
|
||||||
__rvm "$user" --state installed
|
apt_ruby="build-essential openssl libreadline6 libreadline6-dev curl git-core
|
||||||
|
zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3
|
||||||
|
libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison
|
||||||
|
subversion"
|
||||||
|
apt_jruby="curl g++ openjdk-6-jre-headless"
|
||||||
|
apt_jruby_head="ant openjdk-6-jdk"
|
||||||
|
apt_ironruby="curl mono-2.0-devel"
|
||||||
|
|
||||||
|
emerge_ruby="libiconv readline zlib openssl curl git libyaml sqlite libxslt
|
||||||
|
libtool gcc autoconf automake bison m4"
|
||||||
|
emerge_jruby="dev-java/sun-jdk dev-java/sun-jre-bin"
|
||||||
|
emerge_ironruby="dev-lang/mono"
|
||||||
|
|
||||||
|
pacman_ruby="gcc patch curl zlib readline libxml2 libxslt git autoconf
|
||||||
|
diffutils make libtool bison subversion"
|
||||||
|
pacman_jruby="jdk jre curl"
|
||||||
|
pacman_ironruby="mono"
|
||||||
|
|
||||||
|
yum_ruby="gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel
|
||||||
|
libffi-devel openssl-devel make bzip2 autoconf automake libtool bison
|
||||||
|
iconv-devel"
|
||||||
|
yum_jruby="java"
|
||||||
|
|
||||||
|
os="$(cat "$__global/explorer/os")"
|
||||||
|
case "$os" in
|
||||||
|
archlinux) type="pacman" ;;
|
||||||
|
debian|ubuntu) type="apt" ;;
|
||||||
|
gentoo) type="emerge" ;;
|
||||||
|
fedora|redhat|centos) type="yum" ;;
|
||||||
|
*);;
|
||||||
|
esac
|
||||||
|
case "$ruby" in
|
||||||
|
ruby-head*)
|
||||||
|
deps_list="${type}_ruby_head"
|
||||||
|
;;
|
||||||
|
ruby*)
|
||||||
|
deps_list="${type}_ruby"
|
||||||
|
;;
|
||||||
|
jruby-head*)
|
||||||
|
deps_list="${type}_jruby_head"
|
||||||
|
;;
|
||||||
|
jruby*)
|
||||||
|
deps_list="${type}_jruby"
|
||||||
|
;;
|
||||||
|
ironruby*)
|
||||||
|
deps_list="${type}_ironruby"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
deps=$(eval echo \$$deps_list)
|
||||||
|
for p in $deps; do __package_${type} $p --state installed; done
|
||||||
|
|
||||||
|
__rvm "$user" --state installed
|
||||||
|
|
Loading…
Reference in a new issue