Assist more in the template from brew create
This commit is contained in:
parent
abe0be8a2e
commit
b6a5b3f3a3
@ -98,7 +98,8 @@ class FormulaCreator
|
|||||||
def template; <<-EOS.undent
|
def template; <<-EOS.undent
|
||||||
require 'formula'
|
require 'formula'
|
||||||
|
|
||||||
# REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
|
# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
|
||||||
|
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
|
||||||
|
|
||||||
class #{Formula.class_s name} < Formula
|
class #{Formula.class_s name} < Formula
|
||||||
homepage ''
|
homepage ''
|
||||||
@ -112,6 +113,9 @@ class FormulaCreator
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
def install
|
def install
|
||||||
|
# ENV.x11 # if your formula requires any X11 headers
|
||||||
|
# ENV.j1 # if your formula's build system can't parallelize
|
||||||
|
|
||||||
<% if mode == :cmake %>
|
<% if mode == :cmake %>
|
||||||
system "cmake . \#{std_cmake_parameters}"
|
system "cmake . \#{std_cmake_parameters}"
|
||||||
<% elsif mode == :autotools %>
|
<% elsif mode == :autotools %>
|
||||||
@ -122,15 +126,13 @@ class FormulaCreator
|
|||||||
"--prefix=\#{prefix}"
|
"--prefix=\#{prefix}"
|
||||||
# system "cmake . \#{std_cmake_parameters}"
|
# system "cmake . \#{std_cmake_parameters}"
|
||||||
<% end %>
|
<% end %>
|
||||||
# if this fails, try separate make/make install steps
|
system "make install" # if this fails, try separate make/make install steps
|
||||||
system "make install"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test
|
def test
|
||||||
# This test will fail and we won't accept that! It's enough to just
|
# This test will fail and we won't accept that! It's enough to just replace
|
||||||
# replace "false" with the main program this formula installs, but
|
# "false" with the main program this formula installs, but it'd be nice if you
|
||||||
# it'd be nice if you were more thorough. Test the test with
|
# were more thorough. Run the test with `brew test #{name}`.
|
||||||
# `brew test #{name}`.
|
|
||||||
system "false"
|
system "false"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user