aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-07-24 22:15:54 +0200
committerLudovic Courtès <ludo@gnu.org>2016-07-24 22:18:45 +0200
commitbc85b127df622575988f8e760f72d608d0900a75 (patch)
treeb7f1f19f287b1bbe8fe8fee9305e5d55f4203ed9
parent80c47cf8e4d95d9668e642eee474d9b230a743a7 (diff)
downloadguix-bc85b127df622575988f8e760f72d608d0900a75.tar
guix-bc85b127df622575988f8e760f72d608d0900a75.tar.gz
gnu: gnupg@2.0: Add the 'gpg' and 'gpgv' commands.
* gnu/packages/gnupg.scm (gnupg-2.0)[arguments]: Add 'rename-v2-commands' phase.
-rw-r--r--gnu/packages/gnupg.scm15
1 files changed, 14 insertions, 1 deletions
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index ddb9bf161d..90b5c2d72e 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -284,7 +284,20 @@ libskba (working with X.509 certificates and CMS data).")
(lambda _
(substitute* "tests/openpgp/Makefile.in"
(("/bin/sh") (which "bash")))
- #t)))))))
+ #t))
+ (add-after 'install 'rename-v2-commands
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Upstream suggests removing the trailing '2' from command names:
+ ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
+ (let ((out (assoc-ref outputs "out")))
+ (with-directory-excursion (string-append out "/bin")
+ (rename-file "gpgv2" "gpgv")
+ (rename-file "gpg2" "gpg")
+
+ ;; Keep the old name around to ease transition.
+ (symlink "gpgv" "gpgv2")
+ (symlink "gpg" "gpg2")
+ #t)))))))))
(define-public gnupg-1
(package (inherit gnupg)