axel: modernise and add test

Confession: I completely stole the cURL test here.

Closes Homebrew/homebrew#35836.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Dominyk Tiller 2015-01-13 19:54:48 +00:00 committed by Mike McQuaid
parent 0ed498f142
commit 8b5b547beb

View file

@ -1,13 +1,19 @@
require 'formula'
class Axel < Formula class Axel < Formula
homepage 'http://packages.debian.org/wheezy/axel' homepage "https://packages.debian.org/sid/axel"
url 'http://ftp.de.debian.org/debian/pool/main/a/axel/axel_2.4.orig.tar.gz' url "https://mirrors.kernel.org/debian/pool/main/a/axel/axel_2.4.orig.tar.gz"
sha1 '6d89a7ce797ddf4c23a210036d640d013fe843ca' mirror "http://ftp.de.debian.org/debian/pool/main/a/axel/axel_2.4.orig.tar.gz"
sha1 "6d89a7ce797ddf4c23a210036d640d013fe843ca"
def install def install
system "./configure", "--prefix=#{prefix}", "--debug=0", "--i18n=0" system "./configure", "--prefix=#{prefix}", "--debug=0", "--i18n=0"
system "make" system "make"
system "make install" system "make", "install"
end
test do
filename = (testpath/"axel.tar.gz")
system bin/"axel", "-o", "axel.tar.gz", stable.url
filename.verify_checksum stable.checksum
assert File.exist?("axel.tar.gz")
end end
end end