unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 4/6] gnu: Add gpgscm.
@ 2016-07-17 23:19 ng0
  2016-07-18 12:35 ` Ludovic Courtès
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: ng0 @ 2016-07-17 23:19 UTC (permalink / raw)
  To: guix-devel

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 <ng0@we.make.ritual.n0.is>
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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-07-19 12:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-17 23:19 [PATCH 4/6] gnu: Add gpgscm ng0
2016-07-18 12:35 ` Ludovic Courtès
2016-07-18 14:10   ` ng0
2016-07-19 12:53     ` Ludovic Courtès
2016-07-18 14:13 ` ng0
2016-07-18 17:44 ` Leo Famulari
2016-07-18 22:16   ` Leo Famulari
2016-07-18 23:10     ` ng0
2016-07-19  3:58       ` Leo Famulari
2016-07-19  7:14         ` Andreas Enge

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).