PageRenderTime 35ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/Library/Formula/mecab-ko-dic.rb

https://bitbucket.org/JoshHagins/homebrew
Ruby | 22 lines | 18 code | 4 blank | 0 comment | 1 complexity | 4fda9da4f324fc4d7a1287cd251455e3 MD5 | raw file
  1. require "formula"
  2. class MecabKoDic < Formula
  3. homepage "https://bitbucket.org/eunjeon/mecab-ko-dic"
  4. url "https://bitbucket.org/eunjeon/mecab-ko-dic/downloads/mecab-ko-dic-1.6.1-20140814.tar.gz"
  5. sha1 "f68a6faf9aa86691de5a1abace65e70571972d03"
  6. depends_on "autoconf" => :build
  7. depends_on "automake" => :build
  8. depends_on 'mecab-ko'
  9. def install
  10. system "./autogen.sh"
  11. system "./configure", "--prefix=#{prefix}",
  12. "--with-dicdir=#{prefix}"
  13. system "make install"
  14. if File.readlines("#{etc}/mecabrc").grep(/^dicdir.*=/).empty?
  15. open("#{etc}/mecabrc", "a") { |f| f.puts "dicdir = #{opt_prefix}\n" }
  16. end
  17. end
  18. end