require 'formula' class Libsvm < Formula homepage 'http://www.csie.ntu.edu.tw/~cjlin/libsvm/' url 'http://www.csie.ntu.edu.tw/~cjlin/libsvm/oldfiles/libsvm-3.18.tar.gz' sha1 '20bd3e2d21d79c3714007043475b92dfeed29135' def install system "make", "CFLAGS=#{ENV.cflags}" system "make", "lib" bin.install "svm-scale", "svm-train", "svm-predict" lib.install "libsvm.so.2" => "libsvm.2.dylib" lib.install_symlink "libsvm.2.dylib" => "libsvm.dylib" system "install_name_tool", "-id", "#{lib}/libsvm.2.dylib", "#{lib}/libsvm.2.dylib" include.install "svm.h" end end