debian/0000755000000000000000000000000011620043762007167 5ustar debian/libacr38ucontrol0.symbols0000644000000000000000000000012111620043665014052 0ustar libacr38ucontrol.so.0 libacr38ucontrol0 #MINVER# ACS38DrvSetCardType@Base 1.7.9 debian/libacr38ucontrol-dev.install0000644000000000000000000000020511620043665014527 0ustar debian/tmp/usr/include/* debian/tmp/usr/lib/pkgconfig/* debian/tmp/usr/lib/libacr38ucontrol.a debian/tmp/usr/lib/libacr38ucontrol.so debian/changelog0000644000000000000000000000774211620043665011055 0ustar acr38 (1.7.11-1) unstable; urgency=low * New upstream release * debian/control: Bump Standards-Version to 3.9.2 (no further changes) * debian/rules: - Use DEB_DH_INSTALLUDEV_ARGS_libacr38u instead of DEB_DH_INSTALLUDEV_ARGS - Do not add shlibs file for the pcsc driver * debian/patches/0003-Also-check-usbfs-under-dev.patch: Refresh patch, file encoding changed from dos to unix * debian/patches/0004-Fix-driver-name-in-Info.plist.patch: Refreshed * debian/patches/0005-Remove-dont-build-old-USB-stack.patch: Dropped * debian/libacr38u.udev: Add udev rule for ACS ACR38U-SAM * debian/libacr38ucontrol-dev.install: Fix brace-expansion-in-debhelper-config-file to please lintian -- Laurent Bigonville Mon, 08 Aug 2011 22:31:43 +0200 acr38 (1.7.10-2) unstable; urgency=low * debian/libacr38ucontrol-dev.install: Don't ship .la file anymore * Switch to dpkg-source 3.0 (quilt) format * debian/rules: - Use autoreconf.mk instead of old cdbs way * debian/control: - Build-dep against dh-autoreconf instead of autoconf/make - Bump Standards-Version to 3.9.1 (no further changes) * debian/libacr38u.udev: Add udev rules to add device to pcscd group -- Laurent Bigonville Tue, 29 Mar 2011 22:36:09 +0200 acr38 (1.7.10-1) unstable; urgency=low * New upstream release: - Add libusb-dev to build-deps - Update patches * debian/control: - Fix libpcsclite-dev minimal version - Bump Standards-Version to 3.8.3 * Bump automake version to 1.11 * debian/patches/0005-Remove-dont-build-old-USB-stack.patch: Do not compile USB stack used before libusb. * Remove debian/source.lintian-overrides: Not needed anymore * Add libacr38ucontrol0.symbols file -- Laurent Bigonville Thu, 15 Oct 2009 11:29:12 +0200 acr38 (1.7.9+pristine-1) unstable; urgency=low * Get rid of the tarball-in-tarball thing - Remove unneccesary distclean rule * debian/control: - Use new Homepage field instead of old pseudo-field - Use now official Vcs-* field - Bump Standards-Version to 3.8.1 (no further changes) - Make the libacr38ucontrol0 description more understandable. - Use my debian.org address in Maintainer - Add ${misc:Depends} to libacr38ucontrol-dev to please lintian - Cleanup duplicates sections to please lintian * debian/copyright: Fix copyright information * Rebuild autofoo scripts at build time to prevent FTBFS (Closes: #527813) * Bump debhelper version to 7 * Move packaging to git - Add gbp.conf (for git-buildpackage) and `debian/rules update-patches` target * Regenerate patches -- Laurent Bigonville Tue, 12 May 2009 16:27:47 +0200 acr38 (1.7.9-3) unstable; urgency=low * debian/control: - Add XS-Vcs informations. - Add Homepage field. - Use ${binary:Version} for versionized dependencies (Thanks to Lior Kaplan ) (Closes: #430475) -- Laurent Bigonville Fri, 27 Jul 2007 03:26:37 +0200 acr38 (1.7.9-2) unstable; urgency=low * Call restart instead of restart-if-running for restarting pcscd since it disapears without warning. -- Laurent Bigonville Wed, 28 Feb 2007 15:59:32 +0100 acr38 (1.7.9-1) unstable; urgency=low * New upstream release. - Fix usbfs patch. -- Laurent Bigonville Fri, 27 Oct 2006 16:14:52 +0200 acr38 (1.7.6-3) unstable; urgency=low * src/driver/usblinux.c: Add some code from libusb to auto-detect usbfs path. -- Laurent Bigonville Thu, 20 Jul 2006 12:25:27 +0200 acr38 (1.7.6-2) unstable; urgency=low * debian/patches/01controlmake.diff: link libacr38ucontrol0 against libpcsclite. * debian/control: Remove the version for the pcscd dependency. -- Laurent Bigonville Thu, 6 Jul 2006 17:16:16 +0200 acr38 (1.7.6-1) unstable; urgency=low * Initial release. (Closes: #355415) -- Laurent Bigonville Sat, 27 May 2006 17:40:08 +0200 debian/compat0000644000000000000000000000000211620043665010367 0ustar 7 debian/libacr38u.install0000644000000000000000000000023311620043665012353 0ustar debian/tmp/usr/lib/pcsc/drivers/ACR38UDriver.bundle/Contents/Linux/ACR38UDriver.so debian/tmp/usr/lib/pcsc/drivers/ACR38UDriver.bundle/Contents/Info.plist debian/libacr38u.postrm0000644000000000000000000000202011620043665012225 0ustar #! /bin/sh # postrm script for acr38 # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' overwrit>r> # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in remove) if [ -x /etc/init.d/pcscd ] then invoke-rc.d pcscd restart 3>/dev/null fi ;; purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/libacr38u.udev0000644000000000000000000000106511620043665011654 0ustar # udev rules to set the access rights of ACS smart card readers # so they can be used by pcscd # If not adding the device, go away ACTION!="add", GOTO="pcscd_acr38_rules_end" SUBSYSTEM!="usb", GOTO="pcscd_acr38_rules_end" ENV{DEVTYPE}!="usb_device", GOTO="pcscd_acr38_rules_end" # ACS ACR38U ATTRS{idVendor}=="072f", ATTRS{idProduct}=="9000", GROUP="pcscd" # ACS ACR38U-SAM ATTRS{idVendor}=="072f", ATTRS{idProduct}=="90CF", GROUP="pcscd" # ACS CryptoMate ATTRS{idVendor}=="072f", ATTRS{idProduct}=="9006", GROUP="pcscd" # All done LABEL="pcscd_acr38_rules_end" debian/libacr38u.postinst0000644000000000000000000000201211620043665012565 0ustar #! /bin/sh # postinst script for acr38 # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package # case "$1" in configure) if [ -x /etc/init.d/pcscd ] then invoke-rc.d pcscd restart 3> /dev/null fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/update-patches.mk0000644000000000000000000000055411620043665012435 0ustar update-patches: mkdir -p $(CURDIR)/debian/patches rm -f $(CURDIR)/debian/patches/*.patch git format-patch -o $(CURDIR)/debian/patches debian-patches ^upstream for patch in $$(ls $(CURDIR)/debian/patches/*.patch) ; \ do \ lines=$$(cat $$patch | wc -l) ; \ head -n $$(($$lines - 3)) $$patch > $${patch}.chomped ; \ mv $${patch}.chomped $$patch ; \ done debian/patches/0000755000000000000000000000000011620043665010620 5ustar debian/patches/0001-Link-libacr38ucontrol-against-libpcsclite.patch0000644000000000000000000000135711620043665022234 0ustar From 5fe7538154c2fccddf84ff2f886dc9f867aaafb0 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 12 May 2009 16:15:28 +0200 Subject: [PATCH 1/5] Link libacr38ucontrol against libpcsclite --- src/controllib/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/controllib/Makefile.am b/src/controllib/Makefile.am index 5b79923..f3d9d22 100644 --- a/src/controllib/Makefile.am +++ b/src/controllib/Makefile.am @@ -17,6 +17,7 @@ SRC_CONTROLLIB = ACS38DrvTools.c \ libacr38ucontrol_la_SOURCES = $(SRC_CONTROLLIB) libacr38ucontrol_la_CFLAGS = `pkg-config libpcsclite --cflags` +libacr38ucontrol_la_LIBADD = @LIBPCSCLITE@ #pcdir= $(PKG_PCSC_CONFIG_PATH) pcdir= @prefix@/lib/pkgconfig debian/patches/0003-Also-check-usbfs-under-dev.patch0000644000000000000000000000463711620043665017213 0ustar From 9c49e1cca7856a47624c0f7c8b171541b0cbc35d Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 12 May 2009 16:17:31 +0200 Subject: [PATCH 3/5] Also check usbfs under /dev --- src/driver/usblinux.c | 52 +++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 44 insertions(+), 8 deletions(-) diff --git a/src/driver/usblinux.c b/src/driver/usblinux.c index 5e72a98..e6c4456 100644 --- a/src/driver/usblinux.c +++ b/src/driver/usblinux.c @@ -17,23 +17,33 @@ #include #include "config.h" -#define PCSCLITE_USB_PATH "/proc/bus/usb" - +#define PCSCLITE_USB_PATH "/proc/bus/usb" +#define UDEV_USB_PATH "/dev/bus/usb" + +static int check_usb_vfs(const char *dirname); int open_linux_usb_dev ( unsigned int manuID, unsigned int prodID, unsigned int lunNum ) { DIR *dir, *dirB; struct dirent *entry, *entryB; - char dirpath[150]; + char dirpath[150]; + char dirbase[150]; unsigned int skip = lunNum; struct usb_device_descriptor usbDescriptor; - dir = opendir(PCSCLITE_USB_PATH); - if (!dir) - { - printf("Cannot Open USB Path Directory\n"); + if (check_usb_vfs(UDEV_USB_PATH)) { + dir = opendir(UDEV_USB_PATH); + strcpy(dirbase, UDEV_USB_PATH); + } + else if (check_usb_vfs(PCSCLITE_USB_PATH)) { + dir = opendir(PCSCLITE_USB_PATH); + strcpy(dirbase, PCSCLITE_USB_PATH); + } + else { + printf("Cannot Open USB Path Directory\n"); + return -1; } @@ -48,7 +58,7 @@ int open_linux_usb_dev ( unsigned int manuID, unsigned int prodID, unsigned int continue; } - sprintf(dirpath, "%s/%s", PCSCLITE_USB_PATH, entry->d_name); + sprintf(dirpath, "%s/%s", dirbase, entry->d_name); dirB = opendir(dirpath); @@ -175,3 +185,29 @@ int bulk_linux_usb_dev( int fd, int pipeNum, unsigned char *buffer, return ret; } + +/* Code from libusb to detect if usbfs path is valid */ +static int check_usb_vfs(const char *dirname) +{ + DIR *dir; + struct dirent *entry; + int found = 0; + + dir = opendir(dirname); + if (!dir) + return 0; + + while ((entry = readdir(dir)) != NULL) { + /* Skip anything starting with a . */ + if (entry->d_name[0] == '.') + continue; + + /* We assume if we find any files that it must be the right place */ + found = 1; + break; + } + + closedir(dir); + + return found; +} debian/patches/0002-Install-files-in-DESTDIR.patch0000644000000000000000000000263511620043665016434 0ustar From dae9a8ceba2c8c17655a18923c1b29bc87270ced Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 12 May 2009 16:16:39 +0200 Subject: [PATCH 2/5] Install files in $(DESTDIR) --- src/driver/Makefile.am | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/driver/Makefile.am b/src/driver/Makefile.am index 97e53b5..118d392 100644 --- a/src/driver/Makefile.am +++ b/src/driver/Makefile.am @@ -41,10 +41,10 @@ libACR38UDriver_la_SOURCES = $(SRC_DRV) $(SRC_USB) libACR38UDriver_la_LIBADD = @LIBPCSCLITE@ @LIBUSB@ @COREFOUNDATION@ @IOKIT@ install: libACR38UDriver.la - $(mkinstalldirs) $(usbdropdir)/$(DRIVER_BUNDLE_DIR)/Contents/$(BUNDLE_HOST)/ - $(INSTALL) .libs/$(DRIVER_LIB_NAME) $(usbdropdir)/$(DRIVER_BUNDLE_DIR)/Contents/$(BUNDLE_HOST)/$(DRIVER_NAME) - $(INSTALL) Info.plist $(usbdropdir)/$(DRIVER_BUNDLE_DIR)/Contents -# chmod 755 $(usbdropdir)/$(DRIVER_BUNDLE_DIR)/Contents/$(BUNDLE_HOST)/$(DRIVER_LIB_NAME) + $(mkinstalldirs) $(DESTDIR)$(usbdropdir)/$(DRIVER_BUNDLE_DIR)/Contents/$(BUNDLE_HOST)/ + $(INSTALL) .libs/$(DRIVER_LIB_NAME) $(DESTDIR)$(usbdropdir)/$(DRIVER_BUNDLE_DIR)/Contents/$(BUNDLE_HOST)/$(DRIVER_NAME).$(DYN_LIB_EXT) + $(INSTALL) Info.plist $(DESTDIR)$(usbdropdir)/$(DRIVER_BUNDLE_DIR)/Contents +# chmod 755 $(DESTDIR)$(usbdropdir)/$(DRIVER_BUNDLE_DIR)/Contents/$(BUNDLE_HOST)/$(DRIVER_LIB_NAME) uninstall: rm -rf $(usbdropdir)/$(DRIVER_BUNDLE_DIR) debian/patches/0004-Fix-driver-name-in-Info.plist.patch0000644000000000000000000000110311620043665017601 0ustar From 026195b308a3e04ab0781a34f4fbfe73eb7d6faa Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 12 May 2009 16:18:24 +0200 Subject: [PATCH 4/5] Fix driver name in Info.plist --- src/driver/Info.plist | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- a/src/driver/Info.plist +++ b/src/driver/Info.plist @@ -20,7 +20,7 @@ 0x00000001 CFBundleExecutable - ACR38UDriver + ACR38UDriver.so ifdManufacturerString Advanced Card Systems Ltd. debian/patches/series0000644000000000000000000000025011620043665012032 0ustar 0001-Link-libacr38ucontrol-against-libpcsclite.patch 0002-Install-files-in-DESTDIR.patch 0003-Also-check-usbfs-under-dev.patch 0004-Fix-driver-name-in-Info.plist.patch debian/libacr38ucontrol0.install0000644000000000000000000000005111620043665014032 0ustar debian/tmp/usr/lib/libacr38ucontrol.so.* debian/gbp.conf0000644000000000000000000000023311620043665010606 0ustar [DEFAULT] debian-branch = debian upstream-branch = upstream pristine-tar = True [git-buildpackage] tarball-dir = ../tarballs/ export-dir = ../build-area/ debian/copyright0000644000000000000000000000234311620043665011126 0ustar This package was debianized by Laurent Bigonville on Sat, 20 May 2006 03:36:56 +0200. It was downloaded from http://www.acs.com.hk/DriversManual.asp?PID=59 Copyright Holders: Copyright © 2003 Jean-Luc Giraud Copyright © 1999-2004 David Corcoran Copyright © 1999-2004 Damien Sauveron License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU Lesser General Public License can be found in `/usr/share/common-licenses/LGPL'. debian/source/0000755000000000000000000000000011620043665010471 5ustar debian/source/format0000644000000000000000000000001411620043665011677 0ustar 3.0 (quilt) debian/control0000644000000000000000000000314711620043665010601 0ustar Source: acr38 Section: misc Priority: extra Maintainer: Laurent Bigonville Build-Depends: cdbs, debhelper (>= 7), dh-autoreconf, libpcsclite-dev (>= 1.2.0), libusb-dev (>= 0.1.12), pkg-config Standards-Version: 3.9.2 Vcs-Git: git://git.debian.org/git/collab-maint/acr38.git Vcs-Browser: http://git.debian.org/?p=collab-maint/acr38.git Homepage: http://www.acs.com.hk/ Package: libacr38u Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: pcscd Provides: pcsc-ifd-handler Description: PC/SC driver for the ACR38U smart card reader This library provides a PC/SC IFD handler implementation for the ACS ACR38U smart card readers. This driver is for the non-CCID version only. . This package is needed to communicate with the ACR38U smartcard readers through the PC/SC Lite resource manager (pcscd). Package: libacr38ucontrol0 Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: libacr38u (= ${binary:Version}) Description: Library for operational mode for ACR38U smartcard reader This library sets the operational mode for a ACR38U smartcard reader to either processor or memory card. Package: libacr38ucontrol-dev Section: libdevel Architecture: any Depends: libacr38ucontrol0 (= ${binary:Version}), libpcsclite-dev, ${misc:Depends} Description: Library for operational mode for ACR38U smartcard reader dev files This library sets the operational mode for a ACR38U smartcard reader to either processor or memory card. . This package contains development files. debian/rules0000755000000000000000000000066011620043665010253 0ustar #!/usr/bin/make -f include /usr/share/cdbs/1/rules/autoreconf.mk include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk DEB_DH_MAKESHLIBS_ARGS_libacr38u := -n -Xusr/lib/pcsc/drivers/ DEB_DH_INSTALLUDEV_ARGS_libacr38u := --priority=92 binary-install/libacr38u:: chmod 644 debian/libacr38u/usr/lib/pcsc/drivers/ACR38UDriver.bundle/Contents/Info.plist include $(CURDIR)/debian/update-patches.mk