homebrew-core/Formula/multimarkdown.rb

43 lines
1.4 KiB
Ruby

class Multimarkdown < Formula
desc "Turn marked-up plain text into well-formatted documents"
homepage "http://fletcherpenney.net/multimarkdown/"
# Use git tag instead of the tarball to get submodules
url "https://github.com/fletcher/MultiMarkdown-5.git",
:tag => "v5.0",
:revision => "47e7c4a2fac0271ee52ae0c7062a726978219341"
head "https://github.com/fletcher/MultiMarkdown-5.git"
bottle do
cellar :any_skip_relocation
revision 1
sha256 "a68770c5e002c4d8d4ee1a0740cee09c9c78ee22ccbe9a2531d719d7549af2cc" => :el_capitan
sha256 "7729153a228a109bb0d8c1822bded14c513bedda6683d7e84556a4d6c7fd2092" => :yosemite
sha256 "c1cd1527d934780701e4cceb0649ee20c81bdfecd3e38409de2008840a6d07f0" => :mavericks
end
depends_on "cmake" => :build
conflicts_with "mtools", :because => "both install `mmd` binaries"
conflicts_with "markdown", :because => "both install `markdown` binaries"
conflicts_with "discount", :because => "both install `markdown` binaries"
def install
system "sh", "link_git_modules"
system "sh", "update_git_modules"
system "make"
cd "build" do
system "make"
bin.install "multimarkdown"
end
bin.install Dir["scripts/*"].reject { |f| f =~ /\.bat$/ }
end
test do
assert_equal "<p>foo <em>bar</em></p>\n", pipe_output(bin/"multimarkdown", "foo *bar*\n")
assert_equal "<p>foo <em>bar</em></p>\n", pipe_output(bin/"mmd", "foo *bar*\n")
end
end