homebrew-core/Formula/csvprintf.rb
2018-08-02 01:15:34 -07:00

29 lines
1 KiB
Ruby

class Csvprintf < Formula
desc "Command-line utility for parsing CSV files"
homepage "https://github.com/archiecobbs/csvprintf"
url "https://github.com/archiecobbs/csvprintf/archive/1.0.4.tar.gz"
sha256 "022188ced570203d6084e6eab68f7ad96054a4ab8aa54db1857a8fd076280568"
bottle do
cellar :any_skip_relocation
sha256 "99340f4265ad7a952d3f4fdcce154a10e46c7c8c06979b9e7c5d5016810a8c87" => :high_sierra
sha256 "236d5de27a77cadffa4cc014b9f2416b7d952f8cedb96ced98096f0bbdc928cb" => :sierra
sha256 "79c0236e6eeb86a283831f3123430f700862d229bc0b5d64b0a0251d8832e092" => :el_capitan
end
depends_on "autoconf" => :build
depends_on "automake" => :build
def install
ENV.append "LDFLAGS", "-liconv"
system "./autogen.sh"
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make", "install"
end
test do
assert_equal "Fred Smith\n",
pipe_output("#{bin}/csvprintf -i '%2$s %1$s\n'", "Last,First\nSmith,Fred\n")
end
end