summaryrefslogtreecommitdiff
path: root/devel/javacc/Makefile
blob: a4caa0543c4b1b8fd76e169d24bf4aa4c774b53f (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
# $NetBSD: Makefile,v 1.6 2014/01/27 18:41:11 wiz Exp $

DISTNAME=	javacc-5.0
CATEGORIES=	devel
MASTER_SITES=	http://java.net/projects/javacc/downloads/download/

MAINTAINER=	minskim@NetBSD.org
HOMEPAGE=	https://javacc.java.net/
COMMENT=	Java Compiler Compiler [tm]
LICENSE=	modified-bsd

NO_BUILD=	yes
USE_JAVA=	run
USE_JAVA2=	yes

SUBST_CLASSES+=		paths
SUBST_MESSAGE.paths=	Fixing classpath.
SUBST_STAGE.paths=	pre-configure
SUBST_FILES.paths=	bin/javacc bin/jjdoc bin/jjrun bin/jjtree
SUBST_VARS.paths=	PREFIX PKG_JAVA_HOME

.include "../../mk/java-vm.mk"

INSTALLATION_DIRS+=	bin share/examples/javacc

do-install:
.for f in javacc jjdoc jjrun jjtree
	${INSTALL_SCRIPT} ${WRKSRC}/bin/${f} ${DESTDIR}${PREFIX}/bin
.endfor
	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/java
	${INSTALL_DATA} ${WRKSRC}/bin/lib/javacc.jar ${DESTDIR}${PREFIX}/lib/java
	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/javacc
	${INSTALL_DATA} ${WRKSRC}/LICENSE ${DESTDIR}${PREFIX}/share/doc/javacc
	${INSTALL_DATA} ${WRKSRC}/doc/* ${DESTDIR}${PREFIX}/share/doc/javacc
	${CP} -R ${WRKSRC}/examples/* ${DESTDIR}${PREFIX}/share/examples/javacc
	${FIND} ${DESTDIR}${PREFIX}/share/examples/javacc -type d -print \
		| ${XARGS} ${CHMOD} ${PKGDIRMODE}
	${FIND} ${DESTDIR}${PREFIX}/share/examples/javacc -type f -print \
		| ${XARGS} ${CHMOD} ${SHAREMODE}

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