Skip to content

Instantly share code, notes, and snippets.

@lloydmeta
Forked from futuremill-ltd/gist:2318876
Last active January 2, 2016 11:09
Show Gist options
  • Save lloydmeta/8294943 to your computer and use it in GitHub Desktop.
Save lloydmeta/8294943 to your computer and use it in GitHub Desktop.
Building a Debian package for installing Ruby 1.9.3 -p484 for Ubuntu 11.10. Adapted from the one for Debian Squeeze
# From a fresh install of Debian
sudo apt-get install ruby rubygems # Need ruby to use fpm
sudo gem1.8 install fpm --no-ri --no-rdoc
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p484.tar.gz
tar -zxvf ruby-1.9.3-p484.tar.gz
cd ruby-1.9.3-p484
rm -rf /tmp/ruby193
time (./configure --prefix=/usr && make && make install DESTDIR=/tmp/ruby193)
/usr/local/bin/fpm -s dir -t deb -n ruby193 -v 1.9.3-p484 --description "Self-packaged Ruby 1.9.3 patch 484" -C /tmp/ruby193 \
-p ruby193-VERSION_ARCH.deb -d "libstdc++6 (>= 4.4.3)" \
-d "libc6 (>= 2.6)" -d "libffi6 (>= 3.0.4)" -d "libgdbm3 (>= 1.8.3)" \
-d "libncurses5 (>= 5.7)" -d "libreadline6 (>= 6.1)" \
-d "libssl0.9.8 (>= 0.9.8)" -d "zlib1g (>= 1:1.2.2)" \
-d "libyaml-0-2 (>= 0.1.3)" \
usr/bin usr/lib usr/share/man usr/include
# Post installation test
sudo apt-get remove ruby
sudo apt-get install libffi6 libyaml-0-2 libssl0.9.8
sudo dpkg -i ruby193-1.9.3-p484_amd64.deb
ruby -ropenssl -rzlib -rreadline -ryaml -e "puts :success"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment