45 lines
1.7 KiB
Ruby
45 lines
1.7 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.7.0.33744.tar.gz"
|
|
sha256 "9595c5e96217bc529bb12e440e3696911686adeb3802b395257b3071e8c2b360"
|
|
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 "669ee292db61efa375c7827796eb62cd855710b3fc88048330ad8ed30897ba83" => :big_sur
|
|
sha256 "e13772c068a869b575e0f344adc8f362481b39b7495deb0b602d9fec9b0b9a91" => :catalina
|
|
sha256 "65cf30c0a2af684e38f875fe90d25f33d9f8b19a71f2b883468b7ef434c5f9fb" => :mojave
|
|
sha256 "a3263579656459a1dfc733e3e254dc364d9f0354a15b645c2df5656453595195" => :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
|