Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Sep 2002 16:55:07 +0100 (BST)
From:      Bruce M Simpson <bms@spc.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/42702: New port: security/pcsc-tools: Tools for PC/SC Lite
Message-ID:  <20020912155507.98F829713@triage.dollah.com>

next in thread | raw e-mail | index | archive | help

>Number:         42702
>Category:       ports
>Synopsis:       New port: security/pcsc-tools: Tools for PC/SC Lite
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 12 09:20:04 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Bruce M Simpson
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
>Environment:
System: FreeBSD triage.dollah.com 4.6-STABLE FreeBSD 4.6-STABLE #4: Sat Sep 7 13:55:56 BST 2002 root@:/usr/src/sys/compile/TRIAGE i386


	
>Description:
	This is a small set of tools for working with PC/SC Lite. It includes
	perl-based tools for analyzing the Answer-to-Reset (ATR), and for
	scripting APDU exchanges with the Card Under Test.

>How-To-Repeat:
	
>Fix:

	

--- pcsc-tools.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	pcsc-tools
#	pcsc-tools/files
#	pcsc-tools/files/patch-Makefile
#	pcsc-tools/files/patch-ATR_analysis
#	pcsc-tools/distinfo
#	pcsc-tools/pkg-comment
#	pcsc-tools/pkg-descr
#	pcsc-tools/pkg-plist
#	pcsc-tools/Makefile
#
echo c - pcsc-tools
mkdir -p pcsc-tools > /dev/null 2>&1
echo c - pcsc-tools/files
mkdir -p pcsc-tools/files > /dev/null 2>&1
echo x - pcsc-tools/files/patch-Makefile
sed 's/^X//' >pcsc-tools/files/patch-Makefile << 'END-of-pcsc-tools/files/patch-Makefile'
X--- Makefile.orig	Wed Aug 21 08:58:19 2002
X+++ Makefile	Thu Sep 12 15:59:43 2002
X@@ -3,19 +3,15 @@
X 
X CC=gcc
X VERSION=`echo \`pwd\` | sed s/.*tools-//`
X-CFLAGS=-Wall -O2 -DVERSION=\"$(VERSION)\"
X-LDLIBS=-lpcsclite -lpthread
X+CFLAGS=-Wall -O2 -DVERSION=\"$(VERSION)\" -I${PREFIX}/include
X+LDLIBS=-lpcsclite -L${PREFIX}/lib
X 
X-# by default install in /usr/local
X-ifeq ($(DESTDIR),)
X-DESTDIR=/usr/local
X-endif
X+DESTDIR=${PREFIX}
X 
X BIN=pcsc_scan
X BIN_SCRIPT=ATR_analysis gscriptor scriptor
X-MAN=pcsc_scan.1.gz gscriptor.1p.gz scriptor.1p.gz ATR_analysis.1p.gz
X 
X-all: $(BIN) $(MAN)
X+all: $(BIN)
X 
X pcsc_scan: pcsc_scan.o
X 
X@@ -33,12 +29,6 @@
X 
X clean:
X 	rm -f pcsc_scan.o $(BIN) $(MAN)
X-
X-%.1.gz: %.1
X-	gzip --best $^ --to-stdout > $@
X-
X-%.1p.gz: %.1p
X-	gzip --best $^ --to-stdout > $@
X 
X .PHONY: clean all install
X 
END-of-pcsc-tools/files/patch-Makefile
echo x - pcsc-tools/files/patch-ATR_analysis
sed 's/^X//' >pcsc-tools/files/patch-ATR_analysis << 'END-of-pcsc-tools/files/patch-ATR_analysis'
X--- ATR_analysis.orig	Mon Aug 26 09:15:35 2002
X+++ ATR_analysis	Thu Sep 12 16:00:40 2002
X@@ -42,15 +42,14 @@
X # TCK	check character
X 
X use strict;
X-use warnings;
X use Getopt::Std;
X 
X # file containing the smart card models
X my $SMARTCARD_LIST = "smartcard_list.txt";
X # where to look for $SMARTCARD_LIST
X-my @LIST_PATH = qw(. /usr/local/pcsc /usr/lib/pcsc);
X+my @LIST_PATH = qw( . /usr/local/share/doc/pcsc-tools /usr/local/pcsc /usr/lib/pcsc );
X 
X-our ($opt_v, $opt_h);
X+use vars qw( $opt_v $opt_h $opt_l $opt_r );
X my ($atr, %TS, @Fi, @Di, @XI, @UI, $T, $value, $counter, $line);
X my ($Y1, $K, @object, $nb_bytes);
X 
END-of-pcsc-tools/files/patch-ATR_analysis
echo x - pcsc-tools/distinfo
sed 's/^X//' >pcsc-tools/distinfo << 'END-of-pcsc-tools/distinfo'
XMD5 (pcsc-tools-1.2.1.tar.gz) = 4b86de6137e31675fd46c756ecab45bd
END-of-pcsc-tools/distinfo
echo x - pcsc-tools/pkg-comment
sed 's/^X//' >pcsc-tools/pkg-comment << 'END-of-pcsc-tools/pkg-comment'
XDiagnostic and interrogation tools for smart cards (uses pcsc-lite)
END-of-pcsc-tools/pkg-comment
echo x - pcsc-tools/pkg-descr
sed 's/^X//' >pcsc-tools/pkg-descr << 'END-of-pcsc-tools/pkg-descr'
XThese tools are used to test a PC/SC driver, card or reader or send
Xcommands in a friendly environment (text or graphical user interface).
X
X* pcsc_scan(1) - Regularly scans every PC/SC reader connected to the
Xhost if a card is inserted or removed a "line" is printed.
X
X* TR_analysis(1) - Perl script used to parse the smart card ATR. This
Xscript is called (by default) by pcsc_scan. This code was originally
Xwritten by Christophe in August 2000 for Perl wrapper using "TLP
Xdriver" (and not PC/SC) to access the smartcard.
X
X* smartcard_list.txt - This list contains ATR of some cards. The list is
Xused by ATR_analysis to find a card model corresponding to the ATR. 
X
X* scriptor(1) - Perl script to send commands to a smart card using a batch
Xfile or stdin.
X* gscriptor(1) - The same idea as scriptor.pl(1) but with Perl-Gtk GUI.
X
XWWW: http://ludovic.rousseau.free.fr/softwares/pcsc-tools/pcsc-tools.html
X
XBruce
Xbms@spc.org
END-of-pcsc-tools/pkg-descr
echo x - pcsc-tools/pkg-plist
sed 's/^X//' >pcsc-tools/pkg-plist << 'END-of-pcsc-tools/pkg-plist'
Xbin/pcsc_scan
Xbin/scriptor
Xbin/ATR_analysis
Xshare/doc/pcsc-tools/smartcard_list.txt 
END-of-pcsc-tools/pkg-plist
echo x - pcsc-tools/Makefile
sed 's/^X//' >pcsc-tools/Makefile << 'END-of-pcsc-tools/Makefile'
X# New ports collection makefile for:	pcsc-tools
X# Date created:		30 August 2002
X# Whom:			Bruce M Simpson
X#
X# $FreeBSD$
X#
X
XPORTNAME=	pcsc-tools
XPORTVERSION=	1.2.1
XCATEGORIES=	security devel
XMASTER_SITES=	http://ludovic.rousseau.free.fr/softwares/pcsc-tools/
X
XMAINTAINER=	bms@spc.org
X
XLIB_DEPENDS=	pcsclite.0:${PORTSDIR}/devel/pcsc-lite
XRUN_DEPENDS+=	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/PCSC.pm:${PORTSDIR}/devel/p5-PCSC-Card
X.if defined(USE_GTK_PERL)
XRUN_DEPENDS+=	${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Gtk.pm:${PORTSDIR}/x11-toolkits/p5-Gtk
X.endif
X
XMAKE_ENV+=	PREFIX="${PREFIX}"
X
XUSE_GMAKE=	yes
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/pcsc_scan ${PREFIX}/bin
X	${INSTALL_SCRIPT} ${WRKSRC}/scriptor ${PREFIX}/bin
X	${INSTALL_SCRIPT} ${WRKSRC}/ATR_analysis ${PREFIX}/bin
X.if defined(USE_GTK_PERL)
X	${INSTALL_SCRIPT} ${WRKSRC}/gscriptor ${PREFIX}/bin
X.endif
X	${INSTALL_MAN} ${WRKSRC}/pcsc_scan.1 ${PREFIX}/man/man1
X	${INSTALL_MAN} ${WRKSRC}/scriptor.1p ${PREFIX}/man/man1
X	${INSTALL_MAN} ${WRKSRC}/ATR_analysis.1p ${PREFIX}/man/man1
X.if defined(USE_GTK_PERL)
X	${INSTALL_MAN} ${WRKSRC}/gscriptor.1p ${PREFIX}/man/man1
X.endif
X	${INSTALL} -d -m 0755 ${_SHROWNGRP} ${PREFIX}/share/doc/pcsc-tools
X	${INSTALL_DATA} ${WRKSRC}/smartcard_list.txt ${PREFIX}/share/doc/pcsc-tools
X
XMAN1=	pcsc_scan.1 scriptor.1p ATR_analysis.1p
X
XMANCOMPRESSED=	no
X
X.if defined(USE_GTK_PERL)
XMAN1+=	gscriptor.1p
X.endif
X
X#BROKEN=	requires perl 5.6.0 or newer, may need to be rewritten...
X
X.include <bsd.port.mk>
END-of-pcsc-tools/Makefile
exit
--- pcsc-tools.shar ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020912155507.98F829713>