diff options
-rw-r--r-- | security/openct/Makefile | 51 | ||||
-rw-r--r-- | security/openct/distinfo | 6 | ||||
-rw-r--r-- | security/openct/files/etoken.conf.in | 13 | ||||
-rw-r--r-- | security/openct/files/openct.in | 48 | ||||
-rw-r--r-- | security/openct/files/patch-src_ct_Makefile.in | 14 | ||||
-rw-r--r-- | security/openct/pkg-descr | 26 | ||||
-rw-r--r-- | security/openct/pkg-message | 9 | ||||
-rw-r--r-- | security/openct/pkg-plist | 48 |
8 files changed, 118 insertions, 97 deletions
diff --git a/security/openct/Makefile b/security/openct/Makefile index ac119f97f70b..029fac1ce3b3 100644 --- a/security/openct/Makefile +++ b/security/openct/Makefile @@ -6,49 +6,54 @@ # PORTNAME= openct -PORTVERSION= 0.6.6 -PORTREVISION= 1 +PORTVERSION= 0.6.7 CATEGORIES= security -MASTER_SITES= http://www.opensc-project.org/files/openct/ +MASTER_SITES= http://www.opensc-project.org/files/${PORTNAME}/ -MAINTAINER= janos.mohacsi@bsd.hu +MAINTAINER= ale@FreeBSD.org COMMENT= A middleware framework for smart card terminals +OPTIONS= USB "Install libusb for USB tokens/readers support" on \ + PCSC "Install pcsc-lite to build the PC/SC -> openCT frontend" off + USE_AUTOTOOLS= libltdl:15 GNU_CONFIGURE= yes USE_GMAKE= yes -USE_GNOME= pkgconfig +USE_GNOME= gnomehack pkgconfig INSTALLS_SHLIB= yes +USE_RC_SUBR= openct +SUB_FILES= etoken.conf -CONFIGURE_ENV= CFLAGS="-I${LOCALBASE}/include -L${LOCALBASE}/lib" +CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib" MAN1= openct-tool.1 -DOC_FILES= README export-wiki.sh export-wiki.xsl ${HTML_FILES} +DOC_FILES= README export-wiki.sh export-wiki.xsl trac.css *.html api + +PORTDOCS= * -HTML_FILES= AuthorsAndCredits.html DevelopmentPolicy.html FilesTools.html \ - LicenseText.html MailingLists.html OperatingSystems.html \ - OverView.html QuickStart.html RemoteAccess.html \ - ResourcesLinks.html SecureSetup.html \ - TroubleShooting.html cardman.html ccid.html egate.html \ - etoken.html eutron.html gempc.html ikey2032.html \ - ikey3000.html index.html kaan.html pertosmart1030.html smartboard.html \ - towitoko.html trac.css +.include <bsd.port.pre.mk> + +.if !defined(WITHOUT_USB) || exists(${LOCALBASE}/lib/libusb-0.1.so) +LIB_DEPENDS+= usb-0.1.8:${PORTSDIR}/devel/libusb +.endif -.if !defined(WITHOUT_PCSC_LITE) +.if defined(WITH_PCSC) || exists(${LOCALBASE}/lib/libpcsclite.so) LIB_DEPENDS+= pcsclite.1:${PORTSDIR}/devel/pcsc-lite +PLIST_SUB+= PCSC="" +.else +PLIST_SUB+= PCSC="@comment " .endif post-install: - #run files - ${MKDIR} /var/run/${PORTNAME} - #sample config file ${INSTALL_DATA} ${WRKSRC}/etc/openct.conf ${PREFIX}/etc/openct.conf-sample - #start daemons script - ${INSTALL_SCRIPT} ${WRKSRC}/etc/init-script ${PREFIX}/etc/rc.d/openct.sh + @${MKDIR} ${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKDIR}/etoken.conf ${EXAMPLESDIR} .ifndef(NOPORTDOCS) @${MKDIR} ${DOCSDIR} - cd ${WRKSRC}/doc && ${INSTALL_DATA} ${DOC_FILES} ${DOCSDIR} + @(cd ${WRKSRC}/doc && ${CP} -R ${DOC_FILES} ${DOCSDIR}) .endif + @${CAT} ${PKGMESSAGE} -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/security/openct/distinfo b/security/openct/distinfo index 7cf540982abe..f3b69051f8c8 100644 --- a/security/openct/distinfo +++ b/security/openct/distinfo @@ -1,3 +1,3 @@ -MD5 (openct-0.6.6.tar.gz) = a9de3bef8e5e2827b8d72a2a50d0bc66 -SHA256 (openct-0.6.6.tar.gz) = 73b57ac842a30b40507de2e2cad20efb84fcaf3aae49823dd96f2eaaec54132c -SIZE (openct-0.6.6.tar.gz) = 563890 +MD5 (openct-0.6.7.tar.gz) = 1b33d319f364acafbcf130d7ba34ea4c +SHA256 (openct-0.6.7.tar.gz) = 454079f49642590b1fd7cf06525e242137253c09ee3fdc8a0262beca48059886 +SIZE (openct-0.6.7.tar.gz) = 658443 diff --git a/security/openct/files/etoken.conf.in b/security/openct/files/etoken.conf.in new file mode 100644 index 000000000000..b7a30f392032 --- /dev/null +++ b/security/openct/files/etoken.conf.in @@ -0,0 +1,13 @@ +# Aladdin eToken PRO USB crypto token +attach 100 { + device-name "ugen[0-9]+"; + match "vendor" "0x0529"; + match "product" "0x0514"; + action "%%PREFIX%%/sbin/openct-control attach /dev/$device-name usb:529/514"; +}; +detach 100 { + device-name "ugen[0-9]+"; + match "vendor" "0x0529"; + match "product" "0x0514"; + action "/usr/bin/pkill -fx '%%PREFIX%%/sbin/ifdhandler -H [a-z0-9]+ /dev/$device-name'"; +}; diff --git a/security/openct/files/openct.in b/security/openct/files/openct.in new file mode 100644 index 000000000000..2d2969384338 --- /dev/null +++ b/security/openct/files/openct.in @@ -0,0 +1,48 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: openct +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable openct: +# openct_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable OpenCT. +# + +. %%RC_SUBR%% + +name="openct" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${openct_enable="NO"} + +openct_rundir="/var/run/openct" +command="%%PREFIX%%/sbin/openct-control" +command_args="init" +start_precmd="${name}_prestart" +stop_cmd="${name}_stop" +required_files="%%PREFIX%%/etc/openct.conf" + +openct_prestart() +{ + if [ ! -d "${openct_rundir}/." ]; then + /bin/mkdir ${openct_rundir} + fi +} + +openct_stop() +{ + if [ -f "${openct_rundir}/status" ]; then + ${command} shutdown > /dev/null + /bin/rm ${openct_rundir}/status + fi +} + +run_rc_command "$1" diff --git a/security/openct/files/patch-src_ct_Makefile.in b/security/openct/files/patch-src_ct_Makefile.in deleted file mode 100644 index ecd143726c19..000000000000 --- a/security/openct/files/patch-src_ct_Makefile.in +++ /dev/null @@ -1,14 +0,0 @@ - -$FreeBSD$ - ---- src/ct/Makefile.in.orig -+++ src/ct/Makefile.in -@@ -215,7 +215,7 @@ - socket.c status.c tlv.c - - libopenct_la_LDFLAGS = -version-info @OPENCT_LT_CURRENT@:@OPENCT_LT_REVISION@:@OPENCT_LT_AGE@ --pkgconfigdir = $(libdir)/pkgconfig -+pkgconfigdir = @prefix@/libdata/pkgconfig - pkgconfig_DATA = libopenct.pc - all: all-am - diff --git a/security/openct/pkg-descr b/security/openct/pkg-descr index 6a3bf759569d..bcc86603faf6 100644 --- a/security/openct/pkg-descr +++ b/security/openct/pkg-descr @@ -1,19 +1,13 @@ -OpenCT, a middleware framework for smart card terminals. -It all started with a reader driver library to provide a framework for people -writing drivers for smart card readers. The idea was to provide all the usual -stuff (T=0, T=1, serial vs. USB device handling, etc) in a single place, and -reduce driver writing to interaction with the device itself. +OpenCT is a middleware framework for smart card terminals. -OpenCT provides a native OpenCT, CT-API and PC/SC Lite IFD interface with an -OpenCT ifdhandler resource manager. +OpenCT implements drivers for several smart card readers. +It comes as driver in ifdhandler format for PC/SC-Lite, +as CT-API driver, or as a small and lean middleware, so +applications can use it with minimal overhead. +OpenCT also has a primitive mechanism to export smart card +readers to remote machines via tcp/ip. -OpenCT is an open source implementation providing card terminal drivers: -Towitoko CHIPDRIVE micro - serial interface reader -KOBIL KAAN Professional - serial interface reader -Schlumberger e-gate - USB token / smart card reader -Aladdin eToken PRO - USB crypto Token -Eutron CryptoIdentity IT-SEC - A USB crypto Token -Rainbow iKey 3000 - USB crypto Token -OMNIKEY CardMan - UDB smart card reader +WWW: http://www.opensc-project.org/openct/ -WWW: http://www.opensc-project.org/ +- Alex Dupre +ale@FreeBSD.org diff --git a/security/openct/pkg-message b/security/openct/pkg-message new file mode 100644 index 000000000000..2cab6b7679c7 --- /dev/null +++ b/security/openct/pkg-message @@ -0,0 +1,9 @@ +******************************************************** +Before using OpenCT, you should create the configuration +file, by copying the installed sample. + +To enable hot-plug support for your USB reader/token, +you need a devd enabled system. A configuration sample +for the Aladdin eToken PRO crypto token has been put +in the examples directory. +******************************************************** diff --git a/security/openct/pkg-plist b/security/openct/pkg-plist index 44cf3c5732d5..99b435c240f4 100644 --- a/security/openct/pkg-plist +++ b/security/openct/pkg-plist @@ -1,5 +1,4 @@ bin/openct-tool -etc/rc.d/openct.sh etc/openct.conf-sample include/openct/apdu.h include/openct/buffer.h @@ -10,6 +9,7 @@ include/openct/error.h include/openct/ifd.h include/openct/logging.h include/openct/openct.h +include/openct/path.h include/openct/protocol.h include/openct/server.h include/openct/socket.h @@ -23,47 +23,13 @@ lib/libopenct.so.1 lib/libopenctapi.a lib/libopenctapi.la lib/libopenctapi.so -lib/openct-ifd.a -lib/openct-ifd.la -lib/openct-ifd.so -lib/openct-ifd.bundle/Contents/FreeBSD/openct-ifd.so -lib/openct-ifd.bundle/Contents/PkgInfo -lib/openct-ifd.bundle/Contents/Info.plist +%%PCSC%%lib/openct-ifd.a +%%PCSC%%lib/openct-ifd.la +%%PCSC%%lib/openct-ifd.so libdata/pkgconfig/libopenct.pc sbin/ifdhandler sbin/ifdproxy sbin/openct-control -@dirrm include/openct/ -@dirrm lib/openct-ifd.bundle/Contents/FreeBSD/ -@dirrm lib/openct-ifd.bundle/Contents/ -@dirrm lib/openct-ifd.bundle/ -%%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%%%DOCSDIR%%/export-wiki.sh -%%PORTDOCS%%%%DOCSDIR%%/export-wiki.xsl -%%PORTDOCS%%%%DOCSDIR%%/AuthorsAndCredits.html -%%PORTDOCS%%%%DOCSDIR%%/DevelopmentPolicy.html -%%PORTDOCS%%%%DOCSDIR%%/FilesTools.html -%%PORTDOCS%%%%DOCSDIR%%/LicenseText.html -%%PORTDOCS%%%%DOCSDIR%%/MailingLists.html -%%PORTDOCS%%%%DOCSDIR%%/OperatingSystems.html -%%PORTDOCS%%%%DOCSDIR%%/OverView.html -%%PORTDOCS%%%%DOCSDIR%%/QuickStart.html -%%PORTDOCS%%%%DOCSDIR%%/RemoteAccess.html -%%PORTDOCS%%%%DOCSDIR%%/ResourcesLinks.html -%%PORTDOCS%%%%DOCSDIR%%/SecureSetup.html -%%PORTDOCS%%%%DOCSDIR%%/TroubleShooting.html -%%PORTDOCS%%%%DOCSDIR%%/cardman.html -%%PORTDOCS%%%%DOCSDIR%%/ccid.html -%%PORTDOCS%%%%DOCSDIR%%/egate.html -%%PORTDOCS%%%%DOCSDIR%%/etoken.html -%%PORTDOCS%%%%DOCSDIR%%/eutron.html -%%PORTDOCS%%%%DOCSDIR%%/gempc.html -%%PORTDOCS%%%%DOCSDIR%%/ikey2032.html -%%PORTDOCS%%%%DOCSDIR%%/ikey3000.html -%%PORTDOCS%%%%DOCSDIR%%/index.html -%%PORTDOCS%%%%DOCSDIR%%/kaan.html -%%PORTDOCS%%%%DOCSDIR%%/pertosmart1030.html -%%PORTDOCS%%%%DOCSDIR%%/smartboard.html -%%PORTDOCS%%%%DOCSDIR%%/towitoko.html -%%PORTDOCS%%%%DOCSDIR%%/trac.css -%%PORTDOCS%%@dirrm %%DOCSDIR%% +%%EXAMPLESDIR%%/etoken.conf +@dirrm include/openct +@dirrm %%EXAMPLESDIR%% |