# Maintainer: Natanael Copa pkgname=openssh pkgver=6.2_p1 _myver=${pkgver%_*}${pkgver#*_} pkgrel=0 pkgdesc="Port of OpenBSD's free SSH release" url="http://www.openssh.org/portable.html" arch="all" license="as-is" depends="openssh-client" makedepends="openssl-dev zlib-dev" subpackages="$pkgname-doc $pkgname-client" source="ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/$pkgname-$_myver.tar.gz openssh-dynwindow_noneswitch.diff openssh-peaktput.diff openssh-hmac-accel.diff sshd.initd sshd.confd " _builddir="$srcdir"/$pkgname-$_myver prepare() { cd "$_builddir" for i in $source; do case "$i" in *.diff.gz) msg "Applying $i" gunzip -c "$srcdir"/"${i##*/}" | patch -p1 -N || return 1 ;; *.diff) msg "Applying $i" patch -p1 -N -i "$srcdir"/${i##*/} || return 1 ;; esac done sed -i -e '/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:/usr/bin/xauth:' \ pathnames.h || return 1 } build () { cd "$_builddir" ./configure --prefix=/usr \ --with-mantype=man \ --mandir=/usr/share/man \ --with-ldflags="${LDFLAGS}" \ --disable-strip \ --disable-lastlog \ --sysconfdir=/etc/ssh \ --datadir=/usr/share/openssh \ --with-privsep-path=/var/empty \ --with-privsep-user=sshd \ --with-md5-passwords \ --with-ssl-engine \ --libexecdir=/usr/lib/ssh \ --without-tcp-wrappers \ --without-pam \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 mkdir -p "$pkgdir"/var/empty install -D -m755 "$srcdir"/sshd.initd \ "$pkgdir"/etc/init.d/sshd || return 1 install -D -m644 "$srcdir"/sshd.confd \ "$pkgdir"/etc/conf.d/sshd || return 1 install -Dm644 "$_builddir"/contrib/ssh-copy-id.1 \ "$pkgdir"/usr/share/man/man1/ssh-copy-id.1 || return 1 } client() { pkgdesc="OpenBSD's SSH client" replaces="openssh" depends= install -d "$subpkgdir"/usr/bin \ "$subpkgdir"/usr/lib/ssh \ "$subpkgdir"/etc/ssh \ "$subpkgdir"/var/run \ "$subpkgdir"/var/empty mv "$pkgdir"/usr/bin/* \ "$subpkgdir"/usr/bin/ || return 1 mv "$pkgdir"/usr/lib/ssh/ssh-keysign \ "$subpkgdir"/usr/lib/ssh/ || return 1 mv "$pkgdir"/etc/ssh/ssh_config \ "$pkgdir"/etc/ssh/moduli \ "$subpkgdir"/etc/ssh/ || return 1 install -Dm755 "$_builddir"/contrib/findssl.sh \ "$subpkgdir"/usr/bin/findssl.sh || return 1 install -Dm755 "$_builddir"/contrib/ssh-copy-id \ "$subpkgdir"/usr/bin/ssh-copy-id || return 1 } md5sums="7b2d9dd75b5cf267ea1737ec75500316 openssh-6.2p1.tar.gz f5f58aadd74752440e8560c398fcb3b6 openssh-dynwindow_noneswitch.diff 949ff348573438163240c60d6c3618eb openssh-peaktput.diff c65d454dc5b149647273485fc184636d openssh-hmac-accel.diff cb0dd08c413fad346f0c594107b4a2e0 sshd.initd b35e9f3829f4cfca07168fcba98749c7 sshd.confd" sha256sums="58690267d7455f444e87c2f8cd9be91fc686ffc0c02d1ebd0be2ab68149f7160 openssh-6.2p1.tar.gz 73654338c592b8c9ad7435d1fb9908fa730076a8d3fd51c8ed5f5a6810b218b9 openssh-dynwindow_noneswitch.diff dab18c1fd1496c1ba4a4fe08c6c6b8cf3347fc82878d85498202f50168161f6b openssh-peaktput.diff 902ea83a9ef726f32b096280da0f1b722f4372886c65c4e28985ee57e725d95c openssh-hmac-accel.diff 3fa062fd4bfac64abf21f3c1d0548f1dfcf3c6e56e84ece14c848f53a293024e sshd.initd 29c6d57ac3ec6018cadc6ba6cd9b90c9ed46e20049b970fdcc68ee2481a2ee41 sshd.confd" sha512sums="ffc866110f8e6c53581186f73593489fc54d75b5d193f9e9589ec484b541efa23d8ee48b28e3a0a3a0d7f8183d5de00c416c2217938a5e47211c49da7bc7a7e7 openssh-6.2p1.tar.gz c15e6c39e897adc9fe7975c417ee2357c4f07668096bd1538e0be9395d634d95c4bf10e9a18faae4247c3d89c7d9fb503c1a8cc56b66d40797c7bc774661ec66 openssh-dynwindow_noneswitch.diff 64f2c94f41225c76428440d778b0bf5657408123d1cd7d6cb4bdf5000bfba8ad80ec5e57acd0880adc7a8ea7e2f1a64e329b83cf8be630b9aaebff6ab138d025 openssh-peaktput.diff aaa128126400171d0755038a846672aa7b1e87340edf73a672962d403abf404ef1821466b17da51dde25f04ec7533ae4a653399ccc912ea9c4a7b1a14032e76f openssh-hmac-accel.diff 1483e2bcd700da9b02f04508d490b472c816344787bf1675fef2f7e27f72b91e4323e4e8c1db701e47d81d37d6d4b0623eaeac46b2cf589ae5ad69f363baa594 sshd.initd b9ae816af54a55e134a9307e376f05367b815f1b3fd545c2a2c312d18aedcf907f413e8bad8db980cdd9aad4011a72a79e1e94594f69500939a9cb46287f2f81 sshd.confd"