summaryrefslogtreecommitdiff
path: root/security/ssh2/Makefile
blob: 33435cbed48af3b1d87a1a95fe3553a4fffb7ea1 (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
# $NetBSD: Makefile,v 1.23 2009/05/19 08:59:33 wiz Exp $

DISTNAME=	ssh-3.2.9.1
PKGNAME=	${DISTNAME:C/ssh-/ssh2-/}
PKGREVISION=	7
CATEGORIES=	security
MASTER_SITES=	ftp://ftp.ssh.com/pub/ssh/

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://www.ssh.com/
LICENSE=	ssh-communications-security-license

RESTRICTED=		Reciprocal grant required for derivative works.  Non-comercial use restrictions on some systems.
NO_BIN_ON_FTP=		${RESTRICTED}
NO_BIN_ON_CDROM=	${RESTRICTED}

COMMENT=	Secure Shell client and server for V.2 SSH protocol

PKG_DESTDIR_SUPPORT=	destdir

CONFLICTS+=		openssh-[0-9]* ssh6-[0-9]* ssh-[0-9]* sftp-[0-9]*
CONFLICTS+=		openssh+gssapi-[0-9]* ssh2-nox11-[0-9]*

GNU_CONFIGURE=		YES

BUILD_DEFS+=		IPV6_READY

CRYPTO=			YES
PKG_SYSCONFSUBDIR=	ssh2

DISTINFO_FILE=		${.CURDIR}/../../security/ssh2/distinfo
PATCHDIR=		${.CURDIR}/../../security/ssh2/patches
FILESDIR=		${.CURDIR}/../../security/ssh2/files
PLIST_SRC=		${.CURDIR}/../../security/ssh2/PLIST

.include "../../mk/bsd.prefs.mk"
.include "options.mk"

.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "sparc64"
# Later we may want to put an upper version bound on OS_VERSION or on
# gcc version for this.
CONFIGURE_ARGS+=	--disable-compiler-optimizations
.endif

SSH_PID_DIR=		/var/run	# default directory for PID files
.if ${OPSYS} == "SunOS" && !empty(OS_VERSION:M5.[012345678])
SSH_PID_DIR=		/etc		# Older Solaris doesn't have a /var/run
.endif

CONFIGURE_ARGS+=	--without-daemonpam --without-clientpam
CONFIGURE_ARGS+=	--without-ssh-agent1-compat
CONFIGURE_ARGS+=	--without-ssh1-compat
CONFIGURE_ARGS+=	--with-libwrap=${BUILDLINK_PREFIX.tcp-wrappers}
CONFIGURE_ARGS+=	--with-pid-dir=${SSH_PID_DIR:Q}

# This seems to break x11 forwarding at least on NetBSD 3.1 amd64
# and i386, so I assume it actually breaks it for all platforms.
# (i.e ssh localhost xterm does not work as client will get wrong
# auth cookie).
# Without this it will use the xauth method and that will work.
CONFIGURE_ARGS+=	--without-x11-security

# Setting FOREIGN_ETCDIR to PKG_SYSCONFBASEDIR may seem stupid
# if PKG_SYSCONFDIR.${PKG_SYSCONFVAR} is set but it does no harm...
#
CONFIGURE_ARGS+=	--with-foreign-etcdir=${PKG_SYSCONFBASEDIR:Q}
CONFIGURE_ARGS+=	--with-etcdir=${PKG_SYSCONFDIR:Q}

MAKE_ENV+=		PKGBASE=${PKGBASE:Q}
MAKE_ENV+=		RM=${RM:Q}

RCD_SCRIPTS=		ssh2_secure_shell

EGDIR=			${PREFIX}/share/examples/${PKGBASE}
EGFILES=		ext_authorization_example.sh \
			kbdint_plugin_example.sh

CONFS=			sshd2_config ssh2_config ssh_dummy_shell.out
CONF_FILES=		# empty
.for file in ${CONFS}
CONF_FILES+=		${EGDIR}/${file} ${PKG_SYSCONFDIR}/${file}
.endfor
FILES_SUBST+=		SSH_PID_DIR=${SSH_PID_DIR:Q}

OWN_DIRS=		${PKG_SYSCONFDIR}/knownhosts
OWN_DIRS+=		${PKG_SYSCONFDIR}/hostkeys

DOCS=			CHANGES FAQ HOWTO.anonymous.sftp INSTALL LICENSE \
			NEWS README REGEX-SYNTAX SSH2.QUICKSTART \
			RFC.authorization_program_protocol \
			RFC.kbdint_plugin_protocol

TEST_TARGET=		check

post-install:
	${INSTALL_DATA_DIR} ${DESTDIR:Q}${PREFIX:Q}/share/doc/${PKGBASE}
.for file in ${DOCS}
	${INSTALL_DATA} ${WRKSRC}/${file} ${DESTDIR:Q}${PREFIX:Q}/share/doc/${PKGBASE}
.endfor
	${INSTALL_DATA_DIR} ${DESTDIR:Q}${EGDIR:Q}
.for file in ${EGFILES}
	${INSTALL_DATA} ${WRKSRC}/${file} ${DESTDIR:Q}${EGDIR:Q}
.endfor

.include "../../security/tcp_wrappers/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"