1999-11-08 06:20:54 +00:00
|
|
|
# New ports collection makefile for: OpenSSH
|
|
|
|
# Version required: 19991107
|
|
|
|
# Date created: 7 October 1999
|
|
|
|
# Whom: green
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
1999-11-13 05:55:42 +00:00
|
|
|
DISTNAME= src/usr.bin/ssh
|
|
|
|
PKGNAME= OpenSSH-1.2
|
|
|
|
CATEGORIES= security net
|
1999-11-08 06:20:54 +00:00
|
|
|
|
|
|
|
MAINTAINER= green@FreeBSD.org
|
|
|
|
|
1999-11-09 11:43:11 +00:00
|
|
|
LIB_DEPENDS= crypto.1:${PORTSDIR}/security/openssl
|
1999-11-08 06:20:54 +00:00
|
|
|
|
1999-11-11 14:33:23 +00:00
|
|
|
RESTRICTED= "Links with cryptographic code."
|
|
|
|
|
1999-11-13 05:55:42 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
CAT?= /bin/cat
|
|
|
|
DISTFILES!= ${CAT} ${FILESDIR}/distfiles
|
|
|
|
|
|
|
|
CVS_CMD?= cvs -z3
|
|
|
|
CVS_DATE= Fri Nov 12 20:27:53 EST 1999
|
|
|
|
CVS_SITE?= anoncvs@anoncvs1.ca.openbsd.org:/cvs
|
|
|
|
CRYPTOLIBS= -L${PREFIX}/lib -lcrypto
|
1999-11-08 06:20:54 +00:00
|
|
|
.if defined(USA_RESIDENT) && ${USA_RESIDENT} == YES
|
1999-11-13 05:55:42 +00:00
|
|
|
CRYPTOLIBS+= -lRSAglue -lrsaref
|
1999-11-08 06:20:54 +00:00
|
|
|
.endif
|
1999-11-13 05:55:42 +00:00
|
|
|
# Here, MANDIR is concetenated to DESTDIR which all forms the man install dir...
|
|
|
|
MAKE_ENV= DESTDIR=${PREFIX} MANDIR=/man/man CRYPTOLIBS="${CRYPTOLIBS}"
|
1999-11-11 14:33:23 +00:00
|
|
|
.if !exists(/usr/include/tcpd.h)
|
1999-11-15 06:18:46 +00: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
|
|
|
|
.if defined(SKEY) && ${SKEY} == YES
|
|
|
|
MAKE_ENV+= SKEY=yes
|
1999-11-11 14:33:23 +00:00
|
|
|
.endif
|
1999-11-13 05:55:42 +00:00
|
|
|
STAMPFILE= ${DISTDIR}/${PKGNAME}/.stamp
|
1999-11-08 06:20:54 +00:00
|
|
|
WRKSRC= ${WRKDIR}/ssh
|
|
|
|
|
1999-11-11 14:33:23 +00:00
|
|
|
do-fetch:
|
1999-11-13 05:55:42 +00:00
|
|
|
@if [ ! -e ${STAMPFILE} ] || \
|
|
|
|
[ "X${CVS_DATE}" != "X$$(${CAT} ${STAMPFILE})" ]; then \
|
|
|
|
unset CVS_RSH CVS_SERVER || ${TRUE}; \
|
|
|
|
${MKDIR} ${DISTDIR}/${PKGNAME} && \
|
|
|
|
cd ${DISTDIR}/${PKGNAME} && \
|
|
|
|
${CVS_CMD} -d ${CVS_SITE} co -D "${CVS_DATE}" ${DISTNAME} && \
|
|
|
|
${ECHO} -n ${CVS_DATE} > ${STAMPFILE}; \
|
1999-11-11 20:49:44 +00:00
|
|
|
fi
|
1999-11-11 14:33:23 +00:00
|
|
|
|
|
|
|
do-extract:
|
1999-11-13 05:55:42 +00:00
|
|
|
@${MKDIR} ${WRKDIR}
|
|
|
|
@${CP} -r ${DISTDIR}/${PKGNAME}/${DISTNAME} ${WRKDIR}
|
1999-11-11 14:33:23 +00:00
|
|
|
@${CP} ${FILESDIR}/strlcpy.c ${WRKSRC}/lib/
|
|
|
|
|
1999-11-13 05:55:42 +00:00
|
|
|
post-patch:
|
|
|
|
@${PERL} -pi.orig -e 's:_PATH_STDPATH:_PATH_STDPATH "${PREFIX}/bin":' \
|
|
|
|
${WRKSRC}/sshd.c
|
|
|
|
@${PERL} -pi.orig -e 's:__PREFIX__:${PREFIX}:g' ${WRKSRC}/ssh.h
|
|
|
|
@${PERL} -pi.orig -e 's:__PREFIX__:${PREFIX}:g' ${WRKSRC}/sshd_config
|
|
|
|
|
1999-11-08 06:20:54 +00:00
|
|
|
pre-install:
|
1999-11-09 12:43:45 +00:00
|
|
|
@cd ${WRKSRC} && ${MAKE} DESTDIR=${PREFIX} distribution
|
1999-11-08 06:20:54 +00:00
|
|
|
|
1999-11-13 05:55:42 +00:00
|
|
|
post-install:
|
|
|
|
@if [ ! -f ${PREFIX}/etc/rc.d/sshd.sh ]; then \
|
|
|
|
${ECHO} "Installing ${PREFIX}/etc/rc.d/sshd.sh startup file."; \
|
|
|
|
${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/sshd.sh; \
|
|
|
|
${ECHO} "[ -x ${PREFIX}/sbin/sshd ] && ${PREFIX}/sbin/sshd &&" \
|
|
|
|
"${ECHO} -n ' sshd'" >> ${PREFIX}/etc/rc.d/sshd.sh; \
|
|
|
|
${CHMOD} 755 ${PREFIX}/etc/rc.d/sshd.sh; \
|
|
|
|
fi
|
|
|
|
|
1999-11-08 06:20:54 +00:00
|
|
|
.include <bsd.port.mk>
|