Skip to content

Instantly share code, notes, and snippets.

@jlbfalcao
Created June 24, 2011 00:37
Show Gist options
  • Save jlbfalcao/1043984 to your computer and use it in GitHub Desktop.
Save jlbfalcao/1043984 to your computer and use it in GitHub Desktop.
Build jruby-1.6.2 RPM
wget http://jruby.org.s3.amazonaws.com/downloads/1.6.2/jruby-bin-1.6.2.tar.gz
tar -xvzf jruby-bin-1.6.2.tar.gz
cat > post-install.sh <<EOF
echo "PATH=/opt/jruby-1.6.2/bin:\\\${PATH}" > /etc/profile.d/jruby.sh
chmod +x /etc/profile.d/jruby.sh
EOF
cat > pre-uninstall.sh <<EOF
rm /etc/profile.d/jruby.sh
EOF
fpm -n jruby -v 1.6.2 -t rpm -s dir \
--post-install post-install.sh \
--pre-uninstall pre-uninstall.sh \
--description "jruby" \
--provides 'jruby,gem' \
--depends 'java-1.6.0-openjdk' \
--architecture noarch \
--prefix '/opt' jruby-1.6.2/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment