2011-09-28 23:29:41 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libsvm < Formula
|
|
|
|
homepage 'http://www.csie.ntu.edu.tw/~cjlin/libsvm/'
|
2012-02-12 22:38:28 +00:00
|
|
|
url 'http://www.csie.ntu.edu.tw/~cjlin/libsvm/libsvm-3.11.tar.gz'
|
2011-09-28 23:29:41 +00:00
|
|
|
md5 '44d2a3a611280ecd0d66aafe0d52233e'
|
|
|
|
|
|
|
|
def install
|
2012-02-03 23:02:21 +00:00
|
|
|
inreplace 'Makefile', '-soname', '-install_name'
|
|
|
|
inreplace 'Makefile', 'libsvm.so.$(SHVER)', 'libsvm.$(SHVER).dylib'
|
|
|
|
|
2011-09-28 23:29:41 +00:00
|
|
|
system "make"
|
2012-02-03 23:02:21 +00:00
|
|
|
system "make lib"
|
|
|
|
ln_s 'libsvm.2.dylib', 'libsvm.dylib'
|
|
|
|
|
2012-02-12 22:38:28 +00:00
|
|
|
bin.install 'svm-scale', 'svm-train', 'svm-predict'
|
|
|
|
lib.install 'libsvm.2.dylib', 'libsvm.dylib'
|
|
|
|
include.install 'svm.h'
|
2011-09-28 23:29:41 +00:00
|
|
|
end
|
|
|
|
end
|