Skip to content

Commit

Permalink
Add curl-impersonate
Browse files Browse the repository at this point in the history
  • Loading branch information
dzirtusss committed Nov 3, 2023
1 parent 4cf96ed commit 8a095b0
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions Formula/curl-impersonate.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
class CurlImpersonate < Formula
desc "Impersonate version of curl"
homepage "https://github.com/lwthiker/curl-impersonate"
url "https://github.com/lwthiker/curl-impersonate/archive/refs/tags/v0.6.0-alpha.1.tar.gz"
sha256 "b6e6ae6a418695f2fb8f45a36540866a958a5070fa4c2c54849d6946ed5eae10"
license "MIT"

depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "cmake" => :build
depends_on "libtool" => :build
depends_on "make" => :build
depends_on "ninja" => :build

depends_on "go" # for chrome only
depends_on "libidn2"
depends_on "rtmpdump"
depends_on "zstd"

def install
inreplace "configure", %r{/usr/local}, prefix

mkdir "build" do
system "../configure"

ENV.deparallelize do
system "gmake", "chrome-build"
end

system "gmake", "chrome-checkbuild"

system "gmake", "chrome-install"
end
end

test do
version = shell_output("#{bin}/curl-impersonate-chrome --version")

# same as in chrome-checkbuild
assert_match "libcurl", version
assert_match "zlib", version
assert_match "brotli", version
assert_match "nghttp2", version
assert_match "BoringSSL", version
end
end

0 comments on commit 8a095b0

Please sign in to comment.