summaryrefslogtreecommitdiff
path: root/community/opensc/PKGBUILD
blob: d8832845eac0468b4bea5f1d66ca64018d2e23dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# $Id: PKGBUILD 100414 2013-11-03 18:13:58Z seblu $
# Maintainer: Sébastien Luttringer
# Contributor: kevku <kevku@msn.com>

pkgname=opensc
pkgver=0.13.0
pkgrel=4
pkgdesc='Tools and libraries for smart cards'
arch=('x86_64' 'i686')
url='https://github.com/OpenSC/OpenSC/wiki'
license=('LGPL')
backup=('etc/opensc.conf')
makedepends=('docbook-xsl')
depends=('openssl' 'pcsclite' 'libltdl')
options=('!emptydirs')
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
        '0001-pkcs15-regression-in-e35febe-compute-cert-length.patch'
        '0002-epass2003-properly-disable-padding.patch')
md5sums=('74a10de6c646bdaae307d6dc9e9accc0'
         '49a0989c169decf6876a3a9631289dbc'
         '68fe80c8fb6c28c0bcf9d36e3245e4ae')

prepare() {
  patch -p1 -d $pkgname-$pkgver < 0001-pkcs15-regression-in-e35febe-compute-cert-length.patch
  patch -p1 -d $pkgname-$pkgver < 0002-epass2003-properly-disable-padding.patch
}

build() {
  cd $pkgname-$pkgver
  export LIBS=-lltdl
  _sheetdir=(/usr/share/xml/docbook/xsl-stylesheets-*)
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --enable-man \
    --enable-doc \
    --enable-readline \
    --enable-openssl \
    --enable-pcsc \
    --enable-zlib \
    --enable-sm \
    --with-xsl-stylesheetsdir="$_sheetdir"
  make
}

package(){
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  install -D -m644 etc/opensc.conf "$pkgdir/etc/opensc.conf"
}

# vim:set ts=2 sw=2 et: