1 # Contributor: Cesar Alcalde <lambda512 _at_ gmail.com>
5 pkgdesc="Binary driver for the SCM smart card readers"
7 url="http://www.scmmicro.com/support/pc-security-support/downloads.html"
9 depends=('pcsclite' 'libusb')
10 backup=('usr/local/scm/ini/scmccid.ini')
11 install=$pkgname.install
13 x86_64|amd64) source=("http://www.scmmicro.com/support_tmp/download.php?file=${pkgname}_${pkgver}_linux_x64.tar.gz")
14 md5sums=('170dade821150e29f0329f48739b8bff')
16 i686|i386|*) source=("http://www.scmmicro.com/support_tmp/download.php?file=${pkgname}_${pkgver}_linux.tar.gz")
17 md5sums=('8e824b050b837537ba17c350a5513f4e')
25 x86_64|amd64) cd "$srcdir/${pkgname}_${pkgver}_linux_x64" ;;
26 i686|i386|*) cd "$srcdir/${pkgname}_${pkgver}_linux" ;;
29 bundle_path=`pkg-config libpcsclite --variable=usbdropdir`
31 # This path seems to be hardcoded in the driver. Maybe it can be modified with sed
32 mkdir -p $pkgdir/usr/local/scm/ini || return 1
33 cp -f scmccid.ini $pkgdir/usr/local/scm/ini/ || return 1
35 # sed -i 's,/usr/local/scm/,/usr/share/scm/,g' ./proprietary/scmcciddriver.bundle/Contents/Linux/libscmccid.so.$pkgver || return 1
36 # mkdir -p $pkgdir/usr/share/scm/ini || return 1
37 # cp -f scmccid.ini $pkgdir/usr/share/scm/ini/ || return 1
39 mkdir -p $pkgdir/$bundle_path || return 1
40 cp -rf ./proprietary/*.bundle $pkgdir/$bundle_path || return 1
42 # Create symbolic link from open source pcscd bundle path
44 mkdir -p $pkgdir/usr/local/pcsc/drivers
47 for bundle in *.bundle
49 ln -sf $bundle_path/$bundle $pkgdir/usr/local/pcsc/drivers/$bundle
53 mkdir -p $pkgdir/usr/share/licenses/$pkgname
54 cp ./proprietary/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
56 # Contains instructions to customize the scmccid.ini
57 cp ./ReadmeFirst.txt $pkgdir/usr/local/scm/
61 # vim:set ts=2 sw=2 et: