2009-12-31 19:24:29 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Figlet < Formula
|
2009-12-31 19:24:29 +00:00
|
|
|
homepage 'http://www.figlet.org'
|
2012-07-26 01:50:04 +00:00
|
|
|
url 'ftp://ftp.figlet.org/pub/figlet/program/unix/figlet-2.2.5.tar.gz'
|
|
|
|
sha1 'dda696958c161bd71d6590152c94c4f705415727'
|
2009-12-31 19:24:29 +00:00
|
|
|
|
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
|
|
|
|
|
2009-12-31 19:24:29 +00:00
|
|
|
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)
|
2009-12-31 19:24:29 +00:00
|
|
|
man6.mkpath
|
|
|
|
bin.mkpath
|
|
|
|
|
2012-02-13 04:22:05 +00:00
|
|
|
system "make", "prefix=#{prefix}",
|
|
|
|
"DEFAULTFONTDIR=#{share_fonts}",
|
|
|
|
"MANDIR=#{man}",
|
|
|
|
"install"
|
2009-12-31 19:24:29 +00:00
|
|
|
end
|
|
|
|
|
2011-05-02 21:30:50 +00:00
|
|
|
def test
|
2012-05-15 21:36:45 +00:00
|
|
|
system "#{bin}/figlet", "-f", "larry3d", "hello, figlet"
|
2011-05-02 21:30:50 +00:00
|
|
|
end
|
|
|
|
end
|