diff options
Diffstat (limited to 'Library/Formula/clojure-contrib.rb')
| -rw-r--r-- | Library/Formula/clojure-contrib.rb | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/Library/Formula/clojure-contrib.rb b/Library/Formula/clojure-contrib.rb index c6a39a2ed..576e84f20 100644 --- a/Library/Formula/clojure-contrib.rb +++ b/Library/Formula/clojure-contrib.rb @@ -1,15 +1,24 @@ require 'formula' class ClojureContrib <Formula + url 'http://clojure-contrib.googlecode.com/files/clojure-contrib-1.1.0.zip' + md5 'ffaa8d5ea72abd9547186ec38f37c198' head 'git://github.com/richhickey/clojure-contrib.git' - homepage 'http://github.com/richhickey/clojure-contrib' + homepage 'http://richhickey.github.com/clojure-contrib/branch-1.1.x/index.html' depends_on 'clojure' - depends_on 'maven' + depends_on 'maven' if ARGV.include? '--HEAD' + + def jar + 'clojure-contrib.jar' + end def install - system "mvn package" - prefix.install Dir["target/clojure-contrib-*.jar"] + if ARGV.include? '--HEAD' + system "mvn package -Dclojure.jar=#{HOMEBREW_PREFIX}/Cellar/clojure/HEAD/clojure.jar" + system "mv target/clojure-contrib-*.jar #{jar}" + end + prefix.install jar end def caveats @@ -17,11 +26,11 @@ class ClojureContrib <Formula For Clojure to detect the contrib libs, the following path must be in your CLASSPATH ENV variable: - #{prefix} + #{prefix}/#{jar} To do this with bash, add the following to your ~/.profile file: - export CLASSPATH=$CLASSPATH:#{prefix} + export CLASSPATH=$CLASSPATH:#{prefix}/#{jar} END_CAVEATS end end |
