pkgname=openssh pkgver=9.9p1 pkgrel=1 pkgdesc='Free version of the SSH connectivity tools' arch=('x86_64') license=('custom:BSD') url='https://www.openssh.com/' backup=('etc/ssh/ssh_config' 'etc/ssh/sshd_config' 'etc/pam.d/sshd') depends=('krb5' 'openssl' 'libedit' 'ldns' 'libxcrypt') makedepends=('linux-headers') install=openssh.install source=("https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${pkgname}-${pkgver}.tar.gz" 'sshd.confd' 'sshd.pam' 'sshdgenkeys.service' 'sshd.service' 'sshd@.service' 'sshd.socket') sha1sums=('5ded7eb0add0b02b5d1a1c4bf5cb2c89d2117b53' 'ec102deb69cad7d14f406289d2fc11fee6eddbdd' 'd93dca5ebda4610ff7647187f8928a3de28703f3' 'cc1ceec606c98c7407e7ac21ade23aed81e31405' 'f9af4a442b804ab661cec0edb25dd76dee16d8d2' 'bd6eae36c7ef9efb7147778baad7858b81f2d660' 'e12fa910b26a5634e5a6ac39ce1399a132cf6796') build() { cd ${pkgname}-${pkgver} ./configure \ --prefix=/usr \ --libexecdir=/usr/lib/ssh \ --sysconfdir=/etc/ssh \ --with-libedit \ --with-privsep-user=nobody \ --with-pam \ --with-mantype=man \ --with-xauth=/usr/bin/xauth \ --with-kerberos5=/usr \ --with-ssl-engine \ --with-ldns \ --with-pid-dir=/run \ make } check() { cd ${pkgname}-${pkgver} # test_sshkey:......FATAL: no sshd running on port 4242 make tests || grep $USER /etc/passwd | grep -q /bin/false } package() { cd ${pkgname}-${pkgver} make DESTDIR=${pkgdir} install install -Dm644 ../sshd.pam ${pkgdir}/etc/pam.d/sshd install -Dm644 ../sshd.confd ${pkgdir}/etc/conf.d/sshd install -Dm644 LICENCE ${pkgdir}/usr/share/licenses/${pkgname}/LICENCE # scripts 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 # PAM feature sed -i -e '/^#ChallengeResponseAuthentication yes$/c ChallengeResponseAuthentication no' \ -e '/^#PrintMotd yes$/c PrintMotd no # pam does that' \ -e '/^#UsePAM no$/c UsePAM yes' \ ${pkgdir}/etc/ssh/sshd_config install -Dm644 ../sshdgenkeys.service ${pkgdir}/usr/lib/systemd/system/sshdgenkeys.service install -Dm644 ../sshd@.service ${pkgdir}/usr/lib/systemd/system/sshd@.service install -Dm644 ../sshd.service ${pkgdir}/usr/lib/systemd/system/sshd.service install -Dm644 ../sshd.socket ${pkgdir}/usr/lib/systemd/system/sshd.socket }