core/openssh/PKGBUILD

81 lines
2.4 KiB
Bash
Raw Normal View History

2010-03-13 23:25:19 +08:00
pkgname=openssh
pkgver=7.2p2
2016-03-23 03:02:57 +08:00
pkgrel=2
2011-08-18 06:07:15 +08:00
pkgdesc='Free version of the SSH connectivity tools'
url='http://www.openssh.org/portable.html'
2014-10-08 23:55:50 +08:00
license=('custom:BSD')
arch=('x86_64')
makedepends=('linux-headers')
depends=('krb5' 'openssl' 'libedit' 'ldns')
optdepends=('xorg-xauth: X11 forwarding')
2014-10-08 23:55:50 +08:00
source=("ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${pkgname}-${pkgver}.tar.gz"{,.asc}
'sshdgenkeys.service'
'sshd@.service'
'sshd.service'
'sshd.socket'
'sshd.pam')
sha1sums=('70e35d7d6386fe08abbd823b3a12a3ca44ac6d38'
2014-10-08 23:55:50 +08:00
'SKIP'
'cc1ceec606c98c7407e7ac21ade23aed81e31405'
'bd6eae36c7ef9efb7147778baad7858b81f2d660'
'97b09fe4ebb8919832d9582c660d2a45d9f9f7c5'
'e12fa910b26a5634e5a6ac39ce1399a132cf6796'
'd93dca5ebda4610ff7647187f8928a3de28703f3')
validpgpkeys=('59C2118ED206D927E667EBE3D3E5F56B6D920D30')
2015-04-03 20:46:24 +08:00
2012-12-15 09:22:06 +08:00
backup=('etc/ssh/ssh_config' 'etc/ssh/sshd_config' 'etc/pam.d/sshd')
2010-03-13 23:25:19 +08:00
build() {
2011-08-18 06:07:15 +08:00
cd "${srcdir}/${pkgname}-${pkgver}"
2010-03-13 23:25:19 +08:00
2011-08-18 06:07:15 +08:00
./configure \
--prefix=/usr \
--libexecdir=/usr/lib/ssh \
--sysconfdir=/etc/ssh \
2014-10-08 23:55:50 +08:00
--with-ldns \
--with-libedit \
--with-ssl-engine \
2011-08-18 06:07:15 +08:00
--with-pam \
2014-10-08 23:55:50 +08:00
--with-privsep-user=nobody \
2011-08-18 06:07:15 +08:00
--with-kerberos5=/usr \
2014-10-08 23:55:50 +08:00
--with-xauth=/usr/bin/xauth \
--with-mantype=man \
--with-md5-passwords \
2012-12-15 09:22:06 +08:00
--with-pid-dir=/run \
2011-08-18 06:07:15 +08:00
make
}
2010-03-13 23:25:19 +08:00
2012-12-15 09:22:06 +08:00
check() {
cd "${srcdir}/${pkgname}-${pkgver}"
make tests ||
grep $USER /etc/passwd | grep -q /bin/false
}
2011-08-18 06:07:15 +08:00
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
2010-03-13 23:25:19 +08:00
2014-10-08 23:55:50 +08:00
make DESTDIR="${pkgdir}" install
2012-12-15 09:22:06 +08:00
2014-10-08 23:55:50 +08:00
ln -sf ssh.1.gz "${pkgdir}"/usr/share/man/man1/slogin.1.gz
2011-08-18 06:07:15 +08:00
install -Dm644 LICENCE "${pkgdir}/usr/share/licenses/${pkgname}/LICENCE"
2010-03-13 23:25:19 +08:00
2014-10-08 23:55:50 +08:00
# install systemd units
install -dm755 "$pkgdir/usr/lib/systemd/system/"
install -m644 "$srcdir"/sshd{{,@,genkeys}.service,.socket} "$pkgdir/usr/lib/systemd/system/"
install -Dm644 ../sshd.pam "${pkgdir}"/etc/pam.d/sshd
2010-03-13 23:25:19 +08:00
2011-08-18 06:07:15 +08:00
# additional contrib scripts that we like
install -Dm755 contrib/findssl.sh "${pkgdir}"/usr/bin/findssl.sh
install -Dm755 contrib/ssh-copy-id "${pkgdir}"/usr/bin/ssh-copy-id
install -Dm644 contrib/ssh-copy-id.1 "${pkgdir}"/usr/share/man/man1/ssh-copy-id.1
2011-08-18 06:07:15 +08:00
# PAM is a common, standard feature to have
sed -i -e '/^#ChallengeResponseAuthentication yes$/c ChallengeResponseAuthentication no' \
2014-10-08 23:55:50 +08:00
-e '/^#PrintMotd yes$/c PrintMotd no # pam does that' \
2011-08-18 06:07:15 +08:00
-e '/^#UsePAM no$/c UsePAM yes' \
"${pkgdir}"/etc/ssh/sshd_config
2012-06-24 21:34:29 +08:00
}