Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKGBUILD libsvm

By: a guest on Jan 5th, 2011  |  syntax: Bash  |  size: 1.46 KB  |  views: 114  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Contributor: Pierre Gueth <pierre.gueth@gmail.com>
  2. pkgname=libsvm
  3. pkgver=3.0
  4. pkgrel=1
  5. pkgdesc="A library for Support Vector Machines classification, include binaries and python bindings."
  6. arch=(x86_64 i686)
  7. url="http://www.csie.ntu.edu.tw/~cjlin/libsvm/"
  8. license=('GPL')
  9. groups=()
  10. depends=()
  11. makedepends=('python' 'python2')
  12. optdepends=('python: bindings for latest python version'
  13. 'python2: bindings for python 2'
  14. 'java-environment')
  15. provides=()
  16. conflicts=()
  17. replaces=()
  18. backup=()
  19. options=()
  20. install=
  21. source=("libsvm-$pkgver.tar.gz::http://www.csie.ntu.edu.tw/~cjlin/cgi-bin/libsvm.cgi?+http://www.csie.ntu.edu.tw/~cjlin/libsvm+tar.gz" 'setup.py')
  22. noextract=()
  23. md5sums=('016e29668aae8aa6eaeb125c9e23d834' '3b5de4b30b64def6e2fbc169a99d0275')
  24.  
  25. build() {
  26.   cd "$srcdir/$pkgname-$pkgver"
  27.   make lib all || return 1
  28.   install -D -m755 svm-train $pkgdir/usr/bin/svm-train
  29.   install -D -m755 svm-predict $pkgdir/usr/bin/svm-predict
  30.   install -D -m755 svm-scale $pkgdir/usr/bin/svm-scale
  31.   install -D -m755 libsvm.so.2 $pkgdir/usr/lib/libsvm.so.2
  32.   install -D -m644 java/libsvm.jar $pkgdir/usr/share/java/libsvm.jar
  33.  
  34.   # Create python bindings for both python3 and python2
  35.   # You can remove the relevant lines and makedepends if desired
  36.   cp ../setup.py python
  37.   cd "python"
  38.   python setup.py build || return 1
  39.   python setup.py install --root $pkgdir
  40.   python2 setup.py build || return 1
  41.   python2 setup.py install --root $pkgdir
  42. }
  43.  
  44. # vim:set ts=2 sw=2 et:
clone this paste RAW Paste Data