| @@ -1,172 +1,172 @@ | | | @@ -1,172 +1,172 @@ |
1 | # $NetBSD: Makefile,v 1.186 2008/01/18 05:09:39 tnn Exp $ | | 1 | # $NetBSD: Makefile,v 1.187 2008/04/03 07:59:08 tonnerre Exp $ |
2 | | | 2 | |
3 | DISTNAME= openssh-4.7p1 | | 3 | DISTNAME= openssh-4.7p1 |
4 | PKGNAME= openssh-4.7.1 | | 4 | PKGNAME= openssh-4.7.1 |
5 | PKGREVISION= 2 | | 5 | PKGREVISION= 3 |
6 | SVR4_PKGNAME= ossh | | 6 | SVR4_PKGNAME= ossh |
7 | CATEGORIES= security | | 7 | CATEGORIES= security |
8 | MASTER_SITES= ftp://ftp.openssh.com/pub/OpenBSD/OpenSSH/portable/ \ | | 8 | MASTER_SITES= ftp://ftp.openssh.com/pub/OpenBSD/OpenSSH/portable/ \ |
9 | ftp://ftp.stealth.net/pub/mirrors/ftp.openssh.com/pub/OpenBSD/OpenSSH/portable/ \ | | 9 | ftp://ftp.stealth.net/pub/mirrors/ftp.openssh.com/pub/OpenBSD/OpenSSH/portable/ \ |
10 | http://public.planetmirror.com.au/pub/OpenBSD/OpenSSH/portable/ \ | | 10 | http://public.planetmirror.com.au/pub/OpenBSD/OpenSSH/portable/ \ |
11 | ftp://gd.tuwien.ac.at/opsys/OpenBSD/OpenSSH/portable/ \ | | 11 | ftp://gd.tuwien.ac.at/opsys/OpenBSD/OpenSSH/portable/ \ |
12 | ftp://ftp.openssh.com/pub/OpenBSD/OpenSSH/portable/old/ | | 12 | ftp://ftp.openssh.com/pub/OpenBSD/OpenSSH/portable/old/ |
13 | # Don't delete the last entry -- it's there if the pkgsrc version is not | | 13 | # Don't delete the last entry -- it's there if the pkgsrc version is not |
14 | # up-to-date and the mirrors already removed the old distfile. | | 14 | # up-to-date and the mirrors already removed the old distfile. |
15 | DIST_SUBDIR= ${PKGBASE}-4.7.1-20070919 | | 15 | DIST_SUBDIR= ${PKGBASE}-4.7.1-20070919 |
16 | | | 16 | |
17 | MAINTAINER= pkgsrc-users@NetBSD.org | | 17 | MAINTAINER= pkgsrc-users@NetBSD.org |
18 | HOMEPAGE= http://www.openssh.com/ | | 18 | HOMEPAGE= http://www.openssh.com/ |
19 | COMMENT= Open Source Secure shell client and server (remote login program) | | 19 | COMMENT= Open Source Secure shell client and server (remote login program) |
20 | | | 20 | |
21 | CONFLICTS= sftp-[0-9]* | | 21 | CONFLICTS= sftp-[0-9]* |
22 | CONFLICTS+= ssh-[0-9]* ssh6-[0-9]* | | 22 | CONFLICTS+= ssh-[0-9]* ssh6-[0-9]* |
23 | CONFLICTS+= ssh2-[0-9]* ssh2-nox11-[0-9]* | | 23 | CONFLICTS+= ssh2-[0-9]* ssh2-nox11-[0-9]* |
24 | CONFLICTS+= openssh+gssapi-[0-9]* | | 24 | CONFLICTS+= openssh+gssapi-[0-9]* |
25 | CONFLICTS+= lsh>2.0 | | 25 | CONFLICTS+= lsh>2.0 |
26 | | | 26 | |
27 | USE_TOOLS+= perl | | 27 | USE_TOOLS+= perl |
28 | | | 28 | |
29 | CRYPTO= yes | | 29 | CRYPTO= yes |
30 | | | 30 | |
31 | # retain the following line, for IPv6-ready pkgsrc webpage | | 31 | # retain the following line, for IPv6-ready pkgsrc webpage |
32 | BUILD_DEFS+= IPV6_READY | | 32 | BUILD_DEFS+= IPV6_READY |
33 | | | 33 | |
34 | PKG_GROUPS_VARS+= OPENSSH_GROUP | | 34 | PKG_GROUPS_VARS+= OPENSSH_GROUP |
35 | PKG_USERS_VARS+= OPENSSH_USER | | 35 | PKG_USERS_VARS+= OPENSSH_USER |
36 | BUILD_DEFS+= OPENSSH_CHROOT | | 36 | BUILD_DEFS+= OPENSSH_CHROOT |
37 | BUILD_DEFS+= VARBASE | | 37 | BUILD_DEFS+= VARBASE |
38 | | | 38 | |
39 | INSTALL_TARGET= install-nokeys | | 39 | INSTALL_TARGET= install-nokeys |
40 | PLIST_SRC= # empty | | 40 | PLIST_SRC= # empty |
41 | | | 41 | |
42 | .include "options.mk" | | 42 | .include "options.mk" |
43 | | | 43 | |
44 | .if ${OPSYS} == "Interix" | | 44 | .if ${OPSYS} == "Interix" |
45 | | | 45 | |
46 | # OpenSSH on Interix has some important caveats | | 46 | # OpenSSH on Interix has some important caveats |
47 | MESSAGE_SRC= ${.CURDIR}/MESSAGE.Interix | | 47 | MESSAGE_SRC= ${.CURDIR}/MESSAGE.Interix |
48 | BUILDLINK_PASSTHRU_DIRS+= /usr/local/include/bind /usr/local/lib/bind | | 48 | BUILDLINK_PASSTHRU_DIRS+= /usr/local/include/bind /usr/local/lib/bind |
49 | CONFIGURE_ENV+= ac_cv_func_openpty=no | | 49 | CONFIGURE_ENV+= ac_cv_func_openpty=no |
50 | CONFIGURE_ENV+= ac_cv_type_struct_timespec=yes | | 50 | CONFIGURE_ENV+= ac_cv_type_struct_timespec=yes |
51 | CPPFLAGS+= -DIOV_MAX=16 # default is INT_MAX, way too large | | 51 | CPPFLAGS+= -DIOV_MAX=16 # default is INT_MAX, way too large |
52 | CPPFLAGS+= -I/usr/local/include/bind | | 52 | CPPFLAGS+= -I/usr/local/include/bind |
53 | LDFLAGS+= -L/usr/local/lib/bind | | 53 | LDFLAGS+= -L/usr/local/lib/bind |
54 | LIBS+= -lbind -ldb -lcrypt | | 54 | LIBS+= -lbind -ldb -lcrypt |
55 | | | 55 | |
56 | .else # not Interix | | 56 | .else # not Interix |
57 | | | 57 | |
58 | PKG_GROUPS= ${OPENSSH_GROUP} | | 58 | PKG_GROUPS= ${OPENSSH_GROUP} |
59 | PKG_USERS= ${OPENSSH_USER}:${OPENSSH_GROUP} | | 59 | PKG_USERS= ${OPENSSH_USER}:${OPENSSH_GROUP} |
60 | | | 60 | |
61 | PKG_GECOS.${OPENSSH_USER}= sshd privsep pseudo-user | | 61 | PKG_GECOS.${OPENSSH_USER}= sshd privsep pseudo-user |
62 | PKG_HOME.${OPENSSH_USER}= ${OPENSSH_CHROOT} | | 62 | PKG_HOME.${OPENSSH_USER}= ${OPENSSH_CHROOT} |
63 | | | 63 | |
64 | .endif | | 64 | .endif |
65 | | | 65 | |
66 | SSH_PID_DIR= ${VARBASE}/run # default directory for PID files | | 66 | SSH_PID_DIR= ${VARBASE}/run # default directory for PID files |
67 | | | 67 | |
68 | PKG_SYSCONFSUBDIR= ssh | | 68 | PKG_SYSCONFSUBDIR= ssh |
69 | | | 69 | |
70 | GNU_CONFIGURE= yes | | 70 | GNU_CONFIGURE= yes |
71 | CONFIGURE_ARGS+= --with-mantype=man | | 71 | CONFIGURE_ARGS+= --with-mantype=man |
72 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} | | 72 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} |
73 | CONFIGURE_ARGS+= --with-pid-dir=${SSH_PID_DIR:Q} | | 73 | CONFIGURE_ARGS+= --with-pid-dir=${SSH_PID_DIR:Q} |
74 | CONFIGURE_ARGS+= --with-ssl-dir=${SSLBASE:Q} | | 74 | CONFIGURE_ARGS+= --with-ssl-dir=${SSLBASE:Q} |
75 | CONFIGURE_ARGS+= --with-tcp-wrappers=${BUILDLINK_PREFIX.tcp_wrappers} | | 75 | CONFIGURE_ARGS+= --with-tcp-wrappers=${BUILDLINK_PREFIX.tcp_wrappers} |
76 | | | 76 | |
77 | .if ${OPSYS} != "Interix" | | 77 | .if ${OPSYS} != "Interix" |
78 | CONFIGURE_ARGS+= --with-privsep-path=${OPENSSH_CHROOT:Q} | | 78 | CONFIGURE_ARGS+= --with-privsep-path=${OPENSSH_CHROOT:Q} |
79 | CONFIGURE_ARGS+= --with-privsep-user=${OPENSSH_USER:Q} | | 79 | CONFIGURE_ARGS+= --with-privsep-user=${OPENSSH_USER:Q} |
80 | .endif | | 80 | .endif |
81 | | | 81 | |
82 | # pkgsrc already enforces a "secure" version of zlib via dependencies, | | 82 | # pkgsrc already enforces a "secure" version of zlib via dependencies, |
83 | # so skip this bogus version check. | | 83 | # so skip this bogus version check. |
84 | CONFIGURE_ARGS+= --without-zlib-version-check | | 84 | CONFIGURE_ARGS+= --without-zlib-version-check |
85 | | | 85 | |
86 | # the openssh configure script finds and uses ${LD} if defined and | | 86 | # the openssh configure script finds and uses ${LD} if defined and |
87 | # defaults to ${CC} if not. we override LD here, since running the | | 87 | # defaults to ${CC} if not. we override LD here, since running the |
88 | # linker directly results in undefined symbols for obvious reasons. | | 88 | # linker directly results in undefined symbols for obvious reasons. |
89 | # | | 89 | # |
90 | CONFIGURE_ENV+= LD=${CC:Q} | | 90 | CONFIGURE_ENV+= LD=${CC:Q} |
91 | | | 91 | |
92 | # Enable S/Key support on NetBSD, Darwin, and Solaris. | | 92 | # Enable S/Key support on NetBSD, Darwin, and Solaris. |
93 | .if (${OPSYS} == "NetBSD") || (${OPSYS} == "Darwin") || (${OPSYS} == "SunOS") | | 93 | .if (${OPSYS} == "NetBSD") || (${OPSYS} == "Darwin") || (${OPSYS} == "SunOS") |
94 | . include "../../security/skey/buildlink3.mk" | | 94 | . include "../../security/skey/buildlink3.mk" |
95 | CONFIGURE_ARGS+= --with-skey=${BUILDLINK_PREFIX.skey} | | 95 | CONFIGURE_ARGS+= --with-skey=${BUILDLINK_PREFIX.skey} |
96 | .else | | 96 | .else |
97 | CONFIGURE_ARGS+= --without-skey | | 97 | CONFIGURE_ARGS+= --without-skey |
98 | .endif | | 98 | .endif |
99 | | | 99 | |
100 | .if (${OPSYS} == "NetBSD") && exists(/usr/include/utmpx.h) | | 100 | .if (${OPSYS} == "NetBSD") && exists(/usr/include/utmpx.h) |
101 | # if we have utmpx et al do not try to use login() | | 101 | # if we have utmpx et al do not try to use login() |
102 | CONFIGURE_ARGS+= --disable-libutil | | 102 | CONFIGURE_ARGS+= --disable-libutil |
103 | .endif | | 103 | .endif |
104 | .if (${OPSYS} == "SunOS") && (${OS_VERSION} == "5.8" || ${OS_VERSION} == "5.9") | | 104 | .if (${OPSYS} == "SunOS") && (${OS_VERSION} == "5.8" || ${OS_VERSION} == "5.9") |
105 | CONFIGURE_ARGS+= --disable-utmp --disable-wtmp | | 105 | CONFIGURE_ARGS+= --disable-utmp --disable-wtmp |
106 | .endif | | 106 | .endif |
107 | .if ${OPSYS} == "Linux" | | 107 | .if ${OPSYS} == "Linux" |
108 | CONFIGURE_ARGS+= --enable-md5-password | | 108 | CONFIGURE_ARGS+= --enable-md5-password |
109 | .endif | | 109 | .endif |
110 | | | 110 | |
111 | # The ssh-askpass program is in ${X11BASE}/bin or ${X11PREFIX}/bin depending | | 111 | # The ssh-askpass program is in ${X11BASE}/bin or ${X11PREFIX}/bin depending |
112 | # on if it's part of the X11 distribution, or if it's installed from pkgsrc | | 112 | # on if it's part of the X11 distribution, or if it's installed from pkgsrc |
113 | # (security/ssh-askpass). | | 113 | # (security/ssh-askpass). |
114 | # | | 114 | # |
115 | .if exists(${X11BASE}/bin/ssh-askpass) | | 115 | .if exists(${X11BASE}/bin/ssh-askpass) |
116 | ASKPASS_PROGRAM= ${X11BASE}/bin/ssh-askpass | | 116 | ASKPASS_PROGRAM= ${X11BASE}/bin/ssh-askpass |
117 | .else | | 117 | .else |
118 | ASKPASS_PROGRAM= ${X11PREFIX}/bin/ssh-askpass | | 118 | ASKPASS_PROGRAM= ${X11PREFIX}/bin/ssh-askpass |
119 | .endif | | 119 | .endif |
120 | CONFIGURE_ENV+= ASKPASS_PROGRAM=${ASKPASS_PROGRAM:Q} | | 120 | CONFIGURE_ENV+= ASKPASS_PROGRAM=${ASKPASS_PROGRAM:Q} |
121 | MAKE_ENV+= ASKPASS_PROGRAM=${ASKPASS_PROGRAM:Q} | | 121 | MAKE_ENV+= ASKPASS_PROGRAM=${ASKPASS_PROGRAM:Q} |
122 | | | 122 | |
123 | # do the same for xauth | | 123 | # do the same for xauth |
124 | .if exists(${X11BASE}/bin/xauth) | | 124 | .if exists(${X11BASE}/bin/xauth) |
125 | CONFIGURE_ARGS+= --with-xauth=${X11BASE}/bin/xauth | | 125 | CONFIGURE_ARGS+= --with-xauth=${X11BASE}/bin/xauth |
126 | .else | | 126 | .else |
127 | CONFIGURE_ARGS+= --with-xauth=${X11PREFIX}/bin/xauth | | 127 | CONFIGURE_ARGS+= --with-xauth=${X11PREFIX}/bin/xauth |
128 | .endif | | 128 | .endif |
129 | | | 129 | |
130 | CONFS= ssh_config sshd_config moduli | | 130 | CONFS= ssh_config sshd_config moduli |
131 | | | 131 | |
132 | .if exists(/dev/urandom) | | 132 | .if exists(/dev/urandom) |
133 | . if ${OPSYS} == "NetBSD" | | 133 | . if ${OPSYS} == "NetBSD" |
134 | MESSAGE_SRC+= ${.CURDIR}/MESSAGE.urandom | | 134 | MESSAGE_SRC+= ${.CURDIR}/MESSAGE.urandom |
135 | . endif | | 135 | . endif |
136 | .else | | 136 | .else |
137 | CONFIGURE_ARGS+= --without-random | | 137 | CONFIGURE_ARGS+= --without-random |
138 | CONFS+= ssh_prng_cmds | | 138 | CONFS+= ssh_prng_cmds |
139 | PLIST_SRC+= ${.CURDIR}/PLIST.prng | | 139 | PLIST_SRC+= ${.CURDIR}/PLIST.prng |
140 | .endif | | 140 | .endif |
141 | | | 141 | |
142 | EGDIR= ${PREFIX}/share/examples/${PKGBASE} | | 142 | EGDIR= ${PREFIX}/share/examples/${PKGBASE} |
143 | CONF_FILES= # empty | | 143 | CONF_FILES= # empty |
144 | .for f in ${CONFS} | | 144 | .for f in ${CONFS} |
145 | CONF_FILES+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f} | | 145 | CONF_FILES+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f} |
146 | .endfor | | 146 | .endfor |
147 | OWN_DIRS= ${OPENSSH_CHROOT} | | 147 | OWN_DIRS= ${OPENSSH_CHROOT} |
148 | RCD_SCRIPTS= sshd | | 148 | RCD_SCRIPTS= sshd |
149 | | | 149 | |
150 | PLIST_SRC+= ${.CURDIR}/PLIST | | 150 | PLIST_SRC+= ${.CURDIR}/PLIST |
151 | FILES_SUBST+= SSH_PID_DIR=${SSH_PID_DIR:Q} | | 151 | FILES_SUBST+= SSH_PID_DIR=${SSH_PID_DIR:Q} |
152 | | | 152 | |
153 | SUBST_CLASSES+= patch | | 153 | SUBST_CLASSES+= patch |
154 | SUBST_STAGE.patch= pre-configure | | 154 | SUBST_STAGE.patch= pre-configure |
155 | SUBST_FILES.patch= session.c | | 155 | SUBST_FILES.patch= session.c |
156 | SUBST_SED.patch= -e '/channel_input_port_forward_request/s/0/ROOTUID/' | | 156 | SUBST_SED.patch= -e '/channel_input_port_forward_request/s/0/ROOTUID/' |
157 | SUBST_MESSAGE.patch= More patch a file. | | 157 | SUBST_MESSAGE.patch= More patch a file. |
158 | | | 158 | |
159 | .include "../../devel/zlib/buildlink3.mk" | | 159 | .include "../../devel/zlib/buildlink3.mk" |
160 | .include "../../security/openssl/buildlink3.mk" | | 160 | .include "../../security/openssl/buildlink3.mk" |
161 | .include "../../security/tcp_wrappers/buildlink3.mk" | | 161 | .include "../../security/tcp_wrappers/buildlink3.mk" |
162 | | | 162 | |
163 | post-install: | | 163 | post-install: |
164 | ${INSTALL_DATA_DIR} ${EGDIR} | | 164 | ${INSTALL_DATA_DIR} ${EGDIR} |
165 | cd ${WRKSRC}; for file in ${CONFS}; do \ | | 165 | cd ${WRKSRC}; for file in ${CONFS}; do \ |
166 | ${INSTALL_DATA} $${file}.out ${EGDIR}/$${file}; \ | | 166 | ${INSTALL_DATA} $${file}.out ${EGDIR}/$${file}; \ |
167 | done | | 167 | done |
168 | .if !empty(PKG_OPTIONS:Mpam) && ${OPSYS} == "Linux" | | 168 | .if !empty(PKG_OPTIONS:Mpam) && ${OPSYS} == "Linux" |
169 | ${INSTALL_DATA} ${WRKSRC}/contrib/sshd.pam.generic ${EGDIR}/sshd.pam | | 169 | ${INSTALL_DATA} ${WRKSRC}/contrib/sshd.pam.generic ${EGDIR}/sshd.pam |
170 | .endif | | 170 | .endif |
171 | | | 171 | |
172 | .include "../../mk/bsd.pkg.mk" | | 172 | .include "../../mk/bsd.pkg.mk" |