aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/pngquant.rb
blob: 67c329b9894ca8c77e0515862844202c15b84e4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'formula'

class Pngquant < Formula
  homepage 'http://pngquant.org/'
  url 'https://github.com/pornel/pngquant/archive/1.8.3.tar.gz'
  sha1 '6bcca182997f4bf6b6cd332b7b26de5770eb1b06'

  head 'https://github.com/pornel/pngquant.git'

  depends_on :libpng

  def install
    ENV.append_to_cflags "-DNDEBUG" # Turn off debug
    system "make", "PREFIX=#{prefix}", "CC=#{ENV.cc}"
    bin.install 'pngquant'
    man1.install 'pngquant.1'
  end

  def test
    system "#{bin}/pngquant", "--help"
  end
end