summaryrefslogtreecommitdiff
path: root/parallel/glunix/Makefile
blob: 178dea936a957d2cd305a41b44dc59c9a9e6d0f1 (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
# $NetBSD: Makefile,v 1.14 2000/10/10 19:25:09 dmcmahill Exp $

DISTNAME=	glunix-release-1-0a
PKGNAME=	glunix-1.0a
CATEGORIES=	parallel
MASTER_SITES=	http://now.cs.berkeley.edu/Glunix/ \
		http://www.inficad.com/~garbled/
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} makedepend${EXTRACT_SUFX}

MAINTAINER=	root@garbled.net
HOMEPAGE=	http://now.cs.berkeley.edu/Glunix/glunix.html

.if exists(/usr/bin/ssh)                 
SSH=		/usr/bin/ssh
.else
DEPENDS+=	{openssh-*,ssh{,6}-1.2.27}:../../security/ssh
SSH=		${LOCALBASE}/bin/ssh
.endif

USE_GMAKE=	yes
USE_PERL5=	yes
IS_INTERACTIVE= yes
NO_MTREE=	yes
NO_WRKSUBDIR=	yes

MESSAGE_FILE=	${WRKDIR}/MESSAGE

NOW_ROOT=	${LOCALBASE}/now

.if (${MACHINE} == "i386")
FLAGS= "-m486 -DL_ENDIAN"
.endif

MAKE_ENV+= OPSYS=${OPSYS} ARCH=${MACHINE_ARCH} NOW_ROOT=${NOW_ROOT}
MAKE_ENV+= PORTSDIR=${PKGDIR} WRKDIR=${WRKDIR} FLAGS=${FLAGS}
MAKE_ENV+= SSH=${SSH}

SCRIPTS_ENV+= ARCH=${MACHINE_ARCH} RM=${RM} NOW_ROOT=${NOW_ROOT}

.if exists(/usr/sbin/user)
USER_CMD=       /usr/sbin/user
GROUP_CMD=      /usr/sbin/group
.else
DEPENDS+=       user>=20000313:../../sysutils/user
USER_CMD=       ${LOCALBASE}/sbin/user
GROUP_CMD=      ${LOCALBASE}/sbin/group
.endif

# the glunix group needs to exist before building.
pre-configure:
	${CP} ${FILESDIR}/Makefile-2 ${WRKSRC}/Makefile
	@if `${GROUP_CMD} info -e glunix`; then				\
		${ECHO} Group \'glunix\' already exists.;		\
	else								\
		${GROUP_CMD} add glunix;				\
	fi

pre-install:
	${SED} -e 's|\$${NOW_ROOT}|${NOW_ROOT}|g' ${PKGDIR}/MESSAGE > ${MESSAGE_FILE}
	@${ECHO} "updating /etc/shells";
	${CP} /etc/shells /etc/shells.bak;
	( ${GREP} -v ${NOW_ROOT}/bin/glush /etc/shells.bak;		\
		${ECHO} ${NOW_ROOT}/bin/glush				\
	) >/etc/shells
	@if `${USER_CMD} info -e glunix`; then				\
		${ECHO} User \'glunix\' already exists.;		\
	else								\
		${USER_CMD} add -g glunix -d /nonexistent		\
			-s ${NOW_ROOT}/bin/glush glunix;		\
	fi;

post-install:
	@${TOUCH} ${NOW_ROOT}/lib/${MACHINE_ARCH}-${OPSYS}-tcp/.keepme

.include "../../mk/bsd.pkg.mk"