reposurgeon 3.21
Closes Homebrew/homebrew#39619. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
dbdf470190
commit
c22f505e81
1 changed files with 37 additions and 12 deletions
|
@ -1,18 +1,43 @@
|
|||
require 'formula'
|
||||
|
||||
class Reposurgeon < Formula
|
||||
homepage 'http://www.catb.org/esr/reposurgeon/'
|
||||
url 'http://www.catb.org/~esr/reposurgeon/reposurgeon-3.10.tar.gz'
|
||||
sha256 'cfb78271b31ab50a73775a4a1b211dc8b48af76ac092676a226c9e61f4a1fb44'
|
||||
homepage "http://www.catb.org/esr/reposurgeon/"
|
||||
url "http://www.catb.org/~esr/reposurgeon/reposurgeon-3.21.tar.gz"
|
||||
sha256 "637f1450b235f0a08d6f850e565a60b357607ce3a95dcbaea15425947fd002b9"
|
||||
|
||||
depends_on 'asciidoc'
|
||||
depends_on 'xmlto'
|
||||
head "git://thyrsus.com/repositories/reposurgeon.git"
|
||||
|
||||
depends_on "asciidoc" => :build
|
||||
depends_on "xmlto" => :build
|
||||
|
||||
def install
|
||||
ENV['XML_CATALOG_FILES'] = "#{etc}/xml/catalog"
|
||||
system "make"
|
||||
tools = %w{reposurgeon repopuller repodiffer}
|
||||
bin.install tools
|
||||
man1.install tools.map { |m| "#{m}.1" }
|
||||
# OSX doesn't provide 'python2', but on some Linux distributions
|
||||
# 'python' is an alias for python3 so this won't be changed
|
||||
# upstream
|
||||
%W[reposurgeon repodiffer].each do |file|
|
||||
inreplace file, "#!/usr/bin/env python2", "#!/usr/bin/env python"
|
||||
end
|
||||
|
||||
ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog"
|
||||
system "make", "install", "prefix=#{prefix}"
|
||||
(share/"emacs/site-lisp").install "reposurgeon-mode.el"
|
||||
end
|
||||
|
||||
def caveats; <<-EOS.undent
|
||||
An Emacs mode has been installed in #{HOMEBREW_PREFIX}/share/emacs/site-lisp
|
||||
Add it to your load-path to use reposurgeon-mode.el
|
||||
EOS
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/".gitconfig").write <<-EOS.undent
|
||||
[user]
|
||||
name = Real Person
|
||||
email = notacat@hotmail.cat
|
||||
EOS
|
||||
system "git", "init"
|
||||
touch "homebrew"
|
||||
system "git", "add", "homebrew"
|
||||
system "git", "commit", "--message", "brewing"
|
||||
|
||||
assert_match "brewing", shell_output("script -q /dev/null #{bin}/reposurgeon read list")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue