aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/gnu-barcode.rb
blob: b2772f318884897c93197f85982a4108b965938f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class GnuBarcode < Formula
  homepage "https://www.gnu.org/software/barcode/"
  url "http://ftpmirror.gnu.org/barcode/barcode-0.98.tar.gz"
  mirror "https://ftp.gnu.org/gnu/barcode/barcode-0.98.tar.gz"
  sha256 "4229e19279b9787ac7e98852fa0bfd93986dce93b9cb07d93a017d68d409b635"

  def install
    system "./configure", "--disable-debug",
                          "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make"
    system "make", "MAN1DIR=#{man1}",
                   "MAN3DIR=#{man3}",
                   "INFODIR=#{info}",
                   "install"
  end

  test do
    (testpath/"test.txt").write("12345")
    system "#{bin}/barcode", "-e", "CODE39", "-i", "test.txt", "-o", "test.ps"
    assert File.read("test.ps").start_with?("")
  end
end