Created
February 23, 2013 03:21
-
-
Save lparry/5018221 to your computer and use it in GitHub Desktop.
ruby-build definition for Github's 1.9.3 fork
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build_package_autoconf_then_standard() { | |
local package_name="$1" | |
if [ "${MAKEOPTS+defined}" ]; then | |
MAKE_OPTS="$MAKEOPTS" | |
elif [ -z "${MAKE_OPTS+defined}" ]; then | |
MAKE_OPTS="-j 2" | |
fi | |
# Support YAML_CONFIGURE_OPTS, RUBY_CONFIGURE_OPTS, etc. | |
local package_var_name="$(capitalize "${package_name%%-*}")" | |
local PACKAGE_CONFIGURE="${package_var_name}_CONFIGURE" | |
local PACKAGE_PREFIX_PATH="${package_var_name}_PREFIX_PATH" | |
local PACKAGE_CONFIGURE_OPTS="${package_var_name}_CONFIGURE_OPTS" | |
local PACKAGE_CONFIGURE_OPTS_ARRAY="${package_var_name}_CONFIGURE_OPTS_ARRAY[@]" | |
local PACKAGE_MAKE_OPTS="${package_var_name}_MAKE_OPTS" | |
local PACKAGE_MAKE_OPTS_ARRAY="${package_var_name}_MAKE_OPTS_ARRAY[@]" | |
{ | |
autoconf | |
${!PACKAGE_CONFIGURE:-./configure} --prefix="${!PACKAGE_PREFIX_PATH:-$PREFIX_PATH}" $CONFIGURE_OPTS ${!PACKAGE_CONFIGURE_OPTS} "${!PACKAGE_CONFIGURE_OPTS_ARRAY}" | |
"$MAKE" $MAKE_OPTS ${!PACKAGE_MAKE_OPTS} "${!PACKAGE_MAKE_OPTS_ARRAY}" | |
"$MAKE" install | |
} >&4 2>&1 | |
} | |
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" | |
install_git "ruby-1.9.3-p385-github" "https://github.com/github/ruby-thecodeshop.git" "github-p385" autoconf_then_standard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment