60 lines
2.3 KiB
Ruby
60 lines
2.3 KiB
Ruby
class Bup < Formula
|
|
desc "Backup tool"
|
|
homepage "https://github.com/bup/bup"
|
|
url "https://github.com/bup/bup/archive/0.30.tar.gz"
|
|
sha256 "5238f045c220278a165fff528ea32288f2752db2e1ac15704e849b71cddda0b2"
|
|
revision 1
|
|
head "https://github.com/bup/bup.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "adbfc42873e138509a8aea5f79dd9a983d6436965f72768778e257885b45efd0" => :catalina
|
|
sha256 "cdf1d01a823625ebbf364e5c40570dfa710a457824a17a6cf661fa85331f2e63" => :mojave
|
|
sha256 "38422b58cf36f8769783612149f2aef56ca11cc80fb368086b07fecc9959b6a7" => :high_sierra
|
|
end
|
|
|
|
depends_on "pandoc" => :build
|
|
uses_from_macos "python@2"
|
|
|
|
resource "certifi" do
|
|
url "https://files.pythonhosted.org/packages/41/bf/9d214a5af07debc6acf7f3f257265618f1db242a3f8e49a9b516f24523a6/certifi-2019.11.28.tar.gz"
|
|
sha256 "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f"
|
|
end
|
|
|
|
resource "singledispatch" do
|
|
url "https://files.pythonhosted.org/packages/d9/e9/513ad8dc17210db12cb14f2d4d190d618fb87dd38814203ea71c87ba5b68/singledispatch-3.4.0.3.tar.gz"
|
|
sha256 "5b06af87df13818d14f08a028e42f566640aef80805c3b50c5056b086e3c2b9c"
|
|
end
|
|
|
|
resource "six" do
|
|
url "https://files.pythonhosted.org/packages/94/3e/edcf6fef41d89187df7e38e868b2dd2182677922b600e880baad7749c865/six-1.13.0.tar.gz"
|
|
sha256 "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66"
|
|
end
|
|
|
|
resource "tornado" do
|
|
url "https://files.pythonhosted.org/packages/30/78/2d2823598496127b21423baffaa186b668f73cd91887fcef78b6eade136b/tornado-6.0.3.tar.gz"
|
|
sha256 "c845db36ba616912074c5b1ee897f8e0124df269468f25e4fe21fe72f6edd7a9"
|
|
end
|
|
|
|
def install
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
|
resources.each do |r|
|
|
r.stage do
|
|
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
|
end
|
|
end
|
|
|
|
# set AC_CPP_PROG due to Mojave issue, see https://github.com/Homebrew/brew/issues/5153
|
|
system "make", "AC_CPP_PROG=xcrun cpp"
|
|
system "make", "install", "DESTDIR=#{prefix}", "PREFIX="
|
|
|
|
mv bin/"bup", libexec/"bup.py"
|
|
(bin/"bup").write_env_script libexec/"bup.py", :PYTHONPATH => ENV["PYTHONPATH"]
|
|
end
|
|
|
|
test do
|
|
system bin/"bup", "init"
|
|
assert_predicate testpath/".bup", :exist?
|
|
end
|
|
end
|