core/openssh/PKGBUILD
2013-07-19 23:18:09 +00:00

83 lines
2.3 KiB
Bash

#
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer <inkane@chakra-project.org>
# contributor <abveritas[at]chakra-project[dot]org>
pkgname=openssh
pkgver=6.2p2
pkgrel=1
pkgdesc='Free version of the SSH connectivity tools'
arch=('x86_64')
license=('custom:BSD')
url='http://www.openssh.org/portable.html'
backup=('etc/ssh/ssh_config' 'etc/ssh/sshd_config' 'etc/pam.d/sshd')
depends=('krb5' 'openssl' 'libedit')
source=("ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${pkgname}-${pkgver}.tar.gz"
'sshd.confd'
'sshd.pam'
'sshdgenkeys.service'
'sshd.service'
'sshd@.service'
'sshd.socket')
md5sums=('be46174dcbb77ebb4ea88ef140685de1'
'e2cea70ac13af7e63d40eb04415eacd5'
'2fd20d311d2afbfc6e576883224d8c97'
'bc3e6736086598ebb648c4d960c59d44'
'4bbc5818d93a2ad336d7191ed35c69f7'
'fdc4a47b4b8d0f0e2c395c9edcee8c14'
'76f52c66fb3193f301fe0a666e047ab1')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./configure \
--prefix=/usr \
--libexecdir=/usr/lib/ssh \
--sysconfdir=/etc/ssh \
--with-privsep-user=nobody \
--with-md5-passwords \
--with-pam \
--with-mantype=man \
--with-xauth=/usr/bin/xauth \
--with-kerberos5=/usr \
--with-ssl-engine \
--with-libedit \
--with-pid-dir=/run \
make
}
check() {
cd "${srcdir}/${pkgname}-${pkgver}"
make tests ||
grep $USER /etc/passwd | grep -q /bin/false
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
install -Dm644 ../sshd.pam "${pkgdir}"/etc/pam.d/sshd
install -Dm644 LICENCE "${pkgdir}/usr/share/licenses/${pkgname}/LICENCE"
rm "${pkgdir}"/usr/share/man/man1/slogin.1
ln -sf ssh.1.gz "${pkgdir}"/usr/share/man/man1/slogin.1.gz
# 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
# PAM is a common, standard feature to have
sed -i -e '/^#ChallengeResponseAuthentication yes$/c ChallengeResponseAuthentication no' \
-e '/^#UsePAM no$/c UsePAM yes' \
"${pkgdir}"/etc/ssh/sshd_config
# install systemd units
install -dm755 "$pkgdir/usr/lib/systemd/system/"
install -m644 "$srcdir"/sshd{{,@,genkeys}.service,.socket} "$pkgdir/usr/lib/systemd/system/"
}