blob: 98f340ae475fb9929489e30229f3f8fa2318b8c0 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 | require 'formula'
class Antiword < Formula
  homepage 'http://www.winfield.demon.nl/'
  url 'http://www.winfield.demon.nl/linux/antiword-0.37.tar.gz'
  sha1 '4364f7f99cb2d37f7d1d5bc14a335ccc0c67292e'
  def install
    inreplace 'antiword.h', '/usr/share/antiword', "#{share}/antiword"
    system "make", "CC=#{ENV.cc}",
                   "LD=#{ENV.cc}",
                   "CFLAGS=#{ENV.cflags} -DNDEBUG",
                   "GLOBAL_INSTALL_DIR=#{bin}",
                   "GLOBAL_RESOURCES_DIR=#{share}/antiword"
    bin.install 'antiword'
    (share+'antiword').install Dir["Resources/*"]
    man1.install 'Docs/antiword.1'
  end
  def caveats; <<-EOS.undent
    You can install mapping files globally to:
      #{HOMEBREW_PREFIX}/share/antiword
    or locally to:
      ~/.antiword
    EOS
  end
end
 |