Skip to content

Instantly share code, notes, and snippets.

@silas
Created February 28, 2014 08:19
Show Gist options
  • Select an option

  • Save silas/9267293 to your computer and use it in GitHub Desktop.

Select an option

Save silas/9267293 to your computer and use it in GitHub Desktop.
require 'formula'
class RockRuntimeNode010 < Formula
homepage 'http://nodejs.org/'
url 'http://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz'
sha1 '2340ec2dce1794f1ca1c685b56840dd515a271b2'
keg_only 'rock'
def install
system './configure', "--prefix=#{prefix}"
system 'make', 'install'
(prefix + 'rock.yml').write <<-EOS.undent
env:
PATH: "#{bin}:${PATH}"
EOS
runtime = var + 'rock/opt/rock/runtime'
runtime.mkpath
runtime += 'node010'
system 'rm', '-fr', runtime if runtime.exist?
File.symlink(prefix, runtime)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment