From 3622588a2aef69aaef517ff24171ef7854160e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 29 Dec 2010 13:24:11 +0100 Subject: [PATCH] Install driver as bundle Explicit reader.conf configuration does not work since pcsc-lite-1.6. Use modern bundle configuration instead. --- Info.plist | 31 +++++++++++++++++++++++++++++++ Makefile | 10 ++++++---- configure | 1 + etc/reader.conf.in | 4 ++-- 4 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 Info.plist diff --git a/Info.plist b/Info.plist new file mode 100644 index 0000000..beed195 --- /dev/null +++ b/Info.plist @@ -0,0 +1,31 @@ + + ifdVendorID + + 0x0DC3 + 0x0DC3 + + + ifdProductID + + 0x1701 + 0x1702 + + + ifdFriendlyName + + ASEKey + ASEKey + + + CFBundleExecutable + + libASEKey.so + libASEKey.so + + + ifdCapabilities + + 0x0000000 + 0x0000000 + + diff --git a/Makefile b/Makefile index 2aad87c..0d2566e 100755 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ include Makefile.inc -DRIVER_DIR=${DESTDIR}/${USBDROPDIR}/ifd-ASEKey +DRIVER_DIR=${DESTDIR}/${USBDROPDIR}/ifd-ASEKey.bundle CC=${BUILD}-gcc @@ -15,7 +15,8 @@ libASEKey.so: ${SOURCES} etc: etc/reader.conf etc/reader.conf: etc/reader.conf.in - sed "s#\%PCSC_DRIVERS_DIR\%#${USBDROPDIR}#g" < etc/reader.conf.in > etc/reader.conf + sed "s#\%PCSC_DRIVERS_DIR\%#${USBDROPDIR}#g; s#\%KERNEL_NAME\%#${KERNEL_NAME}#g" \ + < etc/reader.conf.in > etc/reader.conf clean-all: clean rm Makefile.inc || true @@ -25,5 +26,6 @@ clean: rm etc/reader.conf || true install: all - install -c -d "${DRIVER_DIR}" - install -c -m 0755 libASEKey.so "${DRIVER_DIR}" + install -c -d "${DRIVER_DIR}/Contents/${KERNEL_NAME}" + install -c -m 0644 Info.plist "${DRIVER_DIR}/Contents/" + install -c -m 0755 libASEKey.so "${DRIVER_DIR}/Contents/${KERNEL_NAME}" diff --git a/configure b/configure index 7b44fa0..b21131c 100755 --- a/configure +++ b/configure @@ -71,5 +71,6 @@ echo "USBDROPDIR=${USBDROPDIR}" >> Makefile.inc echo "BUILD=${BUILD}" >> Makefile.inc echo "CFLAGS=${CFLAGS}" >> Makefile.inc echo "LDFLAGS=${LDFLAGS}" >> Makefile.inc +echo "KERNEL_NAME=$(uname)" >> Makefile.inc exit 0 diff --git a/etc/reader.conf.in b/etc/reader.conf.in index 8217f1d..89acff8 100644 --- a/etc/reader.conf.in +++ b/etc/reader.conf.in @@ -3,12 +3,12 @@ FRIENDLYNAME "ASEKey01" DEVICENAME /dev/null -LIBPATH %PCSC_DRIVERS_DIR%/ifd-ASEKey/libASEKey.so +LIBPATH %PCSC_DRIVERS_DIR%/ifd-ASEKey.bundle/Contents/%KERNEL_NAME%/libASEKey.so CHANNELID 0x1 FRIENDLYNAME "ASEKey01" DEVICENAME /dev/null -LIBPATH %PCSC_DRIVERS_DIR%/ifd-ASEKey/libASEKey.so +LIBPATH %PCSC_DRIVERS_DIR%/ifd-ASEKey.bundle/Contents/%KERNEL_NAME%/libASEKey.so CHANNELID 0x2 # End of file -- 1.7.3.4