source: trunk/dports/net/openssh/Portfile @ 32433

Last change on this file since 32433 was 32433, checked in by ram@…, 11 years ago

net/openssh: update to v20 of high performance patch for hpn variant

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.0 KB
Line 
1# $Id: Portfile 32433 2007-12-31 14:19:58Z ram@macports.org $
2
3PortSystem 1.0
4
5name            openssh
6version         4.7p1
7revision        1
8categories      net
9maintainers     nomaintainer
10description     OpenSSH secure login server
11long_description  OpenSSH is a FREE version of the SSH protocol suite of \
12          network connectivity tools that increasing numbers of people on the \
13          Internet are coming to rely on. Many users of telnet, rlogin, ftp, \
14          and other such programs might not realize that their password is \
15          transmitted across the Internet unencrypted, but it is. OpenSSH \
16          encrypts all traffic (including passwords) to effectively eliminate \
17          eavesdropping, connection hijacking, and other network-level \
18          attacks. Additionally, OpenSSH provides a myriad of secure \
19          tunneling capabilities, as well as a variety of authentication \
20          methods.
21homepage        http://www.openssh.com/
22platforms       darwin
23checksums       ${distfiles} md5 50a800fd2c6def9e9a53068837e87b91 \
24        ${distfiles} sha1 58357db9e64ba6382bef3d73d1d386fcdc0508f4 \
25        ${distfiles} rmd160 b828e79d3d1a931cb77651ec7d7276cf3ba22d90
26master_sites    openbsd:OpenSSH/portable \
27        ftp://carroll.cac.psu.edu/pub/OpenBSD/OpenSSH/portable/ \
28        ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
29        http://mirror.mcs.anl.gov/openssh/portable/ \
30        http://openssh.hostingzero.com/portable/ \
31        ftp://ftp5.usa.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
32        ftp://ftp3.usa.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
33        ftp://ftp.cise.ufl.edu/pub/mirrors/openssh/portable/ \
34        ftp://reflection.ncsa.uiuc.edu/pub/OpenBSD/OpenSSH/portable/ \
35        ftp://mirror.sg.depaul.edu/pub/OpenBSD/OpenSSH/portable/ \
36        ftp://mirror.mcs.anl.gov/pub/openssh/portable/ \
37        ftp://rt.fm/pub/OpenBSD/OpenSSH/portable/ \
38        ftp://ftp.cse.buffalo.edu/pub/OpenBSD/OpenSSH/portable/ \
39        ftp://openbsd.mirrors.pair.com/OpenSSH/portable/ \
40        ftp://openbsd.secsup.org/pub/openbsd/OpenSSH/portable/ \
41        ftp://ftp.tux.org/bsd/openbsd/OpenSSH/portable/
42depends_lib     port:openssl port:zlib
43
44# Specified -fno-builtin because GCC 3.3 has log() as a builtin
45# (from math.h) while OpenSSH has its own log() function
46# -- from fink.
47configure.cppflags-append "-fno-builtin"
48configure.args --with-ssl-dir=${prefix} --sysconfdir=${prefix}/etc/ssh \
49  --with-privsep-path=${prefix}/var/empty --with-md5-passwords \
50  --with-pid-dir=${prefix}/var/run --with-tcp-wrappers \
51  --with-pam --disable-suid-ssh --with-random=/dev/urandom \
52  --mandir=${prefix}/share/man --with-zlib=${prefix}
53
54destroot.target install-nokeys
55
56post-destroot {
57  destroot.keepdirs ${destroot}${prefix}/var/run ${destroot}${prefix}/var/empty
58  reinplace "s|#Port 22|Port 2222|g" ${destroot}${prefix}/etc/ssh/sshd_config
59}
60
61# For X11 Forwarding
62variant  apple-x11 { # set for X11 forwarding
63  configure.args-append --with-xauth=/usr/X11R6/bin/xauth
64 }
65
66variant kerberos {
67  configure.args-append --with-kerberos5=/usr
68}
69
70# For high-performance patch
71variant hpn {
72  patch_sites-append    http://www.psc.edu/networking/projects/hpn-ssh/
73  patchfiles-append     ${distname}-hpn12v20.diff.gz
74  checksums-append      ${distname}-hpn12v20.diff.gz \
75                        md5 7a75e87b03e4d713973c5a3330a68ab5 \
76                        sha1 4eaf906494f4d71422775f8c0c817f4373978055 \
77                        rmd160 d491c864f1be1228a275189865dc4873ca891849
78  patch.pre_args
79  post-patch {
80    reinplace "s|TMP_SSH_VERSION SSH_PORTABLE|TMP_SSH_VERSION SSH_PORTABLE SSH_HPN|" ${worksrcpath}/version.h
81  }
82}
83
84platform darwin {
85  # create link to /usr/include/pam because 'security' was renamed to 'pam'
86  # in OS X.
87  pre-configure {
88    xinstall -d ${workpath}/include
89    file delete ${workpath}/include/security
90    ln -s /usr/include/pam ${workpath}/include/security
91  }
92}
93
94platform darwin 8 {
95  configure.compiler    gcc-4.0
96}
97
98platform darwin 9 {
99  patch_sites-append   http://www.opensource.apple.com/darwinsource/10.5/OpenSSH-87/patches/
100  patchfiles-append    DVG-5142987_launchd_DISPLAY_for_X11.patch \
101                       patch-pwdup.diff
102  checksums-append     DVG-5142987_launchd_DISPLAY_for_X11.patch md5 e188ebbba95c4cde61e0e1b2edc9f992 \
103                           sha1 62735c5bfbbe1fa41433993435ded7767cc5f1f9 \
104                           rmd160 eb5262f554583f4925f6f91f6a6d0034c70098ad
105}
106
107startupitem.create  yes
108startupitem.name    OpenSSH
109startupitem.start \
110    "if \[ -x ${prefix}/sbin/sshd ]; then
111        if \[ ! -f ${prefix}/etc/ssh/ssh_host_key \]; then
112            ${prefix}/bin/ssh-keygen -t rsa1 -f \\
113            ${prefix}/etc/ssh/ssh_host_key -N \"\" -C `hostname`
114        fi
115        if \[ ! -f ${prefix}/etc/ssh/ssh_host_dsa_key \]; then
116            ${prefix}/bin/ssh-keygen -t dsa -f \\
117            ${prefix}/etc/ssh/ssh_host_dsa_key -N \"\" -C `hostname`
118        fi
119        if \[ ! -f ${prefix}/etc/ssh/ssh_host_rsa_key \]; then
120            ${prefix}/bin/ssh-keygen -t rsa -f \\
121            ${prefix}/etc/ssh/ssh_host_rsa_key -N \"\" -C `hostname`
122        fi
123        ${prefix}/sbin/sshd
124        fi"
125startupitem.stop \
126    "if \[ -r ${prefix}/var/run/sshd.pid \]; then
127        kill `cat ${prefix}/var/run/sshd.pid`
128        fi"
Note: See TracBrowser for help on using the repository browser.