2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-01 04:57:16 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Antiword < Formula
|
2009-11-26 06:45:17 +00:00
|
|
|
homepage 'http://www.winfield.demon.nl/'
|
2012-02-10 03:40:52 +00:00
|
|
|
url 'http://www.winfield.demon.nl/linux/antiword-0.37.tar.gz'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '4364f7f99cb2d37f7d1d5bc14a335ccc0c67292e'
|
2009-09-01 04:57:16 +00:00
|
|
|
|
|
|
|
def install
|
2013-06-11 18:29:43 +00:00
|
|
|
inreplace 'antiword.h', '/usr/share/antiword', "#{share}/antiword"
|
2011-10-30 23:19:11 +00:00
|
|
|
|
2012-02-10 03:40:52 +00:00
|
|
|
system "make", "CC=#{ENV.cc}",
|
|
|
|
"LD=#{ENV.cc}",
|
|
|
|
"CFLAGS=#{ENV.cflags} -DNDEBUG",
|
|
|
|
"GLOBAL_INSTALL_DIR=#{bin}",
|
|
|
|
"GLOBAL_RESOURCES_DIR=#{share}/antiword"
|
2009-09-01 04:57:16 +00:00
|
|
|
bin.install 'antiword'
|
2013-06-11 18:29:43 +00:00
|
|
|
(share+'antiword').install Dir["Resources/*"]
|
2009-09-02 00:03:34 +00:00
|
|
|
man1.install 'Docs/antiword.1'
|
2010-04-24 04:09:39 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
You can install mapping files globally to:
|
|
|
|
#{HOMEBREW_PREFIX}/share/antiword
|
|
|
|
or locally to:
|
|
|
|
~/.antiword
|
|
|
|
EOS
|
2009-09-01 04:57:16 +00:00
|
|
|
end
|
|
|
|
end
|