summaryrefslogtreecommitdiff
path: root/shells/osh/Makefile
blob: 2adb257338ac617c97f726e86cad71ef8a9e2a02 (plain) (blame)
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
# Created by: George Reid <greid@ukug.uk.freebsd.org>
# $FreeBSD$

PORTNAME=	osh
DISTVERSION=	20120604
CATEGORIES=	shells
MASTER_SITES=	http://v6shell.org/src/

MAINTAINER=	miwi@FreeBSD.org
COMMENT=	An implementation of the UNIX 6th Edition shell

MAKE_ENV+=	DOCDIR=${DOCSDIR} \
		DESTEXPDIR=${EXAMPLESDIR} \
		MANDIR=${MANPREFIX}/man/man1

MAN1=		fd2.1 goto.1 if.1 osh.1 sh6.1 glob6.1

PORTDOCS=	*
PORTEXAMPLES=	*

.include <bsd.port.pre.mk>

post-patch:
	@${REINPLACE_CMD} -E -e 's|(DESTEXPDIR)=|\1?=|' \
		${WRKSRC}/Makefile
.if defined(NOPORTDOCS)
	@${REINPLACE_CMD} -e /^install-doc/d \
		-e /\ $$\(DESTDOCDIR\)/d \
		-e 's/install-doc//' \
		${WRKSRC}/Makefile
.endif
.if defined(NOPORTEXAMPLES)
	@${REINPLACE_CMD} -e /^install-exp/d \
		-e /\ $$\(DESTEXPDIR\)/d \
		-e 's/install-exp//' \
		${WRKSRC}/Makefile
.endif

post-install:
	@${ECHO_MSG} "updating /etc/shells"
	@${CP} /etc/shells /etc/shells.bak
	@(${GREP} -v ${PREFIX}/bin/osh /etc/shells.bak; \
	 ${ECHO_CMD} ${PREFIX}/bin/osh) > /etc/shells
	@${RM} /etc/shells.bak

.include <bsd.port.post.mk>