homebrew-core/Formula/figlet.rb

36 lines
935 B
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Figlet < Formula
homepage 'http://www.figlet.org'
url 'ftp://ftp.figlet.org/pub/figlet/program/unix/figlet-2.2.5.tar.gz'
sha1 'dda696958c161bd71d6590152c94c4f705415727'
2013-06-08 23:54:54 +00:00
resource 'contrib' do
url 'ftp://ftp.figlet.org/pub/figlet/fonts/contributed.tar.gz'
sha1 'a23ecfdb54301e93b6578c3c465ba84c8f861d4f'
end
resource 'intl' do
url 'ftp://ftp.figlet.org/pub/figlet/fonts/international.tar.gz'
sha1 '4bdc505f82305debf8108b725ac418f404a8bcb0'
end
def install
2011-05-02 21:30:50 +00:00
share_fonts = share+"figlet/fonts"
2013-06-08 23:54:54 +00:00
share_fonts.install resource('contrib'), resource('intl')
2011-05-02 21:30:50 +00:00
2013-06-08 23:54:54 +00:00
chmod 0666, %w(Makefile showfigfonts)
man6.mkpath
bin.mkpath
system "make", "prefix=#{prefix}",
"DEFAULTFONTDIR=#{share_fonts}",
"MANDIR=#{man}",
"install"
end
2011-05-02 21:30:50 +00:00
def test
system "#{bin}/figlet", "-f", "larry3d", "hello, figlet"
2011-05-02 21:30:50 +00:00
end
end