# $Id$ PNAME="openssh" PVER="5.9p1" PBUILD="r1" PCATEGORIE="net-misc" DESCRIPTION="Port of OpenBSD's free SSH release." HOMEPAGE="http://www.openssh.com/" DEPEND=">= dev-libs/openssl-1.0.0d >= sys-libs/zlib-1.2.5 >= sys-apps/sed-4" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mbuild mtools SRC_URI=( ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/sshd.service mirror://${PNAME}/sshd.socket mirror://${PNAME}/ssh-keygen-dsa.service mirror://${PNAME}/ssh-keygen-ecdsa.service mirror://${PNAME}/ssh-keygen-rsa1.service mirror://${PNAME}/ssh-keygen-rsa.service mirror://${PNAME}/sshd.conf.tempfile ) UP2DATE="updatecmd ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable | lasttarball gz" src_compile() { cd ${SRCDIR} mconfigure \ --sysconfdir=/etc/ssh \ --libexecdir=/usr/$(mlibdir)/misc \ --datadir=/usr/share/openssh \ --disable-suid-ssh \ --with-privsep-path=/var/empty \ --with-privsep-user=sshd \ --with-md5-passwords \ --with-ipv4-default \ --without-zlib-version-check \ || die mmake || die } src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} install-nokeys || die # install systemd units minstallunit sshd.service || die minstallunit sshd.socket || die minstallunit ssh-keygen-dsa.service || die minstallunit ssh-keygen-ecdsa.service || die minstallunit ssh-keygen-rsa1.service || die minstallunit ssh-keygen-rsa.service || die minstalltmp sshd.conf.tempfile sshd.conf || die # needed to run sshd mkeepdir /var/empty || die mchown root:sys /var/empty || die minstalldocs CREDITS ChangeLog LICENCE OVERVIEW \ README* RFC.nroff TODO WARNING.RNG || die } preinstall() { # adding ssh user ${MLIBDIR}/mgroupadd -o "-g 22" sshd ${MLIBDIR}/museradd -o "-u 22 -g sshd -d /var/empty -s /bin/false" sshd } postinstall() { mstartunit ssh-keygen-dsa.service sshd mstartunit ssh-keygen-ecdsa.service sshd mstartunit ssh-keygen-rsa1.service sshd mstartunit ssh-keygen-rsa.service sshd mstartunit sshd.service # per socket connection not supported atm #mstartunit sshd.socket } postremove() { mstopunit ssh-keygen-dsa.service sshd mstopunit ssh-keygen-ecdsa.service sshd mstopunit ssh-keygen-rsa1.service sshd mstopunit ssh-keygen-rsa.service sshd mstopunit sshd.service # per socket connection not supported atm #mstopunit sshd.socket }