guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 4/6] gnu: Add gpgscm.


From: ng0
Subject: [PATCH 4/6] gnu: Add gpgscm.
Date: Sun, 17 Jul 2016 23:19:41 +0000

Whoever wants to fix how this looks in code can change it before
commit, like it is now it works and serves its purpose (run the
gnupg tests).
Commented parts included for people who want to make it smaller,
if you make it smaller in size the code size on our side will
grow.

>From 6babb18479de83bd19c44412c7957918d2c917b2 Mon Sep 17 00:00:00 2001
From: ng0 <address@hidden>
Date: Sun, 17 Jul 2016 22:11:41 +0000
Subject: [PATCH 4/6] gnu: Add gpgscm.

* gnu/packages/gnupg.scm (gpgscm): New variable.
---
 gnu/packages/gnupg.scm | 107 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 107 insertions(+)

diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 444c60a..84bf19c 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -205,6 +205,113 @@ implementation.  This allows the use of libraries which 
are not
 compatible to GNU Pth.")
     (license (list license:lgpl3+ license:gpl2+)))) ; dual license

+;; This is used by >=gnupg-2.1.14 for the test suite.
+;; This package becomes obsolete once they will move gpgscm
+;; outside of GnuPG source.
+(define-public gpgscm
+  (package
+    (name "gpgscm")
+    (version "2.1.14")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
+                           ".tar.bz2"))
+       (file-name (string-append name "-" version ".tar.bz2"))
+       (sha256
+        (base32
+         "0hmsiscpdpdqd8kcjpzkz2gzcc3cnrvswk9p1jzi4sivd7lxwl4l"))))
+       ;; (modules '((guix build utils)))
+       ;; (snippet
+       ;;  '(begin
+       ;;     ;; Strip gnupg down to gpgscm + shared libs.
+       ;;     (for-each delete-file-recursively
+       ;;               '(;;"agent" "dirmngr" ;;"kbx"
+       ;;                 ;;"scd" "doc" ;;"sm"
+       ;;                 "tests/openpgp"
+       ;;                 "tests/pkits"
+       ;;                 "tests/migrations"
+       ;;                 "tests/samplekeys"))))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("adns" ,adns)
+       ("bzip2" ,bzip2)
+       ("curl" ,curl)
+       ("gnutls" ,gnutls)
+       ("libassuan" ,libassuan)
+       ("libgcrypt" ,libgcrypt)
+       ("libgpg-error" ,libgpg-error)
+       ("libksba" ,libksba)
+       ("npth" ,npth)
+       ("openldap" ,openldap)
+       ("readline" ,readline)
+       ("sqlite" ,sqlite)
+       ("zlib" ,zlib)))
+   (arguments
+    `(#:phases
+      (modify-phases %standard-phases
+        (add-before 'configure 'patch-tests-makefile
+          (lambda _
+            (substitute* "tests/Makefile.am"
+              (("/bin/pwd") (which "pwd")))))
+        ;; (add-before 'configure 'delete-excluded-Makefiles
+        ;;   (lambda _
+        ;;     (substitute* "configure.ac"
+        ;;       ;;(("kbx/Makefile") "")
+        ;;       ;;(("sm/Makefile") "")
+        ;;       ;; (("agent/Makefile") "")
+        ;;       ;; (("scd/Makefile") "")
+        ;;       ;; (("dirmngr/Makefile") "")
+        ;;       ;; (("doc/Makefile") "")
+        ;;       (("tests/opengpg/Makefile") "")
+        ;;       (("tests/pkits") "")
+        ;;       (("tests/migrations") "")
+        ;;       (("tests/samplekeys") ""))))
+        (replace 'install
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let* ((out (assoc-ref outputs "out"))
+                   (bin (string-append out "/bin"))
+                   (inc (string-append out "/include"))
+                   (doc (string-append out "/share/doc/gpgscm")))
+              (install-file "tests/gpgscm/gpgscm" bin)
+              (install-file "common/util.h" inc)
+              (install-file "common/exechelp.h" inc)
+              (install-file "common/sysutils.h" inc)
+              (install-file "tests/gpgscm/private.h" inc)
+              (install-file "tests/gpgscm/ffi.h" inc)
+              (install-file "tests/gpgscm/ffi-private.h" inc)
+              (install-file "tests/gpgscm/scheme.h" inc)
+              (install-file "common/i18n.h" inc)
+              (install-file "common/argparse.h" inc)
+              (install-file "common/init.h" inc)
+              (install-file "common/logging.h" inc)
+              (install-file "common/strlist.h" inc)
+              (install-file "tests/gpgscm/scheme-private.h" inc)
+              (install-file "common/dynload.h" inc)
+              (install-file "NEWS" doc)
+              (install-file "AUTHORS" doc)
+              (install-file "ChangeLog" doc)
+              (install-file "THANKS" doc)
+              (install-file "README" doc)
+              (install-file "tests/gpgscm/Manual.txt" doc))
+            #t)))
+      #:tests? #f ;; no tests for gpgscm
+      ))
+    (home-page "https://gnupg.org/";)
+    (synopsis "tinyscheme implementation used by The GNU Privacy Guard")
+    (description
+     "The GNU Privacy Guard is a complete implementation of the OpenPGP
+standard.  It is used to encrypt and sign data and communication.  It
+features powerful key management and the ability to access public key
+servers.  It includes several libraries: libassuan (IPC between GnuPG
+components), libgpg-error (centralized GnuPG error values), and
+libskba (working with X.509 certificates and CMS data).")
+    (license license:gpl3+)
+    (properties '((ftp-server . "ftp.gnupg.org")
+                  (ftp-directory . "/gcrypt/gnupg")))))
+
 (define-public gnupg
   (package
     (name "gnupg")
--
2.9.1


--
♥Ⓐ  ng0
For non-prism friendly talk find me on http://www.psyced.org
SecuShare – http://secushare.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]