2009-12-31 19:24:29 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class ContribFonts < Formula
|
2009-12-31 19:24:29 +00:00
|
|
|
url 'ftp://ftp.figlet.org:21//pub/figlet/fonts/contributed.tar.gz'
|
|
|
|
version "2.2.2"
|
|
|
|
md5 '6e2dec4499f7a7fe178522e02e0b6cd1'
|
|
|
|
end
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class InternationalFonts < Formula
|
2009-12-31 19:24:29 +00:00
|
|
|
url 'ftp://ftp.figlet.org:21//pub/figlet/fonts/international.tar.gz'
|
|
|
|
version "2.2.2"
|
|
|
|
md5 'b2d53f7e251014adcdb4d407c47f90ef'
|
|
|
|
end
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Figlet < Formula
|
2011-05-01 23:19:03 +00:00
|
|
|
url 'ftp://ftp.figlet.org/pub/figlet/program/unix/figlet-2.2.4.tar.gz'
|
2009-12-31 19:24:29 +00:00
|
|
|
homepage 'http://www.figlet.org'
|
2011-05-01 23:19:03 +00:00
|
|
|
md5 'ea048d8d0b56f9c58e55514d4eb04203'
|
2009-12-31 19:24:29 +00:00
|
|
|
|
|
|
|
def install
|
2011-05-02 21:30:50 +00:00
|
|
|
share_fonts = share+"figlet/fonts"
|
|
|
|
|
2009-12-31 19:24:29 +00:00
|
|
|
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['*'] }
|
2009-12-31 19:24:29 +00:00
|
|
|
|
|
|
|
inreplace "Makefile" do |s|
|
2011-05-03 07:59:30 +00:00
|
|
|
s.gsub! "/usr/local", prefix
|
2011-05-02 21:30:50 +00:00
|
|
|
s.change_make_var! 'DEFAULTFONTDIR', share_fonts
|
2011-07-01 20:19:10 +00:00
|
|
|
s.change_make_var! 'MANDIR', man
|
2009-12-31 19:24:29 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
2011-05-02 21:30:50 +00:00
|
|
|
def test
|
|
|
|
system "figlet -f larry3d hello, figlet"
|
|
|
|
end
|
|
|
|
end
|