pullups 3491 and 3494
[pkgsrcv2.git] / security / ssh2 / Makefile
1 # $NetBSD: Makefile,v 1.23 2009/05/19 08:59:33 wiz Exp $
2
3 DISTNAME=       ssh-3.2.9.1
4 PKGNAME=        ${DISTNAME:C/ssh-/ssh2-/}
5 PKGREVISION=    7
6 CATEGORIES=     security
7 MASTER_SITES=   ftp://ftp.ssh.com/pub/ssh/
8
9 MAINTAINER=     pkgsrc-users@NetBSD.org
10 HOMEPAGE=       http://www.ssh.com/
11 LICENSE=        ssh-communications-security-license
12
13 RESTRICTED=             Reciprocal grant required for derivative works.  Non-comercial use restrictions on some systems.
14 NO_BIN_ON_FTP=          ${RESTRICTED}
15 NO_BIN_ON_CDROM=        ${RESTRICTED}
16
17 MAKE_JOBS_SAFE=         no
18
19 COMMENT=        Secure Shell client and server for V.2 SSH protocol
20
21 PKG_DESTDIR_SUPPORT=    destdir
22
23 CONFLICTS+=             openssh-[0-9]* ssh6-[0-9]* ssh-[0-9]* sftp-[0-9]*
24 CONFLICTS+=             openssh+gssapi-[0-9]* ssh2-nox11-[0-9]*
25
26 GNU_CONFIGURE=          YES
27
28 BUILD_DEFS+=            IPV6_READY
29
30 CRYPTO=                 YES
31 PKG_SYSCONFSUBDIR=      ssh2
32
33 DISTINFO_FILE=          ${.CURDIR}/../../security/ssh2/distinfo
34 PATCHDIR=               ${.CURDIR}/../../security/ssh2/patches
35 FILESDIR=               ${.CURDIR}/../../security/ssh2/files
36 PLIST_SRC=              ${.CURDIR}/../../security/ssh2/PLIST
37
38 .include "../../mk/bsd.prefs.mk"
39 .include "options.mk"
40
41 .if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "sparc64"
42 # Later we may want to put an upper version bound on OS_VERSION or on
43 # gcc version for this.
44 CONFIGURE_ARGS+=        --disable-compiler-optimizations
45 .endif
46
47 SSH_PID_DIR=            /var/run        # default directory for PID files
48 .if ${OPSYS} == "SunOS" && !empty(OS_VERSION:M5.[012345678])
49 SSH_PID_DIR=            /etc            # Older Solaris doesn't have a /var/run
50 .endif
51
52 CONFIGURE_ARGS+=        --without-daemonpam --without-clientpam
53 CONFIGURE_ARGS+=        --without-ssh-agent1-compat
54 CONFIGURE_ARGS+=        --without-ssh1-compat
55 CONFIGURE_ARGS+=        --with-libwrap=${BUILDLINK_PREFIX.tcp-wrappers}
56 CONFIGURE_ARGS+=        --with-pid-dir=${SSH_PID_DIR:Q}
57
58 # This seems to break x11 forwarding at least on NetBSD 3.1 amd64
59 # and i386, so I assume it actually breaks it for all platforms.
60 # (i.e ssh localhost xterm does not work as client will get wrong
61 # auth cookie).
62 # Without this it will use the xauth method and that will work.
63 CONFIGURE_ARGS+=        --without-x11-security
64
65 # Setting FOREIGN_ETCDIR to PKG_SYSCONFBASEDIR may seem stupid
66 # if PKG_SYSCONFDIR.${PKG_SYSCONFVAR} is set but it does no harm...
67 #
68 CONFIGURE_ARGS+=        --with-foreign-etcdir=${PKG_SYSCONFBASEDIR:Q}
69 CONFIGURE_ARGS+=        --with-etcdir=${PKG_SYSCONFDIR:Q}
70
71 MAKE_ENV+=              PKGBASE=${PKGBASE:Q}
72 MAKE_ENV+=              RM=${RM:Q}
73
74 RCD_SCRIPTS=            ssh2_secure_shell
75
76 EGDIR=                  ${PREFIX}/share/examples/${PKGBASE}
77 EGFILES=                ext_authorization_example.sh \
78                         kbdint_plugin_example.sh
79
80 CONFS=                  sshd2_config ssh2_config ssh_dummy_shell.out
81 CONF_FILES=             # empty
82 .for file in ${CONFS}
83 CONF_FILES+=            ${EGDIR}/${file} ${PKG_SYSCONFDIR}/${file}
84 .endfor
85 FILES_SUBST+=           SSH_PID_DIR=${SSH_PID_DIR:Q}
86
87 OWN_DIRS=               ${PKG_SYSCONFDIR}/knownhosts
88 OWN_DIRS+=              ${PKG_SYSCONFDIR}/hostkeys
89
90 DOCS=                   CHANGES FAQ HOWTO.anonymous.sftp INSTALL LICENSE \
91                         NEWS README REGEX-SYNTAX SSH2.QUICKSTART \
92                         RFC.authorization_program_protocol \
93                         RFC.kbdint_plugin_protocol
94
95 TEST_TARGET=            check
96
97 post-install:
98         ${INSTALL_DATA_DIR} ${DESTDIR:Q}${PREFIX:Q}/share/doc/${PKGBASE}
99 .for file in ${DOCS}
100         ${INSTALL_DATA} ${WRKSRC}/${file} ${DESTDIR:Q}${PREFIX:Q}/share/doc/${PKGBASE}
101 .endfor
102         ${INSTALL_DATA_DIR} ${DESTDIR:Q}${EGDIR:Q}
103 .for file in ${EGFILES}
104         ${INSTALL_DATA} ${WRKSRC}/${file} ${DESTDIR:Q}${EGDIR:Q}
105 .endfor
106
107 .include "../../security/tcp_wrappers/buildlink3.mk"
108 .include "../../mk/bsd.pkg.mk"