homebrew-core/Formula/fb-client.rb
2017-09-07 02:02:32 -07:00

53 lines
1.9 KiB
Ruby

class FbClient < Formula
desc "Shell-script client for https://paste.xinu.at"
homepage "https://paste.xinu.at"
url "https://paste.xinu.at/data/client/fb-2.0.3.tar.gz"
sha256 "dd318de67c1581e6dfa6b6c84e8c8e995b27d115fed86d81d5579aa9a2358114"
head "https://git.server-speed.net/users/flo/fb", :using => :git
bottle do
cellar :any_skip_relocation
sha256 "9e49650c2e2c1d5294ba22c821218c7b48ec97647f627fdd67e2ab45d2c7f499" => :sierra
sha256 "ed82a23cee56924581955e38a0e75e457eeeefb044e3213de7fd17c74f437978" => :el_capitan
sha256 "70fc5a9498e3d66788f57299c21586fa866587c0c1010ae04f67feecc2ee39d8" => :yosemite
end
depends_on "pkg-config" => :build
depends_on :python3
conflicts_with "findbugs", :because => "findbugs and fb-client both install a `fb` binary"
resource "pycurl" do
url "https://files.pythonhosted.org/packages/12/3f/557356b60d8e59a1cce62ffc07ecc03e4f8a202c86adae34d895826281fb/pycurl-7.43.0.tar.gz"
sha256 "aa975c19b79b6aa6c0518c0cc2ae33528900478f0b500531dbcdbf05beec584c"
end
resource "pyxdg" do
url "https://files.pythonhosted.org/packages/26/28/ee953bd2c030ae5a9e9a0ff68e5912bd90ee50ae766871151cd2572ca570/pyxdg-0.25.tar.gz"
sha256 "81e883e0b9517d624e8b0499eb267b82a815c0b7146d5269f364988ae031279d"
end
def install
# avoid pycurl error about compile-time and link-time curl version mismatch
ENV.delete "SDKROOT"
xy = Language::Python.major_minor_version "python3"
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages"
resources.each do |r|
r.stage do
system "python3", *Language::Python.setup_install_args(libexec/"vendor")
end
end
inreplace "fb", "#!/usr/bin/env python", "#!/usr/bin/env python3"
system "make", "PREFIX=#{prefix}", "install"
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
end
test do
system bin/"fb", "-h"
end
end