71 lines
2.9 KiB
Ruby
71 lines
2.9 KiB
Ruby
class Litani < Formula
|
|
include Language::Python::Virtualenv
|
|
|
|
desc "Metabuild system"
|
|
homepage "https://awslabs.github.io/aws-build-accumulator/"
|
|
url "https://github.com/awslabs/aws-build-accumulator.git",
|
|
tag: "1.25.0",
|
|
revision: "ee931df881f3a7a935691c910d60864513d3f0fb"
|
|
license "Apache-2.0"
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, arm64_monterey: "5ab7507e57638a76cc6f695d01aa03285bb798cb36bd38c027c42c48a7aeb8c3"
|
|
sha256 cellar: :any_skip_relocation, arm64_big_sur: "f16977b4e6d4e746be531e37fcc52750c4cff8c0b931bf203103cc69150f6eed"
|
|
sha256 cellar: :any_skip_relocation, monterey: "9f68d37afd5b82bcca531b785d14dc3d27261c09d3a39eca787f4eb509232ea6"
|
|
sha256 cellar: :any_skip_relocation, big_sur: "ef8a96d7e923812072d598e7ec314a30a68bd926de7e12ca64a8b3d78bd12400"
|
|
sha256 cellar: :any_skip_relocation, catalina: "6e7f6c4385b7fe0ce6f3afd1fb1b33267602a2d63cd6bca5b95d519dea1f4364"
|
|
sha256 cellar: :any_skip_relocation, x86_64_linux: "11b10ce7d97b0a5d9d682e389d834460bae6c292f2b12f014b46e32336aec211"
|
|
end
|
|
|
|
depends_on "coreutils" => :build
|
|
depends_on "mandoc" => :build
|
|
depends_on "scdoc" => :build
|
|
depends_on "gnuplot"
|
|
depends_on "graphviz"
|
|
depends_on "ninja"
|
|
depends_on "python@3.9"
|
|
|
|
resource "Jinja2" do
|
|
url "https://files.pythonhosted.org/packages/7a/ff/75c28576a1d900e87eb6335b063fab47a8ef3c8b4d88524c4bf78f670cce/Jinja2-3.1.2.tar.gz"
|
|
sha256 "31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"
|
|
end
|
|
|
|
resource "MarkupSafe" do
|
|
url "https://files.pythonhosted.org/packages/1d/97/2288fe498044284f39ab8950703e88abbac2abbdf65524d576157af70556/MarkupSafe-2.1.1.tar.gz"
|
|
sha256 "7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"
|
|
end
|
|
|
|
resource "PyYAML" do
|
|
url "https://files.pythonhosted.org/packages/a0/a4/d63f2d7597e1a4b55aa3b4d6c5b029991d3b824b5bd331af8d4ab1ed687d/PyYAML-5.4.1.tar.gz"
|
|
sha256 "607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"
|
|
end
|
|
|
|
def install
|
|
ENV.prepend_path "PATH", libexec/"vendor/bin"
|
|
venv = virtualenv_create(libexec/"vendor", "python3")
|
|
venv.pip_install resources
|
|
|
|
libexec.install Dir["*"] - ["test", "examples"]
|
|
(bin/"litani").write_env_script libexec/"litani", PATH: "\"#{libexec}/vendor/bin:${PATH}\""
|
|
|
|
cd libexec/"doc" do
|
|
system libexec/"vendor/bin/python3", "configure"
|
|
system "ninja", "--verbose"
|
|
end
|
|
man1.install libexec.glob("doc/out/man/*.1")
|
|
man5.install libexec.glob("doc/out/man/*.5")
|
|
man7.install libexec.glob("doc/out/man/*.7")
|
|
doc.install libexec/"doc/out/html/index.html"
|
|
rm_rf libexec/"doc"
|
|
end
|
|
|
|
test do
|
|
system bin/"litani", "init", "--project-name", "test-installation"
|
|
system bin/"litani", "add-job",
|
|
"--command", "/usr/bin/true",
|
|
"--pipeline-name", "test-installation",
|
|
"--ci-stage", "test"
|
|
system bin/"litani", "run-build"
|
|
end
|
|
end
|