-
-
Save blisabda/ed680ec9d8c5ce244e4e0e1641876e88 to your computer and use it in GitHub Desktop.
building ruby with a specific openssl
This file contains hidden or 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
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment