updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / mkinitcpio-encrypt-sc / PKGBUILD
blob422afbcfa49ca70927809195cca5164d151f7562
1 pkgname=mkinitcpio-encrypt-sc
2 pkgver=0.2
3 pkgrel=1
4 pkgdesc="A set of initcpio tools for encrypted root & smart card support"
5 arch=('i686' 'x86_64')
6 url="http://wiki.archlinux.org/index.php/Smart_Card"
7 options=('!libtool')
8 license="LGPL"
9 depends=('cryptsetup' 'libtool')
10 makedepends=('automake' 'autoconf')
11 opensc_ver=0.11.11
12 openct_ver=0.6.18
13 source=(http://www.opensc-project.org/files/openct/openct-$openct_ver.tar.gz \
14         http://www.opensc-project.org/files/opensc/opensc-$opensc_ver.tar.gz \
15         opensc.patch \
16         openct.patch \
17         encrypt_sc_hook \
18         encrypt_sc_install )
19 md5sums=('f82132df4152a624a04b14a51da79c74'
20          '9c3290f7cb82273136b1584e198157dc'
21          'e43379e913d46f2f9b3278968dd5266e'
22          '649e1070e393f84bad8e7a2540ab8eda'
23          'c4298046b6df143f5ad534e524699072'
24          '6ea44642e1f93358d0cb22777bb64878')
26 build() {
27         cd $startdir/src/opensc-$opensc_ver
28         patch -p1 < $srcdir/opensc.patch
29         autoreconf || return 1
30         ./configure --prefix=/ \
31                     --exec-prefix=/ \
32                     --sysconfdir=/etc \
33                     --enable-openct \
34                     --disable-nsplugin \
35                     --disable-pcsc \
36                     --enable-static || return 1
37         make || return 1
39         cd $startdir/src/openct-$openct_ver
40         patch -p1 < $srcdir/openct.patch
41         autoreconf || return 1
42         ./configure --prefix=/ \
43                     --exec-prefix=/ \
44                     --with-udev=/lib/udev \
45                     --sysconfdir=/etc \
46                     --localstatedir=/var \
47                     --enable-usb \
48                     --disable-pcsc \
49                     --enable-static || return 1
50         make || return 1
52         install -D $startdir/src/opensc-$opensc_ver/src/tools/pkcs15-tool \
53                    $startdir/pkg/lib/initcpio/sc/pkcs15-tool || return 1 
54         install -D $startdir/src/opensc-$opensc_ver/etc/opensc.conf \
55                    $startdir/pkg/lib/initcpio/sc/opensc.conf || return 1 
56         install -D $startdir/src/openct-$openct_ver/src/ifd/ifdhandler \
57                    $startdir/pkg/lib/initcpio/sc/ifdhandler || return 1 
58         install -D $startdir/src/openct-$openct_ver/src/tools/openct-control \
59                    $startdir/pkg/lib/initcpio/sc/openct-control || return 1 
60         install -D $startdir/src/openct-$openct_ver/etc/openct.udev.modalias \
61                    $startdir/pkg/lib/initcpio/sc/95-openct.rules || return 1 
62         install -D $startdir/src/openct-$openct_ver/etc/openct_usb \
63                    $startdir/pkg/lib/initcpio/sc/openct_usb || return 1 
64         install -D $startdir/src/openct-$openct_ver/etc/openct_pcmcia \
65                    $startdir/pkg/lib/initcpio/sc/openct_pcmcia || return 1 
66         install -D $startdir/src/openct-$openct_ver/etc/openct_serial \
67                    $startdir/pkg/lib/initcpio/sc/openct_serial || return 1
68         install -D $startdir/src/openct-$openct_ver/etc/openct.conf \
69                    $startdir/pkg/lib/initcpio/sc/openct.conf || return 1
70         install -D -m 644 $startdir/src/encrypt_sc_hook \
71                    $startdir/pkg/lib/initcpio/hooks/encrypt_sc || return 1
72         install -D -m 644 $startdir/src/encrypt_sc_install \
73                    $startdir/pkg/lib/initcpio/install/encrypt_sc || return 1