63 lines
2.5 KiB
Ruby
63 lines
2.5 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"
|
|
head "https://github.com/bup/bup.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "03113e1218de2523b0234d8ac10a18151f684c46c689e027e253e9db43e1cf4a" => :catalina
|
|
sha256 "2de7026bdda615a5cf7715d0ded2c40cddb19336ec354bc03bfc87a88c604afc" => :mojave
|
|
sha256 "87858ab9d63413366fd0fcda74bd74e0d206206157b87202783c75bb2fc7476e" => :high_sierra
|
|
end
|
|
|
|
depends_on "pandoc" => :build
|
|
depends_on "python@2" # does not support Python 3
|
|
|
|
resource "backports_abc" do
|
|
url "https://files.pythonhosted.org/packages/68/3c/1317a9113c377d1e33711ca8de1e80afbaf4a3c950dd0edfaf61f9bfe6d8/backports_abc-0.5.tar.gz"
|
|
sha256 "033be54514a03e255df75c5aee8f9e672f663f93abb723444caec8fe43437bde"
|
|
end
|
|
|
|
resource "certifi" do
|
|
url "https://files.pythonhosted.org/packages/41/b6/4f0cefba47656583217acd6cd797bc2db1fede0d53090fdc28ad2c8e0716/certifi-2018.10.15.tar.gz"
|
|
sha256 "6d58c986d22b038c8c0df30d639f23a3e6d172a05c3583e766f4c0b785c0986a"
|
|
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/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz"
|
|
sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9"
|
|
end
|
|
|
|
resource "tornado" do
|
|
url "https://files.pythonhosted.org/packages/e6/78/6e7b5af12c12bdf38ca9bfe863fcaf53dc10430a312d0324e76c1e5ca426/tornado-5.1.1.tar.gz"
|
|
sha256 "4e5158d97583502a7e2739951553cbd88a72076f152b4b11b64b9a10c4c49409"
|
|
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
|