summaryrefslogtreecommitdiffstats
path: root/lang/TenDRA/Makefile
blob: 43ce10ea0779169959d0e160bbd7e59932801491 (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
# New ports collection makefile for:	TenDRA
# Version required:	4.1.2
# Date created:		7 Apr 1998
# Whom:			Robert Nordier <rnordier@iafrica.com>
#
# $Id: Makefile,v 1.4 1998/06/09 13:21:03 rnordier Exp $
#

DISTNAME=	TenDRA-4.1.2
CATEGORIES=	lang
MASTER_SITES=	ftp://alph.dera.gov.uk/pub/TenDRA/

MAINTAINER=	rnordier@FreeBSD.ORG

OSRELEASE!=	uname -r
PLIST=		${WRKDIR}/PLIST
MAN1=		calculus.1 disp.1 lexi.1 pl.1 sid.1 tcc.1 tchk.1 \
		tcpplus.1 tdfc2.1 tld.1 tnc.1 trans.1 tspec.1
MAN5=		tccenv.5

pre-configure:
	@(cd ${WRKSRC} && \
	${MKDIR} bin lib man && \
	${SED}	-e 's:^\(BASE_DIR=\).*:\1${WRKSRC}:' \
		-e 's:^\(PUBLIC_BIN=\).*:\1$${BASE_DIR}/bin:' \
		-e 's:^\(INSTALL_DIR=\).*:\1$${BASE_DIR}/lib/TenDRA:' \
		-e 's:^\(MAN_DIR=\).*:\1$${BASE_DIR}/man:' \
		-e 's:completed:to build directory completed:' \
		INSTALL >INSTALL.build && \
	chmod a+x INSTALL.build && \
	chmod a-x INSTALL)
	@${SED} 's:%OSREL%:${OSRELEASE}:' ${PKGDIR}/PLIST >${PLIST}

do-build:
	@(PATH=${WRKSRC}/bin:$$PATH && \
	cd ${WRKSRC} && \
	./INSTALL.build)
	@${ECHO} "Bootstrapping the compiler ..."
	@${RM} -fr ${WRKSRC}/work
	@(PATH=${WRKSRC}/bin:$$PATH && \
	cd ${WRKSRC} && \
	./INSTALL.build -tcc)

pre-install:
	@(cd ${WRKSRC} && \
	${SED}	-e 's:^\(BASE_DIR=\).*:\1${WRKSRC}:' \
		-e 's:^\(PUBLIC_BIN=\).*:\1${PREFIX}/bin:' \
		-e 's:^\(INSTALL_DIR=\).*:\1${PREFIX}/lib/TenDRA:' \
		-e 's:^\(MAN_DIR=\).*:\1${PREFIX}/man:' \
		INSTALL >INSTALL.install && \
	chmod a+x INSTALL.install)

do-install:
	@${MKDIR} ${PREFIX}/lib/TenDRA
	@(PATH=${WRKSRC}/bin:$$PATH && \
	cd ${WRKSRC} && \
	./INSTALL.install -tcc -strip)
	@(cd ${PREFIX}/bin && \
	chown ${BINOWN}:${BINGRP} tcc tchk tspec && \
	chmod ${BINMODE} tcc tchk tspec)
	@(cd ${PREFIX} && \
	chown -R ${BINOWN}:${BINGRP} lib/TenDRA && \
	find -X lib/TenDRA -type d | xargs chmod 755 && \
	${GREP} '^lib/' ${PLIST} | xargs chmod ${SHAREMODE} && \
	${GREP} '/bin/' ${PLIST} | xargs chmod ${BINMODE})
	@(cd ${PREFIX}/man/man1 && \
	chown ${MANOWN}:${MANGRP} ${MAN1} && \
	chmod ${MANMODE} ${MAN1})
	@(cd ${PREFIX}/man/man5 && \
	chown ${MANOWN}:${MANGRP} ${MAN5} && \
	chmod ${MANMODE} ${MAN5})

.include <bsd.port.mk>
OpenPOWER on IntegriCloud