44 lines
1.6 KiB
Ruby
44 lines
1.6 KiB
Ruby
class Duck < Formula
|
|
desc "Command-line interface for Cyberduck (a multi-protocol file transfer tool)"
|
|
homepage "https://duck.sh/"
|
|
# check the changelog for the latest stable version: https://cyberduck.io/changelog/
|
|
url "https://dist.duck.sh/duck-src-7.6.2.33520.tar.gz"
|
|
sha256 "89312b9d2aea4c388b7aabf8d0f0f1e048442aa49c66d30b7554069337593a17"
|
|
license "GPL-3.0-only"
|
|
head "https://svn.cyberduck.io/trunk/"
|
|
|
|
livecheck do
|
|
url "https://cyberduck.io/changelog/"
|
|
regex(/href=.*?Cyberduck[._-]v?(\d+(?:\.\d+)+)\.zip/i)
|
|
end
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "49db8c11b1f4fe0ddf1236dcfb61f2d7875f67b946f967de818532dbfc6ca36b" => :catalina
|
|
sha256 "11210e14dc5df4327df3d5f066ae31f6f44da3872e82139fda1516bc966cce8b" => :mojave
|
|
sha256 "d86be08f6dcb03c093ff76740428b412041b19c3f797ac2753882533133e876a" => :high_sierra
|
|
end
|
|
|
|
depends_on "ant" => :build
|
|
depends_on "maven" => :build
|
|
depends_on xcode: :build
|
|
|
|
def install
|
|
xcconfig = buildpath/"Overrides.xcconfig"
|
|
xcconfig.write <<~EOS
|
|
OTHER_LDFLAGS = -headerpad_max_install_names
|
|
EOS
|
|
ENV["XCODE_XCCONFIG_FILE"] = xcconfig
|
|
revision = version.to_s.rpartition(".").last
|
|
system "mvn", "-DskipTests", "-Dgit.commitsCount=#{revision}",
|
|
"--projects", "cli/osx", "--also-make", "verify"
|
|
libexec.install Dir["cli/osx/target/duck.bundle/*"]
|
|
bin.install_symlink "#{libexec}/Contents/MacOS/duck" => "duck"
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/duck", "--download", "https://ftp.gnu.org/gnu/wget/wget-1.19.4.tar.gz", testpath/"test"
|
|
assert_equal (testpath/"test").sha256, "93fb96b0f48a20ff5be0d9d9d3c4a986b469cb853131f9d5fe4cc9cecbc8b5b5"
|
|
end
|
|
end
|