| @@ -1,17 +1,18 @@ | | | @@ -1,17 +1,18 @@ |
1 | # $NetBSD: Makefile,v 1.199.2.1 2011/05/15 09:33:30 sbd Exp $ | | 1 | # $NetBSD: Makefile,v 1.199.2.2 2011/05/20 07:53:58 tron Exp $ |
2 | | | 2 | |
3 | DISTNAME= openssh-5.8p2 | | 3 | DISTNAME= openssh-5.8p2 |
4 | PKGNAME= openssh-5.8.2 | | 4 | PKGNAME= openssh-5.8.2 |
| | | 5 | PKGREVISION= 2 |
5 | SVR4_PKGNAME= ossh | | 6 | SVR4_PKGNAME= ossh |
6 | CATEGORIES= security | | 7 | CATEGORIES= security |
7 | MASTER_SITES= ftp://ftp.openssh.com/pub/OpenBSD/OpenSSH/portable/ \ | | 8 | MASTER_SITES= ftp://ftp.openssh.com/pub/OpenBSD/OpenSSH/portable/ \ |
8 | ftp://ftp3.usa.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \ | | 9 | ftp://ftp3.usa.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \ |
9 | ftp://gd.tuwien.ac.at/opsys/OpenBSD/OpenSSH/portable/ \ | | 10 | ftp://gd.tuwien.ac.at/opsys/OpenBSD/OpenSSH/portable/ \ |
10 | ftp://ftp.freenet.de/pub/ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \ | | 11 | ftp://ftp.freenet.de/pub/ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \ |
11 | ftp://ftp.jaist.ac.jp/pub/OpenBSD/OpenSSH/portable/ \ | | 12 | ftp://ftp.jaist.ac.jp/pub/OpenBSD/OpenSSH/portable/ \ |
12 | ftp://ftp.belnet.be/packages/openbsd/OpenSSH/portable/ | | 13 | ftp://ftp.belnet.be/packages/openbsd/OpenSSH/portable/ |
13 | # Don't delete the last entry -- it's there if the pkgsrc version is not | | 14 | # Don't delete the last entry -- it's there if the pkgsrc version is not |
14 | # up-to-date and the mirrors already removed the old distfile. | | 15 | # up-to-date and the mirrors already removed the old distfile. |
15 | | | 16 | |
16 | MAINTAINER= pkgsrc-users@NetBSD.org | | 17 | MAINTAINER= pkgsrc-users@NetBSD.org |
17 | HOMEPAGE= http://www.openssh.com/ | | 18 | HOMEPAGE= http://www.openssh.com/ |
| @@ -94,30 +95,38 @@ CONFIGURE_ARGS+= --without-zlib-version- | | | @@ -94,30 +95,38 @@ CONFIGURE_ARGS+= --without-zlib-version- |
94 | # defaults to ${CC} if not. we override LD here, since running the | | 95 | # defaults to ${CC} if not. we override LD here, since running the |
95 | # linker directly results in undefined symbols for obvious reasons. | | 96 | # linker directly results in undefined symbols for obvious reasons. |
96 | # | | 97 | # |
97 | CONFIGURE_ENV+= LD=${CC:Q} | | 98 | CONFIGURE_ENV+= LD=${CC:Q} |
98 | | | 99 | |
99 | # Enable S/Key support on NetBSD, Darwin, and Solaris. | | 100 | # Enable S/Key support on NetBSD, Darwin, and Solaris. |
100 | .if (${OPSYS} == "NetBSD") || (${OPSYS} == "Darwin") || (${OPSYS} == "SunOS") | | 101 | .if (${OPSYS} == "NetBSD") || (${OPSYS} == "Darwin") || (${OPSYS} == "SunOS") |
101 | . include "../../security/skey/buildlink3.mk" | | 102 | . include "../../security/skey/buildlink3.mk" |
102 | CONFIGURE_ARGS+= --with-skey=${BUILDLINK_PREFIX.skey} | | 103 | CONFIGURE_ARGS+= --with-skey=${BUILDLINK_PREFIX.skey} |
103 | .else | | 104 | .else |
104 | CONFIGURE_ARGS+= --without-skey | | 105 | CONFIGURE_ARGS+= --without-skey |
105 | .endif | | 106 | .endif |
106 | | | 107 | |
107 | .if (${OPSYS} == "NetBSD") && exists(/usr/include/utmpx.h) | | 108 | .if (${OPSYS} == "NetBSD") |
| | | 109 | . if exists(/usr/include/utmpx.h) |
108 | # if we have utmpx et al do not try to use login() | | 110 | # if we have utmpx et al do not try to use login() |
109 | CONFIGURE_ARGS+= --disable-libutil | | 111 | CONFIGURE_ARGS+= --disable-libutil |
| | | 112 | . endif |
| | | 113 | # |
| | | 114 | # NetBSD current after 2011/03/12 has incompatible strnvis(3) and |
| | | 115 | # prior version don't have it. So, disable use of strnvis(3) now. |
| | | 116 | # |
| | | 117 | CONFIGURE_ENV+= ac_cv_func_strnvis=no |
110 | .endif | | 118 | .endif |
| | | 119 | |
111 | .if (${OPSYS} == "SunOS") && (${OS_VERSION} == "5.8" || ${OS_VERSION} == "5.9") | | 120 | .if (${OPSYS} == "SunOS") && (${OS_VERSION} == "5.8" || ${OS_VERSION} == "5.9") |
112 | CONFIGURE_ARGS+= --disable-utmp --disable-wtmp | | 121 | CONFIGURE_ARGS+= --disable-utmp --disable-wtmp |
113 | .endif | | 122 | .endif |
114 | .if ${OPSYS} == "Linux" | | 123 | .if ${OPSYS} == "Linux" |
115 | CONFIGURE_ARGS+= --enable-md5-password | | 124 | CONFIGURE_ARGS+= --enable-md5-password |
116 | .endif | | 125 | .endif |
117 | | | 126 | |
118 | # The ssh-askpass program is in ${X11BASE}/bin or ${X11PREFIX}/bin depending | | 127 | # The ssh-askpass program is in ${X11BASE}/bin or ${X11PREFIX}/bin depending |
119 | # on if it's part of the X11 distribution, or if it's installed from pkgsrc | | 128 | # on if it's part of the X11 distribution, or if it's installed from pkgsrc |
120 | # (security/ssh-askpass). | | 129 | # (security/ssh-askpass). |
121 | # | | 130 | # |
122 | .if exists(${X11BASE}/bin/ssh-askpass) | | 131 | .if exists(${X11BASE}/bin/ssh-askpass) |
123 | ASKPASS_PROGRAM= ${X11BASE}/bin/ssh-askpass | | 132 | ASKPASS_PROGRAM= ${X11BASE}/bin/ssh-askpass |
| @@ -143,38 +152,52 @@ MESSAGE_SRC+= ${.CURDIR}/MESSAGE.urando | | | @@ -143,38 +152,52 @@ MESSAGE_SRC+= ${.CURDIR}/MESSAGE.urando |
143 | .else | | 152 | .else |
144 | CONFIGURE_ARGS+= --without-random | | 153 | CONFIGURE_ARGS+= --without-random |
145 | CONFS+= ssh_prng_cmds | | 154 | CONFS+= ssh_prng_cmds |
146 | PLIST_SRC+= ${.CURDIR}/PLIST.prng | | 155 | PLIST_SRC+= ${.CURDIR}/PLIST.prng |
147 | .endif | | 156 | .endif |
148 | | | 157 | |
149 | EGDIR= ${PREFIX}/share/examples/${PKGBASE} | | 158 | EGDIR= ${PREFIX}/share/examples/${PKGBASE} |
150 | CONF_FILES= # empty | | 159 | CONF_FILES= # empty |
151 | .for f in ${CONFS} | | 160 | .for f in ${CONFS} |
152 | CONF_FILES+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f} | | 161 | CONF_FILES+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f} |
153 | .endfor | | 162 | .endfor |
154 | OWN_DIRS= ${OPENSSH_CHROOT} | | 163 | OWN_DIRS= ${OPENSSH_CHROOT} |
155 | RCD_SCRIPTS= sshd | | 164 | RCD_SCRIPTS= sshd |
| | | 165 | RCD_SCRIPT_SRC.sshd= ${WRKDIR}/sshd.sh |
156 | | | 166 | |
157 | PLIST_SRC+= ${.CURDIR}/PLIST | | 167 | PLIST_SRC+= ${.CURDIR}/PLIST |
158 | FILES_SUBST+= SSH_PID_DIR=${SSH_PID_DIR:Q} | | 168 | FILES_SUBST+= SSH_PID_DIR=${SSH_PID_DIR:Q} |
159 | | | 169 | |
160 | SUBST_CLASSES+= patch | | 170 | SUBST_CLASSES+= patch |
161 | SUBST_STAGE.patch= pre-configure | | 171 | SUBST_STAGE.patch= pre-configure |
162 | SUBST_FILES.patch= session.c | | 172 | SUBST_FILES.patch= session.c |
163 | SUBST_SED.patch= -e '/channel_input_port_forward_request/s/0/ROOTUID/' | | 173 | SUBST_SED.patch= -e '/channel_input_port_forward_request/s/0/ROOTUID/' |
164 | SUBST_MESSAGE.patch= More patch a file. | | 174 | SUBST_MESSAGE.patch= More patch a file. |
165 | | | 175 | |
166 | .include "../../devel/zlib/buildlink3.mk" | | 176 | .include "../../devel/zlib/buildlink3.mk" |
167 | .include "../../security/openssl/buildlink3.mk" | | 177 | .include "../../security/openssl/buildlink3.mk" |
168 | .include "../../security/tcp_wrappers/buildlink3.mk" | | 178 | .include "../../security/tcp_wrappers/buildlink3.mk" |
169 | | | 179 | |
| | | 180 | # |
| | | 181 | # type of key "ecdsa" isn't always supported depends on OpenSSL. |
| | | 182 | # |
| | | 183 | post-configure: |
| | | 184 | if ${EGREP} -q '^\#define[ ]+OPENSSL_HAS_ECC' \ |
| | | 185 | ${WRKSRC}/config.h; then \ |
| | | 186 | ${SED} -e '/HAVE_ECDSA/s/.*//' \ |
| | | 187 | ${FILESDIR}/sshd.sh > ${WRKDIR}/sshd.sh; \ |
| | | 188 | else \ |
| | | 189 | ${SED} -e '/HAVE_ECDSA_START/,/HAVE_ECDSA_STOP/d' \ |
| | | 190 | ${FILESDIR}/sshd.sh > ${WRKDIR}/sshd.sh; \ |
| | | 191 | fi |
| | | 192 | |
170 | post-install: | | 193 | post-install: |
171 | ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR} | | 194 | ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR} |
172 | cd ${WRKSRC}; for file in ${CONFS}; do \ | | 195 | cd ${WRKSRC}; for file in ${CONFS}; do \ |
173 | ${INSTALL_DATA} $${file}.out ${DESTDIR}${EGDIR}/$${file}; \ | | 196 | ${INSTALL_DATA} $${file}.out ${DESTDIR}${EGDIR}/$${file}; \ |
174 | done | | 197 | done |
175 | .if !empty(PKG_OPTIONS:Mpam) && ${OPSYS} == "Linux" | | 198 | .if !empty(PKG_OPTIONS:Mpam) && ${OPSYS} == "Linux" |
176 | ${INSTALL_DATA} ${WRKSRC}/contrib/sshd.pam.generic \ | | 199 | ${INSTALL_DATA} ${WRKSRC}/contrib/sshd.pam.generic \ |
177 | ${DESTDIR}${EGDIR}/sshd.pam | | 200 | ${DESTDIR}${EGDIR}/sshd.pam |
178 | .endif | | 201 | .endif |
179 | | | 202 | |
180 | .include "../../mk/bsd.pkg.mk" | | 203 | .include "../../mk/bsd.pkg.mk" |