aboutsummaryrefslogtreecommitdiffstats
path: root/security/openssh
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>1999-11-18 09:46:43 +0800
committergreen <green@FreeBSD.org>1999-11-18 09:46:43 +0800
commitc4ba944f4e0724a052bd90cf3284b64692214773 (patch)
treec0c34beb09b3d4191834df59dbf8f15e45090cc2 /security/openssh
parent4eefa58ee798cdc243bf8fa08919c5b24218abd3 (diff)
downloadfreebsd-ports-gnome-c4ba944f4e0724a052bd90cf3284b64692214773.tar.gz
freebsd-ports-gnome-c4ba944f4e0724a052bd90cf3284b64692214773.tar.zst
freebsd-ports-gnome-c4ba944f4e0724a052bd90cf3284b64692214773.zip
Make the second CVS site work for real.
Move sshd.sh to files and ${INSTALL_SCRIPT}/${PERL} -pi it. Clean up the Makefile's style a bit (MNF anyone? :) Add WWW: to pkg/DESCR. Change MASTER_SITES back to CVS_SITES to avoid problems with MASTER_SITE_OVERRIDE. Parts submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>, Robert Muir <rmuir@gibralter.net>
Diffstat (limited to 'security/openssh')
-rw-r--r--security/openssh/Makefile52
-rw-r--r--security/openssh/files/sshd.sh7
-rw-r--r--security/openssh/pkg-descr4
-rw-r--r--security/openssh/pkg-plist1
4 files changed, 39 insertions, 25 deletions
diff --git a/security/openssh/Makefile b/security/openssh/Makefile
index a6cbb0f73dea..b3421432461f 100644
--- a/security/openssh/Makefile
+++ b/security/openssh/Makefile
@@ -9,8 +9,7 @@
DISTNAME= src/usr.bin/ssh
PKGNAME= OpenSSH-1.2
CATEGORIES= security net
-MASTER_SITES= anoncvs@anoncvs1.ca.openbsd.org:/cvs \
- :pserver:anoncvs@anoncvs1.usa.openbsd.org:/cvs
+MASTER_SITES= # See ${CVS_SITES}
MAINTAINER= green@FreeBSD.org
@@ -24,6 +23,8 @@ DISTFILES!= ${CAT} ${FILESDIR}/distfiles
CVS_CMD?= cvs -z3
CVS_DATE= Wed Nov 17 14:09:01 EST 1999
+CVS_SITES= anoncvs@anoncvs1.ca.openbsd.org:/cvs \
+ :pserver:anoncvs@anoncvs1.usa.openbsd.org:/cvs
CRYPTOLIBS= -L${PREFIX}/lib -lcrypto
.if defined(USA_RESIDENT) && ${USA_RESIDENT} == YES
CRYPTOLIBS+= -lRSAglue -lrsaref
@@ -54,17 +55,16 @@ do-fetch:
fi; \
${MKDIR} ${DISTDIR}/${PKGNAME} && \
cd ${DISTDIR}/${PKGNAME} || exit; \
- for CVS_SITE in ${MASTER_SITES}; do \
- ${ECHO_MSG} ">> Attempting to CVS checkout from\
- $${CVS_SITE}."; \
- ${CVS_CMD} -d $${CVS_SITE} co -D "${CVS_DATE}" \
- ${DISTNAME} && { ${ECHO} -n ${CVS_DATE} > \
- ${STAMPFILE} && exit; }; \
+ for CVS_SITE in ${CVS_SITES}; do \
+ ${ECHO_MSG} ">> Attempting to CVS checkout from $${CVS_SITE}."; \
+ if ${CVS_CMD} -d $${CVS_SITE} co -D "${CVS_DATE}" \
+ ${DISTNAME}; then \
+ ${ECHO} -n ${CVS_DATE} > ${STAMPFILE}; \
+ exit; \
+ fi \
done; \
- ${ECHO_MSG} ">> Couldn't CVS checkout ${PKGNAME}. Please try\
- to retrieve"; \
- ${ECHO_MSG} ">> this port manually into ${_DISTDIR} and try\
- again."; \
+ ${ECHO_MSG} ">> Couldn't CVS checkout ${PKGNAME}. Please try to retrieve"; \
+ ${ECHO_MSG} ">> this port manually into ${_DISTDIR} and try again."; \
exit 1; \
fi
@@ -75,29 +75,35 @@ do-extract:
post-patch:
@${PERL} -pi.orig -e 's:(_PATH_STDPATH):$$1 "${PREFIX}/bin":g' \
- ${WRKSRC}/sshd.c
+ ${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
@${PERL} -pi.openssl -e \
- 's:^(\s*#\s*include\s+<)ssl(/\w+\.h>\s*)$$:$$1openssl$$2:g' \
- ${WRKSRC}/*.[ch]
+ 's:^(\s*#\s*include\s+<)ssl(/\w+\.h>\s*)$$:$$1openssl$$2:g' \
+ ${WRKSRC}/*.[ch]
pre-install:
@if [ ! -f ${PREFIX}/etc/sshd_config ]; then \
cd ${WRKSRC} && ${MAKE} DESTDIR=${PREFIX} distribution; \
else \
- ${ECHO} ">> ${PREFIX}/etc/sshd_config exists, not being replaced!"; \
- ${ECHO} ">> If this is left over from another version of SSH, you will"; \
- ${ECHO} ">> need to update it to work with OpenSSH."; \
+ ${ECHO_MSG} ">> ${PREFIX}/etc/sshd_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."; \
fi
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; \
+ ${ECHO_MSG} ">> Installing ${PREFIX}/etc/rc.d/sshd.sh startup file."; \
+ ${MKDIR} ${PREFIX}/etc/rc.d; \
+ ${INSTALL_SCRIPT} ${FILESDIR}/sshd.sh \
+ ${PREFIX}/etc/rc.d; \
+ ${PERL} -pi -e 's:__PREFIX__:${PREFIX}:g' \
+ ${PREFIX}/etc/rc.d/sshd.sh; \
fi
+ @if [ ! -f ${PREFIX}/etc/ssh_host_key ]; then \
+ ${ECHO_MSG} "Generating a secret host key..."; \
+ ${PREFIX}/bin/ssh-keygen -N "" -f ${PREFIX}/etc/ssh_host_key; \
+ fi
+
.include <bsd.port.mk>
diff --git a/security/openssh/files/sshd.sh b/security/openssh/files/sshd.sh
new file mode 100644
index 000000000000..78e7ec188619
--- /dev/null
+++ b/security/openssh/files/sshd.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Secure Shell daemon startup script
+# $FreeBSD$
+
+if [ -x __PREFIX__/sbin/sshd ]; then
+ __PREFIX__/sbin/sshd && echo -n ' sshd'
+fi
diff --git a/security/openssh/pkg-descr b/security/openssh/pkg-descr
index 77313af4448f..cf7dd20e9fe9 100644
--- a/security/openssh/pkg-descr
+++ b/security/openssh/pkg-descr
@@ -8,7 +8,9 @@ OpenSSH is a version of Secure Shell based upon a much less encumbered
SSH version 1.2.12, which has a BSD-style license. Maintained by the
OpenBSD project, this is the most free and secure SSH implementation
in the world. OpenSSH supports SSH protocol version 1.5 and has all
-known bugs from SSH fixed.
+known bugs from SSH fixed, and even some unknown ones :)
+
+WWW: http://www.openssh.com/
- Brian Feldman
green@FreeBSD.org
diff --git a/security/openssh/pkg-plist b/security/openssh/pkg-plist
index 4cd9e6d7bfe1..64d58c70158f 100644
--- a/security/openssh/pkg-plist
+++ b/security/openssh/pkg-plist
@@ -11,4 +11,3 @@ man/man1/ssh-keygen.1.gz
man/man1/ssh.1.gz
man/man8/sshd.8.gz
sbin/sshd
-@exec if [ ! -f %D/etc/ssh_host_key ]; then echo "Generating a secret host key..."; %D/bin/ssh-keygen -N "" -f %D/etc/ssh_host_key; fi