--- acr38-1.7.9+pristine.orig/debian/rules +++ acr38-1.7.9+pristine/debian/rules @@ -0,0 +1,18 @@ +#!/usr/bin/make -f + +DEB_AUTO_UPDATE_AUTOMAKE := 1.10 +DEB_AUTO_UPDATE_ACLOCAL := 1.10 +DEB_AUTO_UPDATE_LIBTOOL := pre +DEB_AUTO_UPDATE_AUTOCONF := 2.63 +DEB_AUTO_UPDATE_AUTOHEADER := 2.63 + +DEB_DH_MAKESHLIBS_ARGS_libacr38u := -n + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk + +binary-install/libacr38u:: + chmod 644 debian/libacr38u/usr/lib/pcsc/drivers/ACR38UDriver.bundle/Contents/Info.plist + +include $(CURDIR)/debian/update-patches.mk --- acr38-1.7.9+pristine.orig/debian/source.lintian-overrides +++ acr38-1.7.9+pristine/debian/source.lintian-overrides @@ -0,0 +1,3 @@ +# Files cleaned by distclean rule +acr38 source: configure-generated-file-in-source config.status +acr38 source: configure-generated-file-in-source config.log --- acr38-1.7.9+pristine.orig/debian/libacr38ucontrol-dev.install +++ acr38-1.7.9+pristine/debian/libacr38ucontrol-dev.install @@ -0,0 +1,3 @@ +debian/tmp/usr/include/* +debian/tmp/usr/lib/pkgconfig/* +debian/tmp/usr/lib/libacr38ucontrol.{a,la,so} --- acr38-1.7.9+pristine.orig/debian/copyright +++ acr38-1.7.9+pristine/debian/copyright @@ -0,0 +1,29 @@ +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'. + --- acr38-1.7.9+pristine.orig/debian/libacr38u.install +++ acr38-1.7.9+pristine/debian/libacr38u.install @@ -0,0 +1,2 @@ +debian/tmp/usr/lib/pcsc/drivers/ACR38UDriver.bundle/Contents/Linux/ACR38UDriver.so +debian/tmp/usr/lib/pcsc/drivers/ACR38UDriver.bundle/Contents/Info.plist --- acr38-1.7.9+pristine.orig/debian/update-patches.mk +++ acr38-1.7.9+pristine/debian/update-patches.mk @@ -0,0 +1,10 @@ +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 --- acr38-1.7.9+pristine.orig/debian/libacr38ucontrol0.install +++ acr38-1.7.9+pristine/debian/libacr38ucontrol0.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/libacr38ucontrol.so.* --- acr38-1.7.9+pristine.orig/debian/changelog +++ acr38-1.7.9+pristine/debian/changelog @@ -0,0 +1,64 @@ +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 --- acr38-1.7.9+pristine.orig/debian/control +++ acr38-1.7.9+pristine/debian/control @@ -0,0 +1,41 @@ +Source: acr38 +Section: misc +Priority: extra +Maintainer: Laurent Bigonville +Build-Depends: cdbs, libpcsclite-dev (>= 1.2.9-beta9), pkg-config, debhelper (>= 7), automake1.10, autoconf, libtool +Standards-Version: 3.8.1 +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. --- acr38-1.7.9+pristine.orig/debian/libacr38u.postrm +++ acr38-1.7.9+pristine/debian/libacr38u.postrm @@ -0,0 +1,45 @@ +#! /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 --- acr38-1.7.9+pristine.orig/debian/gbp.conf +++ acr38-1.7.9+pristine/debian/gbp.conf @@ -0,0 +1,8 @@ +[DEFAULT] +debian-branch = debian +upstream-branch = upstream +pristine-tar = True + +[git-buildpackage] +tarball-dir = ../tarballs/ +export-dir = ../build-area/ --- acr38-1.7.9+pristine.orig/debian/libacr38u.postinst +++ acr38-1.7.9+pristine/debian/libacr38u.postinst @@ -0,0 +1,45 @@ +#! /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 + + --- acr38-1.7.9+pristine.orig/debian/compat +++ acr38-1.7.9+pristine/debian/compat @@ -0,0 +1 @@ +7 --- acr38-1.7.9+pristine.orig/debian/patches/0004-Fix-driver-name-in-Info.plist.patch +++ acr38-1.7.9+pristine/debian/patches/0004-Fix-driver-name-in-Info.plist.patch @@ -0,0 +1,22 @@ +From 9daf91a91b13711ce78d6456c688d590bb597163 Mon Sep 17 00:00:00 2001 +From: Laurent Bigonville +Date: Tue, 12 May 2009 16:18:24 +0200 +Subject: [PATCH 4/4] Fix driver name in Info.plist + +--- + src/driver/Info.plist | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/driver/Info.plist b/src/driver/Info.plist +index ac9f5ef..e405e64 100644 +--- a/src/driver/Info.plist ++++ b/src/driver/Info.plist +@@ -5,7 +5,7 @@ + CFBundleDevelopmentRegion + English + CFBundleExecutable +- ACR38UDriver ++ ACR38UDriver.so + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType --- acr38-1.7.9+pristine.orig/debian/patches/0003-Also-check-usbfs-under-dev.patch +++ acr38-1.7.9+pristine/debian/patches/0003-Also-check-usbfs-under-dev.patch @@ -0,0 +1,93 @@ +From c9b953837ffa9c7627b2a1bbac0d2c8eb2430148 Mon Sep 17 00:00:00 2001 +From: Laurent Bigonville +Date: Tue, 12 May 2009 16:17:31 +0200 +Subject: [PATCH 3/4] 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; ++} --- acr38-1.7.9+pristine.orig/debian/patches/0001-Link-libacr38ucontrol-against-libpcsclite.patch +++ acr38-1.7.9+pristine/debian/patches/0001-Link-libacr38ucontrol-against-libpcsclite.patch @@ -0,0 +1,21 @@ +From 862761f12fbdd60704c6888dc77c30ed6ba789b4 Mon Sep 17 00:00:00 2001 +From: Laurent Bigonville +Date: Tue, 12 May 2009 16:15:28 +0200 +Subject: [PATCH 1/4] 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 --- acr38-1.7.9+pristine.orig/debian/patches/0002-Install-files-in-DESTDIR.patch +++ acr38-1.7.9+pristine/debian/patches/0002-Install-files-in-DESTDIR.patch @@ -0,0 +1,28 @@ +From c3633c898033c17a2a38f92cfdca434229d68bbe Mon Sep 17 00:00:00 2001 +From: Laurent Bigonville +Date: Tue, 12 May 2009 16:16:39 +0200 +Subject: [PATCH 2/4] 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 af19b66..c8caf0c 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@ @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)