updated on Thu Jan 12 00:00:55 UTC 2012
[aur-mirror.git] / selinux-openssh / PKGBUILD
blob45837e1a83ab9c08f3402adc033ae29925b04d49
1 # $Id: PKGBUILD 143646 2011-11-28 00:51:51Z bisson $
2 # Maintainer: Gaetan Bisson <bisson@archlinux.org>
3 # Maintainer: Nicky726 <Nicky726@gmail.com>
4 # Contributor: Aaron Griffin <aaron@archlinux.org>
5 # Contributor: judd <jvinet@zeroflux.org>
7 pkgname=selinux-openssh
8 _origname=openssh
9 pkgver=5.9p1
10 pkgrel=5
11 pkgdesc='Free version of the SSH connectivity tools with SELinux support'
12 arch=('i686' 'x86_64')
13 license=('custom:BSD')
14 url='http://www.openssh.org/portable.html'
15 backup=('etc/ssh/ssh_config' 'etc/ssh/sshd_config' 'etc/pam.d/sshd' 'etc/conf.d/sshd')
16 depends=('krb5' 'openssl' 'libedit' 'selinux-usr-libselinux')
17 optdepends=('x11-ssh-askpass: input passphrase in X without a terminal')
18 conflicts=("${_origname}")
19 provides=("${_origname}=${pkgver}-${pkgrel}")
20 source=("ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${_origname}-${pkgver}.tar.gz"
21         'sshd.confd'
22         'sshd.pam'
23         'sshd')
24 sha1sums=('ac4e0055421e9543f0af5da607a72cf5922dcc56'
25           'ec102deb69cad7d14f406289d2fc11fee6eddbdd'
26           'cc3d4463849cf388cc3fbe6068a8f2ce8fb3ae95'
27           '21fa88de6cc1c7912e71655f50896ba17991a1c2')
29 build() {
30         cd "${srcdir}/${_origname}-${pkgver}"
32         ./configure \
33                 --prefix=/usr \
34                 --libexecdir=/usr/lib/ssh \
35                 --sysconfdir=/etc/ssh \
36                 --with-privsep-user=nobody \
37                 --with-md5-passwords \
38                 --with-pam \
39                 --with-mantype=man \
40                 --with-xauth=/usr/bin/xauth \
41                 --with-kerberos5=/usr \
42                 --with-ssl-engine \
43                 --with-libedit=/usr/lib \
44                 --disable-strip \
45                 --with-selinux
47         make
50 package() {
51         cd "${srcdir}/${_origname}-${pkgver}"
52         make DESTDIR="${pkgdir}" install
54         install -Dm755 ../sshd "${pkgdir}"/etc/rc.d/sshd
55         install -Dm644 ../sshd.pam "${pkgdir}"/etc/pam.d/sshd
56         install -Dm644 ../sshd.confd "${pkgdir}"/etc/conf.d/sshd
57         install -Dm644 LICENCE "${pkgdir}/usr/share/licenses/${_origname}/LICENCE"
59         rm "${pkgdir}"/usr/share/man/man1/slogin.1
60         ln -sf ssh.1.gz "${pkgdir}"/usr/share/man/man1/slogin.1.gz
62         # additional contrib scripts that we like
63         install -Dm755 contrib/findssl.sh "${pkgdir}"/usr/bin/findssl.sh
64         install -Dm755 contrib/ssh-copy-id "${pkgdir}"/usr/bin/ssh-copy-id
65         install -Dm644 contrib/ssh-copy-id.1 "${pkgdir}"/usr/share/man/man1/ssh-copy-id.1
67         # PAM is a common, standard feature to have
68         sed \
69                 -e '/^#ChallengeResponseAuthentication yes$/c ChallengeResponseAuthentication no' \
70                 -e '/^#UsePAM no$/c UsePAM yes' \
71                 -i "${pkgdir}"/etc/ssh/sshd_config