mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-27 23:02:16 -05:00
java-utils: Use 'strip-store-file-name'.
See the discussion at <https://lists.gnu.org/archive/html/guix-devel/2018-10/msg00250.html>. * guix/build/java-utils.scm (package-name-version): Remove it. (install-javadoc): Use 'strip-store-file-name' instead of 'package-name-version'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
58352f269e
commit
418f1b2414
1 changed files with 3 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
|
||||
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -23,12 +24,6 @@ (define-module (guix build java-utils)
|
|||
install-jars
|
||||
install-javadoc))
|
||||
|
||||
;; Copied from haskell-build-system.scm
|
||||
(define (package-name-version store-dir)
|
||||
"Given a store directory STORE-DIR return 'name-version' of the package."
|
||||
(let* ((base (basename store-dir)))
|
||||
(string-drop base (+ 1 (string-index base #\-)))))
|
||||
|
||||
(define* (ant-build-javadoc #:key (target "javadoc") (make-flags '())
|
||||
#:allow-other-keys)
|
||||
(apply invoke `("ant" ,target ,@make-flags)))
|
||||
|
@ -48,8 +43,9 @@ (define* (install-javadoc apidoc-directory)
|
|||
install javadocs when this is not done by the install target."
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(name-version (strip-store-file-name out))
|
||||
(docs (string-append (or (assoc-ref outputs "doc") out)
|
||||
"/share/doc/" (package-name-version out) "/")))
|
||||
"/share/doc/" name-version "/")))
|
||||
(mkdir-p docs)
|
||||
(copy-recursively apidoc-directory docs)
|
||||
#t)))
|
||||
|
|
Loading…
Reference in a new issue