Created
March 11, 2011 05:19
-
-
Save fuJiin/865483 to your computer and use it in GitHub Desktop.
cake brew formula
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'formula' | |
| class CakeExecutable < Formula | |
| url "http://releases.clojure-cake.org/cake" | |
| md5 "d5533fc60a264d5db47f9801882a45c1" | |
| version "0.6.2" | |
| end | |
| class Cake <Formula | |
| url "http://releases.clojure-cake.org/jars/cake-0.6.2.jar" | |
| head "git://github.com/ninjudd/cake.git", :using => :git | |
| homepage "https://github.com/ninjudd/cake" | |
| md5 "2785a2614267e636b5ef889bda0a15e6" | |
| def install | |
| if ARGV.build_head? | |
| bin.install "bin/cake" # only need executable if head | |
| else | |
| lib.install "cake-0.6.2.jar" => "cake.jar" | |
| # extract jar to lib | |
| lib.cd do | |
| system "jar -xf cake.jar bake.jar" | |
| end | |
| # get executable | |
| CakeExecutable.new.brew do | |
| bin.install "cake" | |
| end | |
| end | |
| end | |
| def caveats | |
| if ARGV.build_head? | |
| <<-EOS.undent | |
| Using snapshot version. Standalone jar and dependencies will be installed to: | |
| $HOME/.m2/repository | |
| the first time cake is run. | |
| EOS | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment