1999-11-08 01:20:54 -05:00
|
|
|
# New ports collection makefile for: OpenSSH
|
|
|
|
# Date created: 7 October 1999
|
|
|
|
# Whom: green
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2000-04-09 14:34:06 -04:00
|
|
|
PORTNAME= OpenSSH
|
2000-06-27 17:30:39 -04:00
|
|
|
PORTVERSION= 2.1.1
|
2000-06-01 23:18:54 -04:00
|
|
|
CATEGORIES= security
|
2000-05-13 13:11:01 -04:00
|
|
|
MASTER_SITES= ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/ \
|
|
|
|
ftp://ftp.usa.openbsd.org/pub/OpenBSD/OpenSSH/ \
|
|
|
|
ftp://ftp1.se.openbsd.org/pub/OpenBSD/OpenSSH/
|
2000-06-27 17:30:39 -04:00
|
|
|
DISTNAME= openssh-${PORTVERSION}
|
2000-05-13 13:11:01 -04:00
|
|
|
EXTRACT_SUFX= .tgz
|
1999-11-08 01:20:54 -05:00
|
|
|
|
|
|
|
MAINTAINER= green@FreeBSD.org
|
|
|
|
|
2000-02-12 18:55:48 -05:00
|
|
|
USE_OPENSSL= RSA
|
1999-11-08 01:20:54 -05:00
|
|
|
|
1999-11-13 00:55:42 -05:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2000-02-12 18:55:48 -05:00
|
|
|
CRYPTOLIBS= -L${OPENSSLLIB} -lcrypto
|
|
|
|
.if defined(OPENSSL_RSAREF)
|
|
|
|
CRYPTOLIBS+= -lRSAglue -L${LOCALBASE}/lib -lrsaref
|
2000-02-10 07:23:49 -05:00
|
|
|
.endif
|
1999-11-13 00:55:42 -05:00
|
|
|
# Here, MANDIR is concetenated to DESTDIR which all forms the man install dir...
|
2000-02-15 23:52:59 -05:00
|
|
|
MAKE_ENV+= DESTDIR=${PREFIX} MANDIR=/man/man CRYPTOLIBS="${CRYPTOLIBS}"
|
2000-01-18 06:18:25 -05:00
|
|
|
.if ${OSVERSION} < 400014
|
|
|
|
MAKE_ENV+= COMPAT_GETADDRINFO=yes
|
2000-02-01 12:04:02 -05:00
|
|
|
.else
|
2000-02-08 22:28:48 -05:00
|
|
|
MAKE_ENV+= INET6FLAGS=-DINET6
|
2000-01-18 06:18:25 -05:00
|
|
|
.endif
|
1999-11-11 09:33:23 -05:00
|
|
|
.if !exists(/usr/include/tcpd.h)
|
1999-11-15 01:18:46 -05:00
|
|
|
MAKE_ENV+= TCP_WRAPPERS=no
|
|
|
|
.endif
|
|
|
|
.if defined(AFS) && ${AFS} == YES
|
|
|
|
MAKE_ENV+= AFS=yes
|
|
|
|
.endif
|
|
|
|
.if defined(KERBEROS) && ${KERBEROS} == YES
|
|
|
|
MAKE_ENV+= KERBEROS=yes
|
|
|
|
.endif
|
1999-11-29 02:09:45 -05:00
|
|
|
.if exists(/usr/include/security/pam_modules.h)
|
|
|
|
PAM?= yes
|
|
|
|
.else
|
|
|
|
PAM= no
|
|
|
|
.endif
|
|
|
|
MAKE_ENV+= PAM=${PAM}
|
1999-11-15 01:18:46 -05:00
|
|
|
.if defined(SKEY) && ${SKEY} == YES
|
|
|
|
MAKE_ENV+= SKEY=yes
|
1999-11-11 09:33:23 -05:00
|
|
|
.endif
|
1999-11-08 01:20:54 -05:00
|
|
|
WRKSRC= ${WRKDIR}/ssh
|
|
|
|
|
2000-05-13 13:11:01 -04:00
|
|
|
post-extract:
|
1999-11-23 22:36:23 -05:00
|
|
|
@${CP} ${FILESDIR}/strlcat.c ${FILESDIR}/strlcpy.c ${WRKSRC}/lib/
|
2000-05-13 13:11:01 -04:00
|
|
|
@${CP} ${FILESDIR}/sshd.sh ${WRKSRC}/
|
2000-01-18 06:18:25 -05:00
|
|
|
.if ${OSVERSION} < 400014
|
2000-01-13 18:22:17 -05:00
|
|
|
@${CP} ${FILESDIR}/getaddrinfo.c ${FILESDIR}/name6.c ${WRKSRC}/lib/
|
|
|
|
@${CP} ${FILESDIR}/bindresvport.c ${FILESDIR}/rcmd.c ${WRKSRC}/lib/
|
2000-01-18 06:18:25 -05:00
|
|
|
@${CP} ${FILESDIR}/getnameinfo.c ${WRKSRC}/lib/
|
2000-01-13 18:22:17 -05:00
|
|
|
@${CP} ${FILESDIR}/netdb.h ${WRKSRC}/
|
|
|
|
.endif
|
1999-11-29 02:09:45 -05:00
|
|
|
@${MKDIR} ${WRKSRC}/pam_ssh
|
|
|
|
@${CP} ${FILESDIR}/pam_ssh_Makefile ${WRKSRC}/pam_ssh/Makefile
|
|
|
|
@${CP} ${FILESDIR}/pam_ssh.c ${WRKSRC}/pam_ssh/
|
1999-11-11 09:33:23 -05:00
|
|
|
|
1999-11-13 00:55:42 -05:00
|
|
|
post-patch:
|
2000-05-13 13:11:01 -04:00
|
|
|
@${PERL} -pi -e 's:__PREFIX__:${PREFIX}:g' ${WRKSRC}/ssh.h \
|
|
|
|
${WRKSRC}/sshd_config ${WRKSRC}/pam_ssh/pam_ssh.c \
|
|
|
|
${WRKSRC}/sshd.sh
|
1999-11-13 00:55:42 -05:00
|
|
|
|
1999-11-29 02:09:45 -05:00
|
|
|
.if ${PAM} == yes
|
|
|
|
PLIST= ${WRKDIR}/PLIST
|
|
|
|
|
|
|
|
do-configure:
|
|
|
|
@${CP} ${PKGDIR}/PLIST ${PLIST}
|
|
|
|
@${ECHO} "@cwd /usr" >> ${PLIST}
|
|
|
|
@${ECHO} "lib/pam_ssh.so" >> ${PLIST}
|
|
|
|
.endif
|
|
|
|
|
1999-11-19 22:42:05 -05:00
|
|
|
post-install:
|
1999-11-22 17:45:47 -05:00
|
|
|
.if !exists(${PREFIX}/etc/ssh_host_key)
|
2000-05-13 13:11:01 -04:00
|
|
|
@${ECHO_MSG} ">> Generating an RSA secret host key."
|
1999-11-22 22:04:05 -05:00
|
|
|
${PREFIX}/bin/ssh-keygen -N "" -f ${PREFIX}/etc/ssh_host_key
|
1999-11-22 17:45:47 -05:00
|
|
|
.endif
|
2000-05-13 13:11:01 -04:00
|
|
|
.if !exists(${PREFIX}/etc/ssh_host_dsa_key)
|
|
|
|
@${ECHO_MSG} ">> Generating a DSA secret host key."
|
|
|
|
${PREFIX}/bin/ssh-keygen -d -N "" -f ${PREFIX}/etc/ssh_host_dsa_key
|
|
|
|
.endif
|
1999-11-19 22:42:05 -05:00
|
|
|
.if !exists(${PREFIX}/etc/rc.d/sshd.sh)
|
2000-05-13 15:50:57 -04:00
|
|
|
@${INSTALL_SCRIPT} ${WRKSRC}/sshd.sh ${PREFIX}/etc/rc.d/
|
1999-11-19 22:42:05 -05:00
|
|
|
.endif
|
1999-11-22 17:45:47 -05:00
|
|
|
.if !exists(${PREFIX}/etc/ssh_config) && !exists(${PREFIX}/etc/sshd_config)
|
|
|
|
@cd ${WRKSRC}; \
|
|
|
|
${MAKE} DESTDIR=${PREFIX} distribution
|
|
|
|
.else
|
|
|
|
@${ECHO_MSG} ">> ${PREFIX}/etc/ssh{,d}_config exists, not being replaced!"
|
|
|
|
@${ECHO_MSG} ">> If this is left over from another version of SSH, you will"
|
|
|
|
@${ECHO_MSG} ">> need to update it to work with OpenSSH."
|
|
|
|
.endif
|
1999-11-13 00:55:42 -05:00
|
|
|
|
2000-01-07 11:40:17 -05:00
|
|
|
.include <bsd.port.post.mk>
|