#!/bin/sh t_dir="$HOME/tmp" mkdir -p ${t_dir} pushd ${t_dir} for url in \ ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.9.3-p194.tar.bz2 \ http://openssl.org/source/openssl-1.0.1c.tar.gz do if [ ! -f $(basename "${url}") ] ;then wget "${url}" fi done tar zxf openssl-1.0.1c.tar.gz tar jxf ruby-1.9.3-p194.tar.bz2 cd ${t_dir}/openssl-1.0.1c ./config \ no-shared \ --prefix=${t_dir}/static && \ make depend && \ make && \ make install cd ${t_dir}/ruby-1.9.3-p194 CFLAGS=" -I${t_dir}/static/include -L${t_dir}/static/include " \ LDFLAGS=" -L${t_dir}/static/include " \ ./configure \ --prefix=${t_dir}/static \ --disable-install-doc && \ make && \ make install ${t_dir}/static/bin/ruby -r openssl -e 'puts OpenSSL::OPENSSL_VERSION' popd