updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / scmccid / PKGBUILD
bloba88a20e816cfbbd96a90e1a230214b8bb64b398d
1 # Contributor: Cesar Alcalde <lambda512 _at_ gmail.com>
2 pkgname=scmccid
3 pkgver=5.0.11
4 pkgrel=1
5 pkgdesc="Binary driver for the SCM smart card readers"
6 arch=('i686' 'x86_64')
7 url="http://www.scmmicro.com/support/pc-security-support/downloads.html"
8 license=('custom')
9 depends=('pcsclite' 'libusb')
10 backup=('usr/local/scm/ini/scmccid.ini')
11 install=$pkgname.install
12 case "$CARCH" in
13     x86_64|amd64) source=("http://www.scmmicro.com/support_tmp/download.php?file=${pkgname}_${pkgver}_linux_x64.tar.gz")
14                   md5sums=('170dade821150e29f0329f48739b8bff')
15                   ;;
16     i686|i386|*) source=("http://www.scmmicro.com/support_tmp/download.php?file=${pkgname}_${pkgver}_linux.tar.gz")
17                  md5sums=('8e824b050b837537ba17c350a5513f4e')
18                  ;;
19 esac
23 build() {
24   case "$CARCH" in
25     x86_64|amd64) cd "$srcdir/${pkgname}_${pkgver}_linux_x64" ;;
26     i686|i386|*) cd "$srcdir/${pkgname}_${pkgver}_linux" ;;
27   esac
28   
29   bundle_path=`pkg-config libpcsclite --variable=usbdropdir`
30   
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
46   cd ./proprietary
47   for bundle in *.bundle
48   do
49     ln -sf $bundle_path/$bundle $pkgdir/usr/local/pcsc/drivers/$bundle
50   done
51   cd ..
52   
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: