67 lines
3.2 KiB
Ruby
67 lines
3.2 KiB
Ruby
class YtDlp < Formula
|
|
include Language::Python::Virtualenv
|
|
|
|
desc "Fork of youtube-dl with additional features and fixes"
|
|
homepage "https://github.com/yt-dlp/yt-dlp"
|
|
url "https://files.pythonhosted.org/packages/15/05/d9c74834b34ed3a42918ff047d6045f9aaa358f2b46ee5c1a45b4a23e368/yt-dlp-2022.7.18.tar.gz"
|
|
sha256 "0e7b81fc6ac8d1b7d3fffa79f9044ca4163784422582c9a3593305da2a69ec02"
|
|
license "Unlicense"
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, arm64_monterey: "23ab80c4412d768c4f700aa07d6a3ad13c6322f7b9d9719571e8548d26f77378"
|
|
sha256 cellar: :any_skip_relocation, arm64_big_sur: "81c63a22c91e559c1e368e04884bdb6a87b41e6b3e0644be5029ca839e398eca"
|
|
sha256 cellar: :any_skip_relocation, monterey: "6ad6273c8a29367adc24f929b1a081a6350c7264aa789b552b1de05c53417e87"
|
|
sha256 cellar: :any_skip_relocation, big_sur: "0b0d5e9f81fc95e46aca037fe76fe2da3c63364930e879da1c4087f196c83a58"
|
|
sha256 cellar: :any_skip_relocation, catalina: "25ff19ef907bd626f62d61838ae8cff3f12d2ca9ed3cd023ab75b7555c910a0e"
|
|
sha256 cellar: :any_skip_relocation, x86_64_linux: "4dde158cef35c50fd05f25b106091640011947f25ec645491941bffbcebc2213"
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/yt-dlp/yt-dlp.git", branch: "master"
|
|
depends_on "pandoc" => :build
|
|
end
|
|
|
|
depends_on "python@3.10"
|
|
|
|
resource "Brotli" do
|
|
url "https://files.pythonhosted.org/packages/2a/18/70c32fe9357f3eea18598b23aa9ed29b1711c3001835f7cf99a9818985d0/Brotli-1.0.9.zip"
|
|
sha256 "4d1b810aa0ed773f81dceda2cc7b403d01057458730e309856356d4ef4188438"
|
|
end
|
|
|
|
resource "certifi" do
|
|
url "https://files.pythonhosted.org/packages/cc/85/319a8a684e8ac6d87a1193090e06b6bbb302717496380e225ee10487c888/certifi-2022.6.15.tar.gz"
|
|
sha256 "84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d"
|
|
end
|
|
|
|
resource "mutagen" do
|
|
url "https://files.pythonhosted.org/packages/f3/d9/2232a4cb9a98e2d2501f7e58d193bc49c956ef23756d7423ba1bd87e386d/mutagen-1.45.1.tar.gz"
|
|
sha256 "6397602efb3c2d7baebd2166ed85731ae1c1d475abca22090b7141ff5034b3e1"
|
|
end
|
|
|
|
resource "pycryptodomex" do
|
|
url "https://files.pythonhosted.org/packages/52/0d/6cc95a83f6961a1ca041798d222240890af79b381e97eda3b9b538dba16f/pycryptodomex-3.15.0.tar.gz"
|
|
sha256 "7341f1bb2dadb0d1a0047f34c3a58208a92423cdbd3244d998e4b28df5eac0ed"
|
|
end
|
|
|
|
resource "websockets" do
|
|
url "https://files.pythonhosted.org/packages/f8/a3/622d9acbfb9a71144b5d7609906bc648c62e3ca5fdbb1c8cca222949d82c/websockets-10.3.tar.gz"
|
|
sha256 "fc06cc8073c8e87072138ba1e431300e2d408f054b27047d047b549455066ff4"
|
|
end
|
|
|
|
def install
|
|
system "make", "pypi-files" if build.head?
|
|
virtualenv_install_with_resources
|
|
man1.install_symlink libexec/"share/man/man1/yt-dlp.1"
|
|
bash_completion.install libexec/"share/bash-completion/completions/yt-dlp"
|
|
zsh_completion.install libexec/"share/zsh/site-functions/_yt-dlp"
|
|
fish_completion.install libexec/"share/fish/vendor_completions.d/yt-dlp.fish"
|
|
end
|
|
|
|
test do
|
|
# "History of homebrew-core", uploaded 3 Feb 2020
|
|
system "#{bin}/yt-dlp", "--simulate", "https://www.youtube.com/watch?v=pOtd1cbOP7k"
|
|
# "homebrew", playlist last updated 3 Mar 2020
|
|
system "#{bin}/yt-dlp", "--simulate", "--yes-playlist", "https://www.youtube.com/watch?v=pOtd1cbOP7k&list=PLMsZ739TZDoLj9u_nob8jBKSC-mZb0Nhj"
|
|
end
|
|
end
|