diff options
author | Daniel Bermond | 2018-08-25 20:39:05 +0000 |
---|---|---|
committer | Daniel Bermond | 2018-08-25 20:41:55 +0000 |
commit | 5b71d8e4db9a38384e998fff4f125f857303f49c (patch) | |
tree | 4ebab4b46eb280a0655d029e227128be53de4fcd /PKGBUILD | |
parent | 62b39c35d24f4a939a17bd6e8a8b50b7e096288e (diff) | |
download | aur-5b71d8e4db9a38384e998fff4f125f857303f49c.tar.gz |
Add missing python modules
commonutil.py was added in this version 3.23.
grid.py can be used either as a python module or a CLI tool.
References
----------
https://github.com/cjlin1/libsvm/commit/5b7247046e10916aee0adcc0694b695e9949a1d9
https://github.com/cjlin1/libsvm/blob/v323/tools/README#L163-L164
Diffstat (limited to 'PKGBUILD')
-rwxr-xr-x | PKGBUILD | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -7,7 +7,7 @@ pkgname=libsvm pkgver=3.23 _srcver="${pkgver/./}" -pkgrel=1 +pkgrel=2 pkgdesc='A library for Support Vector Machines classification (includes binaries and bindings for python and java)' arch=('i686' 'x86_64') url='http://www.csie.ntu.edu.tw/~cjlin/libsvm/' @@ -40,9 +40,11 @@ build() { package() { cd "${pkgname}-${_srcver}" - local _pyver="$(python --version | sed 's/^Python[[:space:]]//' | grep -o '^[0-9]*\.[0-9]*')" + local _pyver + local _sover - local _sover="$(find . -maxdepth 1 -type f -name 'libsvm.so.*' | awk -F'.' '{ print $4 }')" + _pyver="$(python --version | awk '{ print $2 }' | grep -o '^[0-9]*\.[0-9]*')" + _sover="$(find . -maxdepth 1 -type f -name 'libsvm.so.*' | awk -F'.' '{ print $4 }')" # binaries install -D -m755 svm-predict -t "${pkgdir}/usr/bin" @@ -60,12 +62,16 @@ package() { install -D -m644 svm.h -t "${pkgdir}/usr/include" # python modules + ## NOTE: 'grid.py' can be used either as a python module or a CLI/tool + ## https://github.com/cjlin1/libsvm/blob/v323/tools/README#L163-L164 cd "${srcdir}/${pkgname}-${_srcver}/python" - install -D -m644 svm.py -t "${pkgdir}/usr/lib/python${_pyver}" - install -D -m644 svmutil.py -t "${pkgdir}/usr/lib/python${_pyver}" - - # python tools + install -D -m644 commonutil.py -t "${pkgdir}/usr/lib/python${_pyver}" + install -D -m644 svm.py -t "${pkgdir}/usr/lib/python${_pyver}" + install -D -m644 svmutil.py -t "${pkgdir}/usr/lib/python${_pyver}" cd "${srcdir}/${pkgname}-${_srcver}/tools" + install -D -m644 grid.py -t "${pkgdir}/usr/lib/python${_pyver}" + + # python CLI/tools install -D -m755 checkdata.py -t "${pkgdir}/usr/bin" install -D -m755 easy.py -t "${pkgdir}/usr/bin" install -D -m755 grid.py -t "${pkgdir}/usr/bin" |