coreutils: modernize and add test

Closes Homebrew/homebrew#35305.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Xu Cheng 2014-12-28 20:18:05 +08:00 committed by Mike McQuaid
parent 25185d7721
commit 441927e348

View file

@ -1,5 +1,3 @@
require "formula"
class Coreutils < Formula
homepage "https://www.gnu.org/software/coreutils"
url "http://ftpmirror.gnu.org/coreutils/coreutils-8.23.tar.xz"
@ -26,7 +24,7 @@ class Coreutils < Formula
system "./configure", "--prefix=#{prefix}",
"--program-prefix=g",
"--without-gmp"
system "make install"
system "make", "install"
# Symlink all commands into libexec/gnubin without the 'g' prefix
coreutils_filenames(bin).each do |cmd|
@ -62,6 +60,12 @@ class Coreutils < Formula
end
filenames.sort
end
test do
(testpath/"test").write("test")
(testpath/"test.sha1").write("a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 test")
system "#{bin}/gsha1sum", "-c", "test.sha1"
end
end
__END__