# $Id$ PortSystem 1.0 name openssh version 5.1p1 categories net maintainers nomaintainer description OpenSSH secure login server long_description OpenSSH is a FREE version of the SSH protocol suite of \ network connectivity tools that increasing numbers of people on the \ Internet are coming to rely on. Many users of telnet, rlogin, ftp, \ and other such programs might not realize that their password is \ transmitted across the Internet unencrypted, but it is. OpenSSH \ encrypts all traffic (including passwords) to effectively eliminate \ eavesdropping, connection hijacking, and other network-level \ attacks. Additionally, OpenSSH provides a myriad of secure \ tunneling capabilities, as well as a variety of authentication \ methods. homepage http://www.openssh.com/ platforms darwin checksums ${distfiles} \ md5 03f2d0c1b5ec60d4ac9997a146d2faec \ sha1 877ea5b283060fe0160e376ea645e8e168047ff5 \ rmd160 24293ad89633cfd4791f08eb3442becb7e5788ca master_sites openbsd:OpenSSH/portable \ http://mirror.mcs.anl.gov/openssh/portable/ \ ftp://ftp.cise.ufl.edu/pub/mirrors/openssh/portable/ \ ftp://reflection.ncsa.uiuc.edu/pub/OpenBSD/OpenSSH/portable/ \ ftp://mirror.mcs.anl.gov/pub/openssh/portable/ \ ftp://ftp.cse.buffalo.edu/pub/OpenBSD/OpenSSH/portable/ \ ftp://openbsd.mirrors.pair.com/ftp/OpenSSH/portable \ ftp://openbsd.secsup.org/pub/openbsd/OpenSSH/portable/ depends_lib port:openssl port:zlib # Specified -fno-builtin because GCC 3.3 has log() as a builtin # (from math.h) while OpenSSH has its own log() function # -- from fink. configure.cppflags-append "-fno-builtin" configure.args --with-ssl-dir=${prefix} --sysconfdir=${prefix}/etc/ssh \ --with-privsep-path=${prefix}/var/empty --with-md5-passwords \ --with-pid-dir=${prefix}/var/run --with-tcp-wrappers \ --with-pam --disable-suid-ssh --with-random=/dev/urandom \ --mandir=${prefix}/share/man --with-zlib=${prefix} \ --with-kerberos5=/usr use_parallel_build yes destroot.target install-nokeys post-destroot { destroot.keepdirs ${destroot}${prefix}/var/run ${destroot}${prefix}/var/empty reinplace "s|#Port 22|Port 2222|g" ${destroot}${prefix}/etc/ssh/sshd_config } # For X11 Forwarding variant apple_x11 description "use (apple's) X11 for forwarding" { configure.args-append --with-xauth=${x11prefix}/bin/xauth } # For high-performance patch variant hpn description "apply high performance patch" { patch_sites-append http://www.psc.edu/networking/projects/hpn-ssh/:hpn patchfiles-append ${distname}-hpn13v5.diff.gz:hpn checksums-append ${distname}-hpn13v5.diff.gz \ md5 614f2cc34817bb9460e3b700be21b94b \ sha1 c2911f04f8d46a28afa9f9cbb7ec226cb2c893d1 \ rmd160 6466cd0825e80366adc1978069e3c61255e0bde7 patch.pre_args post-patch { reinplace "s|TMP_SSH_VERSION SSH_PORTABLE|TMP_SSH_VERSION SSH_PORTABLE SSH_HPN|" ${worksrcpath}/version.h } } platform darwin { # create link to /usr/include/pam because 'security' was renamed to 'pam' # in OS X. pre-configure { xinstall -d ${workpath}/include file delete ${workpath}/include/security ln -s /usr/include/pam ${workpath}/include/security } } platform darwin 9 { patch_sites-append http://www.opensource.apple.com/darwinsource/10.5/OpenSSH-87/patches/:apple patchfiles-append DVG-5142987_launchd_DISPLAY_for_X11.patch:apple checksums-append DVG-5142987_launchd_DISPLAY_for_X11.patch \ md5 e188ebbba95c4cde61e0e1b2edc9f992 \ sha1 62735c5bfbbe1fa41433993435ded7767cc5f1f9 \ rmd160 eb5262f554583f4925f6f91f6a6d0034c70098ad } startupitem.create yes startupitem.name OpenSSH startupitem.start \ "if \[ -x ${prefix}/sbin/sshd ]; then if \[ ! -f ${prefix}/etc/ssh/ssh_host_key \]; then ${prefix}/bin/ssh-keygen -t rsa1 -f \\ ${prefix}/etc/ssh/ssh_host_key -N \"\" -C `hostname` fi if \[ ! -f ${prefix}/etc/ssh/ssh_host_dsa_key \]; then ${prefix}/bin/ssh-keygen -t dsa -f \\ ${prefix}/etc/ssh/ssh_host_dsa_key -N \"\" -C `hostname` fi if \[ ! -f ${prefix}/etc/ssh/ssh_host_rsa_key \]; then ${prefix}/bin/ssh-keygen -t rsa -f \\ ${prefix}/etc/ssh/ssh_host_rsa_key -N \"\" -C `hostname` fi ${prefix}/sbin/sshd fi" startupitem.stop \ "if \[ -r ${prefix}/var/run/sshd.pid \]; then kill `cat ${prefix}/var/run/sshd.pid` fi"