[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#61018] [PATCH v2] gnu: Add pcsc-tools.
From: |
Jake Leporte |
Subject: |
[bug#61018] [PATCH v2] gnu: Add pcsc-tools. |
Date: |
Thu, 26 Jan 2023 20:26:54 -0600 |
After finally understanding wrap-program, I've corrected the `pcsc-tools'
package definition. Everything, including `gscriptor', now works properly.
---
gnu/packages/security-token.scm | 67 +++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index 619be42..e57c919 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -253,6 +253,73 @@ (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-source-shebangs 'patch-env-shebangs
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("ATR_analysis" "gscriptor"
+ "scriptor")
+ (("/usr/bin/env perl")
+ (search-input-file inputs "/bin/perl")))))
+ (add-after 'patch-shebangs 'wrap-programs
+ (lambda _
+ (for-each (lambda (prog)
+ (wrap-program (string-append #$output
+ "/bin/"
+ prog)
+ `("PERL5LIB" =
+ (,(getenv "PERL5LIB") ,
+ (string-append
#$(this-package-input
+
"perl-gtk3")
+
"/lib/perl5/site_perl")))))
+ '("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")
base-commit: 2b1e5cb6a82e60298b620ef8d2dbf90cfb925015
prerequisite-patch-id: 55ebfdbee35b36ac06da23b716337ecfef350452
prerequisite-patch-id: 12b9437ce6c6849e83e52cabad56672a5c73e2a7
prerequisite-patch-id: 52c97b6e4d8d4b78217423a3f1323d95a609de8c
prerequisite-patch-id: 90b350ab4778843697da28bb10344a84ccacc70c
prerequisite-patch-id: 0d5a1f7cfe93822a3f3b11c19f4b2662a79cda17
--
2.34.1
- [bug#61018] [PATCH 0/2] Add pcsc-tools, and missing dependency perl-pcsc, Jake Leporte, 2023/01/22
- [bug#61018] [PATCH 1/2] gnu: Add perl-pcsc., Jake Leporte, 2023/01/22
- [bug#61018] [PATCH 2/2] gnu: Add pcsc-tools., Jake Leporte, 2023/01/22
- [bug#61018] [PATCH v2] gnu: Add perl-pcsc., Jake Leporte, 2023/01/23
- [bug#61018] [PATCH v2] gnu: Add pcsc-tools.,
Jake Leporte <=
- [bug#61018] [PATCH v3 1/2] gnu: Add perl-pcsc., Jake Leporte, 2023/01/27
- [bug#61018] [PATCH v4] gnu: Add pcsc-tools., Jake Leporte, 2023/01/27