updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / openssh-opensc / PKGBUILD
blob608601af226284efc3082287488b65ab6b055ec0
1 # Maintainer: Oleg Smirnov <oleg.smirnov@gmail.com>
3 pkgname=openssh-opensc
4 _pkgname=openssh
5 pkgver=5.8p2
6 pkgrel=1
7 pkgdesc='Free version of the SSH connectivity tools smart card support'
8 arch=('i686' 'x86_64')
9 license=('custom:BSD')
10 url='http://www.openssh.org/portable.html'
11 backup=('etc/ssh/ssh_config' 'etc/ssh/sshd_config' 'etc/pam.d/sshd' 'etc/conf.d/sshd')
12 depends=('tcp_wrappers' 'krb5' 'openssl' 'libedit')
13 source=("ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${_pkgname}-${pkgver}.tar.gz"
14         'authfile.c.patch'
15         'sshd.confd'
16         'sshd.pam'
17         'sshd')
18 sha1sums=('64798328d310e4f06c9f01228107520adbc8b3e5'
19           '3669cb5ca6149f69015df5ce8e60b82c540eb0a4'
20           'ec102deb69cad7d14f406289d2fc11fee6eddbdd'
21           '07fecd5880b1c4fdd8c94ddb2e89ddce88effdc1'
22           '6b7f8ebf0c1cc37137a7d9a53447ac8a0ee6a2b5')
24 build() {
25         cd "${srcdir}/${_pkgname}-${pkgver}"
27         patch -p1 -i ../authfile.c.patch # fix FS#24693 using http://anoncvs.mindrot.org/index.cgi/openssh/authfile.c?revision=1.95
29         ./configure \
30                 --prefix=/usr \
31                 --libexecdir=/usr/lib/ssh \
32                 --sysconfdir=/etc/ssh \
33                 --with-tcp-wrappers \
34                 --with-privsep-user=nobody \
35                 --with-md5-passwords \
36                 --with-pam \
37                 --with-mantype=man \
38                 --mandir=/usr/share/man \
39                 --with-xauth=/usr/bin/xauth \
40                 --with-kerberos5=/usr \
41                 --with-ssl-engine \
42                 --with-libedit=/usr/lib \
43                 --with-opensc \
44                 --disable-strip # stripping is done by makepkg
46         make
49 package() {
50         cd "${srcdir}/${_pkgname}-${pkgver}"
51         make DESTDIR="${pkgdir}" install
53         install -Dm755 ../sshd "${pkgdir}"/etc/rc.d/sshd
54         install -Dm644 ../sshd.pam "${pkgdir}"/etc/pam.d/sshd
55         install -Dm644 ../sshd.confd "${pkgdir}"/etc/conf.d/sshd
56         install -Dm644 LICENCE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENCE"
58         rm "${pkgdir}"/usr/share/man/man1/slogin.1
59         ln -sf ssh.1.gz "${pkgdir}"/usr/share/man/man1/slogin.1.gz
61         # additional contrib scripts that we like
62         install -Dm755 contrib/findssl.sh "${pkgdir}"/usr/bin/findssl.sh
63         install -Dm755 contrib/ssh-copy-id "${pkgdir}"/usr/bin/ssh-copy-id
64         install -Dm644 contrib/ssh-copy-id.1 "${pkgdir}"/usr/share/man/man1/ssh-copy-id.1
66         # PAM is a common, standard feature to have
67         sed -i  -e '/^#ChallengeResponseAuthentication yes$/c ChallengeResponseAuthentication no' \
68                 -e '/^#UsePAM no$/c UsePAM yes' \
69                 "${pkgdir}"/etc/ssh/sshd_config