summaryrefslogtreecommitdiff
path: root/package/pcsc-lite
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-05-16 13:15:00 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2010-05-16 13:15:00 +0200
commit8a325b2af866300353e500e9693fc08991df52b7 (patch)
tree9edad7622e05f93ad702931a327c779a0a1e996a /package/pcsc-lite
parent04d3f4ea9953ed01898d336c4b175273b457394c (diff)
add preliminary support for my pcmcia smartcard reader
Diffstat (limited to 'package/pcsc-lite')
-rw-r--r--package/pcsc-lite/Makefile36
-rw-r--r--package/pcsc-lite/files/pcscd.init27
-rw-r--r--package/pcsc-lite/files/pcscd.postinst3
-rw-r--r--package/pcsc-lite/files/reader.conf16
4 files changed, 82 insertions, 0 deletions
diff --git a/package/pcsc-lite/Makefile b/package/pcsc-lite/Makefile
new file mode 100644
index 000000000..b81a64d27
--- /dev/null
+++ b/package/pcsc-lite/Makefile
@@ -0,0 +1,36 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= pcsc-lite
+PKG_VERSION:= 1.6.0
+PKG_RELEASE:= 1
+PKG_MD5SUM:= fc3fd0e83090ecc81e5b32700fa246c2
+PKG_DESCR:= middleware for smartcards
+PKG_SECTION:= security
+PKG_BUILDDEP+= libusb libusb-compat
+PKG_DEPENDS:= libusb libusb-compat libpthread ccid
+PKG_URL:= http://pcsclite.alioth.debian.org/
+PKG_SITES:= https://alioth.debian.org/frs/download.php/3279/
+
+DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,PCSC_LITE,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIGURE_ARGS+= --disable-libhal
+
+post-install:
+ $(INSTALL_DIR) $(IDIR_PCSC_LITE)/etc
+ $(INSTALL_DIR) $(IDIR_PCSC_LITE)/usr/sbin
+ $(INSTALL_DIR) $(IDIR_PCSC_LITE)/usr/lib
+ $(INSTALL_DATA) ./files/reader.conf \
+ $(IDIR_PCSC_LITE)/etc
+ $(INSTALL_BIN) $(WRKINST)/usr/sbin/pcscd \
+ $(IDIR_PCSC_LITE)/usr/sbin
+ $(CP) $(WRKINST)/usr/lib/libpcsclite.so* \
+ $(IDIR_PCSC_LITE)/usr/lib
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/pcsc-lite/files/pcscd.init b/package/pcsc-lite/files/pcscd.init
new file mode 100644
index 000000000..557762eca
--- /dev/null
+++ b/package/pcsc-lite/files/pcscd.init
@@ -0,0 +1,27 @@
+#!/bin/sh
+#PKG pcscd
+#INIT 80
+
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${pcscd:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ pcscd
+ ;;
+stop)
+ pkill pcscd
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "usage: $0 {start | stop | restart}"
+ ;;
+esac
+exit $?
diff --git a/package/pcsc-lite/files/pcscd.postinst b/package/pcsc-lite/files/pcscd.postinst
new file mode 100644
index 000000000..1b27f479d
--- /dev/null
+++ b/package/pcsc-lite/files/pcscd.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf pcscd pcscd NO
diff --git a/package/pcsc-lite/files/reader.conf b/package/pcsc-lite/files/reader.conf
new file mode 100644
index 000000000..f56f290fb
--- /dev/null
+++ b/package/pcsc-lite/files/reader.conf
@@ -0,0 +1,16 @@
+# FRIENDLYNAME Any name
+# DEVICENAME device filename used by the reader:
+# /dev/ttyS0 for the first serial port
+# or /dev/null if this is not used by the driver
+# LIBPATH Location of the driver library for your reader
+# CHANNELID
+# 0x0103F8 or 1 for /dev/ttyS0 (COM1)
+# 0x0102F8 or 2 for /dev/ttyS1 (COM2)
+# 0x0103E8 or 3 for /dev/ttyS2 (COM3)
+# 0x0102E8 or 4 for /dev/ttyS3 (COM4)
+#
+
+FRIENDLYNAME "GemPCTwin serial"
+DEVICENAME /dev/ttyS0
+LIBPATH /usr/pcsc/drivers/serial/libccidtwin.so
+CHANNELID 0