Skip to content

Instantly share code, notes, and snippets.

@omarqureshi
Forked from futuremill-ltd/gist:2318876
Last active December 18, 2015 02:59
Show Gist options
  • Save omarqureshi/5715333 to your computer and use it in GitHub Desktop.
Save omarqureshi/5715333 to your computer and use it in GitHub Desktop.
# From a fresh install of wheezy
apt-get install ruby1.8 rubygems # Need ruby to use fpm
gem1.8 install fpm --no-ri --no-rdoc
apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev emacs curl autoconf
wget http://www.mirrorservice.org/sites/ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz
tar -zxvf ruby-1.9.3-p392.tar.gz
cd ruby-1.9.3-p392
curl https://raw.github.com/edisonnation/deb-ruby1.9.1/master/debian/patches/090803_exclude_rdoc.diff | patch
# curl https://raw.github.com/edisonnation/deb-ruby1.9.1/master/debian/patches/100518_r27464_threading_non-nptl.diff | patch
curl https://raw.github.com/edisonnation/deb-ruby1.9.1/master/debian/patches/100731_disable-tests.diff | patch -p1
curl https://raw.github.com/edisonnation/deb-ruby1.9.1/master/debian/patches/110720_tcltk_disable_rpath.diff | patch -p1
curl https://raw.github.com/edisonnation/deb-ruby1.9.1/master/debian/patches/110825-run-tests-verbose.patch | patch -p1
curl https://raw.github.com/edisonnation/deb-ruby1.9.1/master/debian/patches/110825-tests_broken_as_root.patch | patch -p1
curl https://raw.github.com/edisonnation/deb-ruby1.9.1/master/debian/patches/110829-freebsd_assert_normal_exit.patch | patch -p1
curl https://raw.github.com/edisonnation/deb-ruby1.9.1/master/debian/patches/110829-hurd_dirent_usage.patch | patch -p1
curl https://raw.github.com/edisonnation/deb-ruby1.9.1/master/debian/patches/130212_funny_falcon_performance_with_gc_backport.patch | patch -p1
curl https://raw.github.com/edisonnation/deb-ruby1.9.1/master/debian/patches/20100829-rubygems_default_dir.diff | patch -p1
curl https://raw.github.com/edisonnation/deb-ruby1.9.1/master/debian/patches/20100829-rubygems_disable_update_system.diff | patch -p1
curl https://raw.github.com/edisonnation/deb-ruby1.9.1/master/debian/patches/903_skip_base_ruby_check.diff | patch
# curl https://raw.github.com/edisonnation/deb-ruby1.9.1/master/debian/patches/909_update_lib_README.diff | patch
# curl https://raw.github.com/edisonnation/deb-ruby1.9.1/master/debian/patches/919_common.mk_tweaks.diff | patch
# curl https://raw.github.com/edisonnation/deb-ruby1.9.1/master/debian/patches/940_test_thread_mutex_sync_shorter.diff | patch
curl https://raw.github.com/edisonnation/deb-ruby1.9.1/master/debian/patches/hurd-path-max.diff | patch
rm -rf /tmp/ruby193
time (./configure --prefix=/usr && make && make install DESTDIR=/tmp/ruby193)
fpm -s dir -t deb -n ruby193 -v 1.9.3-p392 --description "Self-packaged Ruby 1.9.3 patch 392" -C /tmp/ruby193 \
-p ruby193-VERSION_ARCH.deb -d "libstdc++6 (>= 4.4.3)" \
-d "libc6 (>= 2.6)" -d "libffi5 (>= 3.0.4)" -d "libgdbm3 (>= 1.8.3)" \
-d "libncurses5 (>= 5.7)" -d "libreadline6 (>= 6.1)" \
-d "libssl-dev (>= 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
apt-get remove ruby rubygems
apt-get install libffi5 libyaml-0-2
dpkg -i ruby193-p392.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