66 lines
2.5 KiB
Ruby
66 lines
2.5 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.1.1.tar.gz"
|
|
sha256 "8fbcffc853b298a8497ab0f66b254c0c9ae4cbd31ab9889912a44a8c5c7cef0e"
|
|
revision 2
|
|
head "https://git.server-speed.net/users/flo/fb", using: :git
|
|
|
|
livecheck do
|
|
url :homepage
|
|
regex(%r{Latest release:.*?href=.*?/fb[._-]v?(\d+(?:\.\d+)+)\.t}i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_big_sur: "202db4557ba4a133b92ae0d2ced7c1c63e04190bb3a3dac7b8219daa798f8f16"
|
|
sha256 cellar: :any, big_sur: "76cab48a5e41ea108da84e1228ddea7c23ee92727206d0e0ef00aa11e65167ae"
|
|
sha256 cellar: :any, catalina: "0f2e6cd24defedab9ce9b5a843b75a7082592808035f00082008c47f5ba26024"
|
|
sha256 cellar: :any, mojave: "9a7adf6509265cf7c9ae67d68b108685d49e35f44ab00bdfe1c77be073942596"
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "curl"
|
|
depends_on "python@3.9"
|
|
|
|
conflicts_with "findbugs", because: "findbugs and fb-client both install a `fb` binary"
|
|
|
|
resource "pycurl" do
|
|
url "https://files.pythonhosted.org/packages/50/1a/35b1d8b8e4e23a234f1b17a8a40299fd550940b16866c9a1f2d47a04b969/pycurl-7.43.0.6.tar.gz"
|
|
sha256 "8301518689daefa53726b59ded6b48f33751c383cf987b0ccfbbc4ed40281325"
|
|
end
|
|
|
|
resource "pyxdg" do
|
|
url "https://files.pythonhosted.org/packages/47/6e/311d5f22e2b76381719b5d0c6e9dc39cd33999adae67db71d7279a6d70f4/pyxdg-0.26.tar.gz"
|
|
sha256 "fe2928d3f532ed32b39c32a482b54136fe766d19936afc96c8f00645f9da1a06"
|
|
end
|
|
|
|
def install
|
|
# avoid pycurl error about compile-time and link-time curl version mismatch
|
|
ENV.delete "SDKROOT"
|
|
|
|
xy = Language::Python.major_minor_version Formula["python@3.9"].opt_bin/"python3"
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages"
|
|
|
|
# avoid error about libcurl link-time and compile-time ssl backend mismatch
|
|
resource("pycurl").stage do
|
|
system Formula["python@3.9"].opt_bin/"python3",
|
|
*Language::Python.setup_install_args(libexec/"vendor"),
|
|
"--curl-config=#{Formula["curl"].opt_bin}/curl-config"
|
|
end
|
|
|
|
resource("pyxdg").stage do
|
|
system Formula["python@3.9"].opt_bin/"python3",
|
|
*Language::Python.setup_install_args(libexec/"vendor")
|
|
end
|
|
|
|
inreplace "fb", "#!/usr/bin/env python", "#!#{Formula["python@3.9"].opt_bin}/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
|