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