2013-04-30 14:50:09 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Zopfli < Formula
|
|
|
|
homepage 'https://code.google.com/p/zopfli/'
|
|
|
|
url 'https://zopfli.googlecode.com/files/zopfli-1.0.0.zip'
|
|
|
|
sha1 '98ea00216e296bf3a13e241d7bc69490042ea7ce'
|
|
|
|
head 'https://code.google.com/p/zopfli/', :using => :git
|
|
|
|
|
|
|
|
def install
|
|
|
|
# Makefile hardcodes gcc
|
2014-02-02 20:25:43 +00:00
|
|
|
inreplace 'makefile', 'gcc', ENV.cc
|
|
|
|
system 'make', '-f', 'makefile'
|
2013-04-30 14:50:09 +00:00
|
|
|
bin.install 'zopfli'
|
2014-01-11 21:51:11 +00:00
|
|
|
if build.head?
|
2014-02-02 20:25:43 +00:00
|
|
|
system 'make', '-f', 'makefile', 'zopflipng'
|
2014-01-11 21:51:11 +00:00
|
|
|
bin.install 'zopflipng'
|
|
|
|
end
|
2013-04-30 14:50:09 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/zopfli"
|
|
|
|
end
|
|
|
|
end
|