Skip to content

Commit

Permalink
apache-forrest 0.9 (new formula)
Browse files Browse the repository at this point in the history
Closes Homebrew/legacy-homebrew#24520.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
  • Loading branch information
rstata-verticloud authored and MikeMcQuaid committed Nov 28, 2013
1 parent 301ce82 commit af4fe33
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions Formula/apache-forrest.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
require 'formula'

class ApacheForrest < Formula
homepage 'http://forrest.apache.org/'
url 'http://www.apache.org/dyn/closer.cgi?path=forrest/apache-forrest-0.9-sources.tar.gz'
sha1 '8c7b49a7dff4b3f60a52c7696684168b6d454a47'

resource 'deps' do
url 'http://www.apache.org/dyn/closer.cgi?path=forrest/apache-forrest-0.9-dependencies.tar.gz'
sha1 '10a4442d46baeadd3ba3377ed29ed694c86ece25'
end

# Prevent deletion of intentionally-empty subdirs inside of
# template directories:
skip_clean ["libexec/main/template-sites", "libexec/main/fresh-site",
"libexec/plugins/pluginTemplate"]

def install
libexec.install Dir['*']
bin.install_symlink "#{libexec}/bin/forrest"

# To avoid conflicts with directory names already installed from the
# main tarball, surgically install contents of dependency tarball
deps_to_install = [
"lib",
"main/webapp/resources/schema/relaxng",
"main/webapp/resources/stylesheets",
"plugins/org.apache.forrest.plugin.output.pdf/",
"tools/ant",
"tools/forrestbot/lib",
"tools/forrestbot/webapp/lib",
"tools/jetty"
]
resource('deps').stage do
deps_to_install.each { |p| (libexec + p).install Dir[p+"/*"] }
end
end

test do
system "#{bin}/forrest", "-projecthelp"
end
end

0 comments on commit af4fe33

Please sign in to comment.