diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2021-12-09 11:05:09 +0100 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2021-12-09 11:17:45 +0100 |
commit | 4fb363c9063be8cb69bda4828d132fcbd98c0d84 (patch) | |
tree | af273b4d01478734299ec8c98a219535982bfa8a | |
parent | 26e26bc8191604f0125ccbdc231498545f93dc5c (diff) | |
download | guix-4fb363c9063be8cb69bda4828d132fcbd98c0d84.tar.gz guix-4fb363c9063be8cb69bda4828d132fcbd98c0d84.zip |
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.
-rw-r--r-- | gnu/packages/machine-learning.scm | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index e75faefdf5..5c1497bd92 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -141,20 +141,28 @@ sparsely connected networks.") (build-system gnu-build-system) (arguments `(#:tests? #f ; no "check" target - #:phases (modify-phases %standard-phases - (delete 'configure) - (replace - 'install ; no ‘install’ target - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin/"))) - (mkdir-p bin) - (for-each (lambda (file) - (copy-file file (string-append bin file))) - '("svm-train" - "svm-predict" - "svm-scale"))) - #t))))) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'build 'build-lib + (lambda _ + (invoke "make" "lib"))) + (replace 'install ; no ‘install’ target + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin/")) + (lib (string-append out "/lib/")) + (inc (string-append out "/include/libsvm"))) + (mkdir-p bin) + (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/") (synopsis "Library for Support Vector Machines") (description |