unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Jake Leporte <jakeleporte@outlook.com>
To: 61018@debbugs.gnu.org
Cc: Jake Leporte <jakeleporte@outlook.com>
Subject: [bug#61018] [PATCH v4] gnu: Add pcsc-tools.
Date: Fri, 27 Jan 2023 20:57:52 -0600	[thread overview]
Message-ID: <MN2PR20MB2605E1B9AE9D1BA793F51DCDACCD9@MN2PR20MB2605.namprd20.prod.outlook.com> (raw)
In-Reply-To: <MN2PR20MB26056405D5D05425ED070BC1ACC89@MN2PR20MB2605.namprd20.prod.outlook.com>

---
 gnu/packages/security-token.scm | 62 +++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index 619be42..cddb438 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -48,6 +48,7 @@ (define-module (gnu packages security-token)
   #:use-module (guix build-system python)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
@@ -253,6 +254,67 @@ (define-public pcsc-lite
                    license:isc                  ; src/strlcat.c src/strlcpy.c
                    license:gpl3+))))            ; src/spy/*
 
+(define-public pcsc-tools
+  (package
+    (name "pcsc-tools")
+    (version "1.6.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://salsa.debian.org/rousseau/pcsc-tools.git/")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "16kvw8y5289fp6y3z8l5w61gfrk872kd500a27sgr5k5dpr9vfbk"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch-data-paths
+                 (lambda _
+                   (substitute* "ATR_analysis"
+                     (((string-append
+                        "\"/usr/local/pcsc/smartcard_list.txt\", "
+                        "\"/usr/share/pcsc/smartcard_list.txt\", "
+                        "\"/usr/local/share/pcsc/smartcard_list.txt\""))
+                      (string-append "\""
+                                     #$output
+                                     "/share/pcsc/smartcard_list.txt\"")))
+                   (substitute* "ATR_analysis.1p"
+                     (("^([.]IR [.]/) ,\n$" _ cwd)
+                      (string-append cwd "\n"))
+                     (("^[.]I /usr/local/pcsc/\n$")
+                      "")
+                     (("/usr/share/pcsc/\n$")
+                      (string-append #$output "/share/pcsc/\n")))))
+               (add-after 'patch-shebangs 'wrap-programs
+                 (lambda _
+                   (for-each
+                    (lambda (prog)
+                      (wrap-program (string-append #$output
+                                                   "/bin/"
+                                                   prog)
+                        `("PERL5LIB" =
+                          (,(getenv "PERL5LIB")))))
+                    '("ATR_analysis" "gscriptor" "scriptor"))
+                   (wrap-program (string-append #$output
+                                                "/bin/gscriptor")
+                     `("GI_TYPELIB_PATH" =
+                       (,(getenv "GI_TYPELIB_PATH")))))))))
+    (native-inputs (list autoconf automake libtool gnu-gettext pkg-config))
+    (inputs (list bash-minimal ;for wrap-program
+                  perl
+                  perl-pcsc
+                  perl-gtk3
+                  pcsc-lite))
+    (synopsis "Tools for use with smart cards and PC/SC")
+    (description
+     "This package provides @code{pcsc_scan}, @code{ATR_analysis}, @code{scriptor},
+and @code{gscriptor}.")
+    (home-page "https://pcsc-tools.apdu.fr/")
+    (license license:gpl2+)))
+
 (define-public ykclient
   (package
     (name "ykclient")
-- 
2.34.1





  parent reply	other threads:[~2023-01-28  3:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23  4:29 [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc Jake Leporte
2023-01-23  4:39 ` [bug#61018] [PATCH 1/2] gnu: Add perl-pcsc Jake Leporte
2023-01-23  4:40 ` [bug#61018] [PATCH 2/2] gnu: Add pcsc-tools Jake Leporte
2023-01-23 23:01 ` [bug#61018] [PATCH v2] gnu: Add perl-pcsc Jake Leporte
2023-01-27  2:26 ` [bug#61018] [PATCH v2] gnu: Add pcsc-tools Jake Leporte
2023-01-27 17:37 ` [bug#61018] [PATCH v3 1/2] gnu: Add perl-pcsc Jake Leporte
2023-01-28  2:57 ` Jake Leporte [this message]
2023-02-18  0:36 ` [bug#61018] [PATCH v5 " Jake Leporte
2023-02-27  0:42 ` [bug#61018] [PATCH v6 0/2] Add pcsc-tools and dependency Jake Leporte
2023-03-06  1:30 ` [bug#61018] [PATCH v7 1/2] gnu: Add perl-pcsc Jake Leporte
2023-03-22  1:40   ` [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc Maxim Cournoyer
2023-03-22  1:50   ` bug#61018: " Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR20MB2605E1B9AE9D1BA793F51DCDACCD9@MN2PR20MB2605.namprd20.prod.outlook.com \
    --to=jakeleporte@outlook.com \
    --cc=61018@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).