gnu: libsvm: Install header and library.
* gnu/packages/machine-learning.scm (libsvm)[arguments]: Add build phase 'build-lib; also install header file and shared library in the 'install phase.
This commit is contained in:
parent
26e26bc819
commit
4fb363c906
1 changed files with 22 additions and 14 deletions
|
@ -141,20 +141,28 @@ sparsely connected networks.")
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ; no "check" target
|
`(#:tests? #f ; no "check" target
|
||||||
#:phases (modify-phases %standard-phases
|
#:phases
|
||||||
(delete 'configure)
|
(modify-phases %standard-phases
|
||||||
(replace
|
(delete 'configure)
|
||||||
'install ; no ‘install’ target
|
(add-after 'build 'build-lib
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda _
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(invoke "make" "lib")))
|
||||||
(bin (string-append out "/bin/")))
|
(replace 'install ; no ‘install’ target
|
||||||
(mkdir-p bin)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(for-each (lambda (file)
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(copy-file file (string-append bin file)))
|
(bin (string-append out "/bin/"))
|
||||||
'("svm-train"
|
(lib (string-append out "/lib/"))
|
||||||
"svm-predict"
|
(inc (string-append out "/include/libsvm")))
|
||||||
"svm-scale")))
|
(mkdir-p bin)
|
||||||
#t)))))
|
(for-each (lambda (file)
|
||||||
|
(copy-file file (string-append bin file)))
|
||||||
|
'("svm-train"
|
||||||
|
"svm-predict"
|
||||||
|
"svm-scale"))
|
||||||
|
(mkdir-p lib)
|
||||||
|
(install-file "libsvm.so.2" lib)
|
||||||
|
(mkdir-p inc)
|
||||||
|
(install-file "svm.h" inc)))))))
|
||||||
(home-page "https://www.csie.ntu.edu.tw/~cjlin/libsvm/")
|
(home-page "https://www.csie.ntu.edu.tw/~cjlin/libsvm/")
|
||||||
(synopsis "Library for Support Vector Machines")
|
(synopsis "Library for Support Vector Machines")
|
||||||
(description
|
(description
|
||||||
|
|
Reference in a new issue