homebrew-core/Formula/figlet.rb

41 lines
1 KiB
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class ContribFonts < Formula
url 'ftp://ftp.figlet.org:21//pub/figlet/fonts/contributed.tar.gz'
2012-09-04 01:59:06 +00:00
sha1 'a23ecfdb54301e93b6578c3c465ba84c8f861d4f'
version '2.2.4'
end
2011-03-10 05:11:03 +00:00
class InternationalFonts < Formula
url 'ftp://ftp.figlet.org:21//pub/figlet/fonts/international.tar.gz'
2012-09-04 01:59:06 +00:00
sha1 '4bdc505f82305debf8108b725ac418f404a8bcb0'
version '2.2.4'
end
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'
def install
2011-05-02 21:30:50 +00:00
share_fonts = share+"figlet/fonts"
File.chmod 0666, 'Makefile'
File.chmod 0666, 'showfigfonts'
man6.mkpath
bin.mkpath
2011-05-02 21:30:50 +00:00
ContribFonts.new.brew { share_fonts.install Dir['*'] }
InternationalFonts.new.brew { share_fonts.install Dir['*'] }
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