summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2001-01-10 16:05:52 +0000
committertron <tron@pkgsrc.org>2001-01-10 16:05:52 +0000
commit8016e23d6e590fc710a00ed96a4edc8e4b676502 (patch)
tree4bc089abf1edfaa917755f6e78e37634a34fecf5 /security
parent17e236023da264f0ba4589368ed5a59336d8d42c (diff)
downloadpkgsrc-8016e23d6e590fc710a00ed96a4edc8e4b676502.tar.gz
Make this package work under SunOS.
Diffstat (limited to 'security')
-rw-r--r--security/openssh/Makefile10
-rw-r--r--security/openssh/pkg/INSTALL13
-rw-r--r--security/openssh/pkg/INSTALL.SunOS48
-rw-r--r--security/openssh/pkg/PLIST.SunOS22
4 files changed, 83 insertions, 10 deletions
diff --git a/security/openssh/Makefile b/security/openssh/Makefile
index 5358bf4cdb8..1e61af28863 100644
--- a/security/openssh/Makefile
+++ b/security/openssh/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.33 2001/01/10 15:10:59 tron Exp $
+# $NetBSD: Makefile,v 1.34 2001/01/10 16:05:52 tron Exp $
DISTNAME= openssh-2.3.0p1
CATEGORIES= security
@@ -74,6 +74,11 @@ MAKE_ENV+= ASKPASS_LOCATION=${X11BASE}/bin
MAKE_ENV+= ASKPASS_LOCATION=${X11PREFIX}/bin
.endif
+.if (${OPSYS} == SunOS)
+INSTALL_FILE= ${WRKDIR}/INSTALL.SunOS
+PLIST_SRC= ${PKGDIR}/PLIST.SunOS
+.endif
+
pre-configure:
cd ${WRKSRC} && autoreconf
@@ -81,12 +86,13 @@ post-build:
for FILE in \
${PKGDIR}/DEINSTALL \
${PKGDIR}/INSTALL \
+ ${PKGDIR}/INSTALL.SunOS \
${PKGDIR}/MESSAGE \
${FILESDIR}/sshd.sh; \
do \
${SED} -e 's#@SSH_CONF_DIR@#${SSH_CONF_DIR}#g' \
-e 's#@PREFIX@#${PREFIX}#g' \
- -e 's#@OPSYS@#${OPSYS}#g' \
+ -e 's#@INSTALL_DATA@#${INSTALL_DATA}#g' \
< $${FILE} > ${WRKDIR}/`basename $${FILE}`; \
done
diff --git a/security/openssh/pkg/INSTALL b/security/openssh/pkg/INSTALL
index 00cc2b9b35d..c111d3db259 100644
--- a/security/openssh/pkg/INSTALL
+++ b/security/openssh/pkg/INSTALL
@@ -1,17 +1,15 @@
#!/bin/sh
#
-# $NetBSD: INSTALL,v 1.3 2001/01/10 15:11:00 tron Exp $
+# $NetBSD: INSTALL,v 1.4 2001/01/10 16:05:53 tron Exp $
PKGNAME=$1
STAGE=$2
case ${STAGE} in
PRE-INSTALL)
- if [ "@OPSYS@" != "SunOS" ]
+ if ! dd if=/dev/urandom of=/dev/null bs=1 count=1 2>/dev/null >/dev/null
then
- if ! dd if=/dev/urandom of=/dev/null bs=1 count=1 2>/dev/null >/dev/null
- then
- cat << EOF
+ cat << EOF
===========================================================================
You need a working /dev/urandom for ${PKGNAME} to work.
@@ -21,14 +19,13 @@ containing the line:
pseudo-device rnd
===========================================================================
EOF
- exit 1
- fi
+ exit 1
fi
;;
POST-INSTALL)
SSH_CONF_DIR=@SSH_CONF_DIR@
SSH_EXAMPLE_DIR=${PKG_PREFIX}/share/examples/ssh
- INSTALL_DATA="/usr/bin/install -c -o root -g wheel -m 0644"
+ INSTALL_DATA="@INSTALL_DATA@"
if [ ! -d ${SSH_CONF_DIR} ]
then
diff --git a/security/openssh/pkg/INSTALL.SunOS b/security/openssh/pkg/INSTALL.SunOS
new file mode 100644
index 00000000000..8568090b716
--- /dev/null
+++ b/security/openssh/pkg/INSTALL.SunOS
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# $NetBSD: INSTALL.SunOS,v 1.1 2001/01/10 16:05:53 tron Exp $
+
+PKGNAME=$1
+STAGE=$2
+
+case ${STAGE} in
+PRE-INSTALL)
+ ;;
+POST-INSTALL)
+ SSH_CONF_DIR=@SSH_CONF_DIR@
+ SSH_EXAMPLE_DIR=${PKG_PREFIX}/share/examples/ssh
+ INSTALL_DATA="@INSTALL_DATA@"
+
+ if [ ! -d ${SSH_CONF_DIR} ]
+ then
+ echo "Creating directory ${SSH_CONF_DIR} for ssh config files.."
+ mkdir -p ${SSH_CONF_DIR}
+ fi
+ for file in ssh_config ssh_prng_cmds sshd_config
+ do
+ if [ ! -f ${SSH_CONF_DIR}/${file} ]
+ then
+ echo "Installing example ${file} in ${SSH_CONF_DIR}.."
+ ${INSTALL_DATA} ${SSH_EXAMPLE_DIR}/${file} \
+ ${SSH_CONF_DIR}/${file}
+ fi
+ done
+ if [ ! -f ${SSH_CONF_DIR}/ssh_host_key ]
+ then
+ echo "Generating an RSA secret host key in ${SSH_CONF_DIR}.."
+ ${PKG_PREFIX}/bin/ssh-keygen -b 1024 -N "" \
+ -f ${SSH_CONF_DIR}/ssh_host_key
+ fi
+ if [ ! -f ${SSH_CONF_DIR}/ssh_host_dsa_key ]
+ then
+ echo "Generating a DSA secret host key in ${SSH_CONF_DIR}.."
+ ${PKG_PREFIX}/bin/ssh-keygen -d -N "" \
+ -f ${SSH_CONF_DIR}/ssh_host_dsa_key
+ fi
+ ;;
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/security/openssh/pkg/PLIST.SunOS b/security/openssh/pkg/PLIST.SunOS
new file mode 100644
index 00000000000..7f68d21075d
--- /dev/null
+++ b/security/openssh/pkg/PLIST.SunOS
@@ -0,0 +1,22 @@
+@comment $NetBSD: PLIST.SunOS,v 1.1 2001/01/10 16:05:53 tron Exp $
+bin/scp
+bin/slogin
+bin/ssh
+bin/ssh-add
+bin/ssh-agent
+bin/ssh-keygen
+etc/rc.d/sshd
+libexec/sftp-server
+man/man1/scp.1
+man/man1/slogin.1
+man/man1/ssh-add.1
+man/man1/ssh-agent.1
+man/man1/ssh-keygen.1
+man/man1/ssh.1
+man/man8/sftp-server.8
+man/man8/sshd.8
+sbin/sshd
+share/examples/ssh/ssh_config
+share/examples/ssh/ssh_prng_cmds
+share/examples/ssh/sshd_config
+@dirrm share/examples/ssh