blob: f05570a1f0aaee2611933edf551b2e9d1de0699c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
# New ports collection makefile for: ssh
# Version required: 1.2.22
# Date created: 19971214
# Whom: hubertf@netbsd.org
#
# $NetBSD: Makefile,v 1.12 1998/02/20 07:23:29 hubertf Exp $
# FreeBSD Id: Makefile,v 1.47 1997/11/10 22:04:42 dima Exp
#
# Maximal ssh package requires a YES value for USE_PERL
# and USE_LIBWRAP.
#
DISTNAME= ssh-1.2.22
CATEGORIES= security net
MASTER_SITES= ftp://ftp.cs.hut.fi/pub/ssh/ \
ftp://ftp.funet.fi/pub/unix/security/login/ssh/
MAINTAINER= mrg@eterna.com.au
RESTRICTED= "Crypto; export-controlled"
MIRROR_DISTFILE= no
IS_INTERACTIVE= YES
CFLAGS= -O2
GNU_CONFIGURE= YES
# Include local make config file here. It is essential to have this
# precede any override targets (those that override defaults in
# <bsd.port.mk> that test variables that may be set here. Note that
# this inclusion is otherwise redundant, since <bsd.port.mk> includes
# <bsd.own.mk>, which includes it.
OPSYS!= uname -s
.if (${OPSYS} == "FreeBSD")
.if exists(/etc/make.conf)
.include "/etc/make.conf"
.endif
.else
.if exists(/etc/mk.conf)
.include "/etc/mk.conf"
.endif
.endif
# You can set USA_RESIDENT appropriately in /etc/mk.conf if this bugs you..
USA_RESIDENT?= NO
.if defined(USA_RESIDENT) && ${USA_RESIDENT} == YES
DISTFILES= ${DISTNAME}.tar.gz rsaref2.tar.gz
MASTER_SITES= \
ftp://ftp.funet.fi/pub/unix/security/login/ssh/ \
ftp://nic.funet.fi/pub/crypt/mirrors/ftp.dsi.unimi.it/applied-crypto/ \
ftp://rzsun2.informatik.uni-hamburg.de/pub/virus/crypt/ripem/ \
ftp://idea.sec.dsi.unimi.it/pub/security/crypt/math/ \
ftp://ftp.univie.ac.at/security/crypt/cryptography/asymmetric/rsa/ \
ftp://isdec.vc.cvut.cz/pub/security/unimi/crypt/applied-crypto/
.endif
# Use SSH_CONF_DIR from /etc/mk.conf, if defined; otherwise default to /etc
SSH_CONF_DIR?=/etc
CONFIGURE_ARGS+= --prefix=${PREFIX} --with-etcdir=${SSH_CONF_DIR} \
--disable-suid-ssh
#Uncomment if all your users are in their own group and their homedir
#is writeable by that group. Beware the security implications!
#CONFIGURE_ARGS+= --enable-group-writeability
#Uncomment if you want to allow ssh to emulate an unencrypted rsh connection
#over a secure medium. This is normally dangerous since it can lead to the
#disclosure keys and passwords.
#CONFIGURE_ARGS+= --with-none
.if defined(USA_RESIDENT) && ${USA_RESIDENT} == YES
CONFIGURE_ARGS+= --with-rsaref
.endif
# Include support for the SecureID card
# Warning: untested !
.if defined(USE_SECUREID) && ${USE_SECUREID} == YES
CONFIGURE_ARGS+= --with-secureid
.endif
# Don't use IDEA. IDEA can be freely used for non-commercial use. However,
# commercial use may require a licence in a number of countries
# Warning: untested !
.if defined(DONT_USE_IDEA) && ${DONT_USE_IDEA} == YES
CONFIGURE_ARGS+= --without-idea
.endif
# Support for libwrap.
.if defined(USE_LIBWRAP) && ${USE_LIBWRAP} == YES
CONFIGURE_ARGS+= --with-libwrap
.endif
# Include SOCKS firewall support
.if defined(USE_SOCKS) && ${USE_SOCKS} == YES
CONFIGURE_ARGS+= --with-socks="-L${PREFIX}/lib -lsocks5"
.endif
MAN1= scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 \
make-ssh-known-hosts.1
MAN8= sshd.8
pre-patch:
@${MV} -f ${WRKSRC}/make-ssh-known-hosts.pl \
${WRKSRC}/make-ssh-known-hosts.pl.in
fetch-depends:
.if !defined(USA_RESIDENT) || ${USA_RESIDENT} != YES && ${USA_RESIDENT} != NO
@${ECHO}
@${ECHO} You must set variable USA_RESIDENT to YES if you are a USA
@${ECHO} resident or NO otherwise.
@${ECHO} If you are a USA resident you have to get the RSAREF2
@${ECHO} library \(RSA Inc. holds a patent on RSA and public key
@${ECHO} cypto in general - using RSA implementations other than
@${ECHO} RSAREF will violate the US patent law\)
@${ECHO} and extract it to ${WRKSRC}.
@false
.endif
post-extract:
.if defined(USA_RESIDENT) && ${USA_RESIDENT} == YES
@${MV} ${WRKDIR}/rsaref2 ${WRKSRC}/rsaref2
.endif
pre-install:
@${CAT} pkg/PLIST.pre | ${SED} \
-e 's;\<\$$SSH_CONF_DIR\>;'${SSH_CONF_DIR}';g' \
>pkg/PLIST
@${CAT} pkg/MESSAGE.pre | ${SED} \
-e 's;\<\$$SSH_CONF_DIR\>;'${SSH_CONF_DIR}';g' \
-e 's;\<\$$PREFIX\>;'${PREFIX}';g' \
>pkg/MESSAGE
@${CAT} pkg/DEINSTALL.pre | ${SED} \
-e 's;\<\$$SSH_CONF_DIR\>;'${SSH_CONF_DIR}';g' \
>pkg/DEINSTALL
post-install:
@${MKDIR} ${PREFIX}/share/examples/ssh
@${MKDIR} ${WRKDIR}${SSH_CONF_DIR}
(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \
${MAKEFILE} install_prefix=${WRKDIR} install-configs)
${INSTALL_DATA} ${WRKDIR}${SSH_CONF_DIR}/ssh_config \
${WRKDIR}${SSH_CONF_DIR}/sshd_config ${PREFIX}/share/examples/ssh
@if [ ! -f ${SSH_CONF_DIR}/ssh_host_key ]; then \
${ECHO} "Generating a secret host key..."; \
${PREFIX}/bin/ssh-keygen \
-f ${SSH_CONF_DIR}/ssh_host_key -N ""; \
fi
.if defined(MANZ)
${RM} -f ${PREFIX}/man/man1/slogin.1.gz
${LN} -sf ssh.1.gz ${PREFIX}/man/man1/slogin.1.gz
.else
${RM} -f ${PREFIX}/man/man1/slogin.1
${LN} -sf ssh.1 ${PREFIX}/man/man1/slogin.1
.endif
# @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} "[ -f ${SSH_CONF_DIR}/ssh_host_key ] || ${PREFIX}/bin/ssh-keygen -f ${SSH_CONF_DIR}/ssh_host_key -N ''" >> ${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
@${CAT} pkg/MESSAGE
pre-clean:
@${RM} -f pkg/PLIST pkg/MESSAGE pkg/DEINSTALL
# Include <bsd.port.mk> here. It is essential to have all the override
# targets precede inclusion of this.
.include <bsd.port.mk>
# Following stuff must be after <bsd.port.mk> to expand
# exists(${PREFIX}) properly
.if defined(USE_PERL) && ${USE_PERL} == YES || \
exists(${PREFIX}/bin/perl5.00404) && \
(!defined(USE_PERL) || ${USE_PERL} != NO)
BUILD_DEPENDS+= perl5.00404:${PORTSDIR}/lang/perl5
CONFIGURE_ENV+= PERL=${PREFIX}/bin/perl5.00404
.else
CONFIGURE_ENV+= PERL=/replace_it_with_PERL_path
.endif
|