Last active
December 15, 2015 16:29
-
-
Save mckelvin/5289566 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Contributor: Pierre Gueth <pierre.gueth at gmail> | |
# Daniel YC Lin <dlin.tw at gmail> | |
# Maintainer: Myautsai PAN <myautsai at gmail> | |
# vim:set ts=2 sw=2 et: | |
pkgname=libsvm | |
pkgver=3.17 | |
pkgrel=2 | |
pkgdesc="A library for Support Vector Machines classification, include binaries and python bindings." | |
arch=(x86_64 i686) | |
url="http://www.csie.ntu.edu.tw/~cjlin/libsvm/" | |
license=('BSD') | |
groups=() | |
depends=(coreutils) | |
makedepends=() | |
optdepends=( | |
'python: bindings for latest python version' | |
'python2: bindings for python 2' | |
'java-environment: bindings for java' 'gcc-libs-multilib') | |
provides=() | |
conflicts=() | |
replaces=() | |
backup=() | |
options=() | |
install= | |
source=("http://www.csie.ntu.edu.tw/~cjlin/libsvm/libsvm-$pkgver.tar.gz") | |
noextract=() | |
build() { | |
cd "$srcdir/$pkgname-$pkgver" | |
make lib all | |
} | |
package() { | |
cd "$srcdir/$pkgname-$pkgver" | |
install -D -m755 svm-train $pkgdir/usr/bin/svm-train | |
install -D -m755 svm-predict $pkgdir/usr/bin/svm-predict | |
install -D -m755 svm-scale $pkgdir/usr/bin/svm-scale | |
install -D -m644 java/libsvm.jar $pkgdir/usr/share/java/libsvm.jar | |
install -D -m644 libsvm.so.2 $pkgdir/usr/lib/libsvm.so.2 | |
install -D -m644 svm.h $pkgdir/usr/include/svm.h | |
ln -s libsvm.so.2 $pkgdir/usr/lib/libsvm.so | |
#cp ../setup.py python | |
cd "python" | |
#python setup.py build || return 1 | |
#python setup.py install --root $pkgdir | |
#python2 setup.py build || return 1 | |
#python2 setup.py install --root $pkgdir | |
sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' svm.py | |
sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' svmutil.py | |
install -D -m644 svm.py $pkgdir/usr/lib/python2.7/svm.py | |
install -D -m644 svmutil.py $pkgdir/usr/lib/python2.7/svmutil.py | |
sed -i 's_#!/usr/bin/env python2_#!/usr/bin/env python3_' svm.py | |
sed -i 's_#!/usr/bin/env python2_#!/usr/bin/env python3_' svmutil.py | |
install -D -m644 svm.py $pkgdir/usr/lib/python3.3/svm.py | |
install -D -m644 svmutil.py $pkgdir/usr/lib/python3.3/svmutil.py | |
} | |
sha1sums=('f6e5b238f89368f3e4c9ac65278ad8660d80c85c') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment