Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes Homebrew/legacy-homebrew#45850. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
- Loading branch information
1 parent
33dc977
commit c53c8bf
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
class Saldl < Formula | ||
desc "CLI downloader optimized for speed and early preview." | ||
homepage "https://saldl.github.io" | ||
url "https://github.com/saldl/saldl/archive/v31.tar.gz" | ||
sha256 "146a980ae2109a391c7a8ab6a1c525458db9bf18f3f0477731c9b876630078b4" | ||
head "https://github.com/saldl/saldl.git", :shallow => false | ||
|
||
depends_on "pkg-config" => :build | ||
depends_on "asciidoc" => :build | ||
depends_on "docbook-xsl" => :build | ||
depends_on "libevent" | ||
|
||
if MacOS.version <= :mavericks | ||
# curl >= 7.42 is required | ||
depends_on "curl" | ||
else | ||
depends_on "curl" => :optional | ||
end | ||
|
||
def install | ||
# a2x/asciidoc needs this to build the man page successfully | ||
ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" | ||
|
||
args = ["--prefix=#{prefix}"] | ||
|
||
# head uses git describe to acquire a version | ||
args << "--saldl-version=v#{version}" unless build.head? | ||
|
||
system "./waf", "configure", *args | ||
system "./waf", "build" | ||
system "./waf", "install" | ||
end | ||
|
||
test do | ||
system "#{bin}/saldl", "http://brew.sh/index.html" | ||
assert File.exist? "index.html" | ||
end | ||
end |