54 lines
1.6 KiB
Ruby
54 lines
1.6 KiB
Ruby
class CvsFastExport < Formula
|
|
desc "Export an RCS or CVS history as a fast-import stream"
|
|
homepage "http://www.catb.org/~esr/cvs-fast-export/"
|
|
url "http://www.catb.org/~esr/cvs-fast-export/cvs-fast-export-1.55.tar.gz"
|
|
sha256 "af58e16667c6e02e8431ff666effe306d3b30086fab483170257890da1afc21b"
|
|
license "GPL-2.0-or-later"
|
|
|
|
livecheck do
|
|
url :homepage
|
|
regex(/href=.*?cvs-fast-export[._-]v?(\d+(?:\.\d+)+)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
rebuild 1
|
|
sha256 cellar: :any_skip_relocation, big_sur: "7ee763f03cb997d6717bad92d53983324e4bb89be855aedb37af0ef38cec8180"
|
|
sha256 cellar: :any_skip_relocation, catalina: "e6faed55a91a59f97af42d5bb102d3438aab4509e5c7fd4e5d28f238012de2f5"
|
|
sha256 cellar: :any_skip_relocation, mojave: "b2b8f37662e652697231b8efb9fe6cb4927513f849d4853b54fbe90220d55d77"
|
|
end
|
|
|
|
head do
|
|
url "https://gitlab.com/esr/cvs-fast-export.git"
|
|
depends_on "bison" => :build
|
|
end
|
|
|
|
depends_on "asciidoc" => :build
|
|
depends_on "docbook-xsl" => :build
|
|
depends_on "cvs" => :test
|
|
|
|
uses_from_macos "libxml2"
|
|
uses_from_macos "libxslt"
|
|
|
|
def install
|
|
ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog"
|
|
|
|
system "make", "install", "prefix=#{prefix}"
|
|
end
|
|
|
|
test do
|
|
cvsroot = testpath/"cvsroot"
|
|
cvsroot.mkpath
|
|
system "cvs", "-d", cvsroot, "init"
|
|
|
|
test_content = "John Barleycorn"
|
|
|
|
mkdir "cvsexample" do
|
|
(testpath/"cvsexample/testfile").write(test_content)
|
|
ENV["CVSROOT"] = cvsroot
|
|
system "cvs", "import", "-m", "example import", "cvsexample", "homebrew", "start"
|
|
end
|
|
|
|
assert_match test_content, shell_output("find #{testpath}/cvsroot | #{bin}/cvs-fast-export")
|
|
end
|
|
end
|