summaryrefslogtreecommitdiffstats
path: root/devel/sbt/Makefile
blob: e0ff125026d13b653bde9146e22cde2472c0d22e (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
# Created by: Alex Dupre <ale@FreeBSD.org>
# $FreeBSD$

PORTNAME=	sbt
PORTVERSION=	1.0.2
CATEGORIES=	devel java
MASTER_SITES=	https://cocl.us/

MAINTAINER=	ale@FreeBSD.org
COMMENT=	Build tool for Scala projects

LICENSE=	APACHE20

OPTIONS_DEFINE=	ADVANCED PRELOADED
OPTIONS_DEFAULT=ADVANCED
ADVANCED_DESC=	Install advanced bash shell-script
PRELOADED_DESC=	Install preloaded jars for offline usage

USES=		tar:tgz
NO_BUILD=	yes
NO_ARCH=	yes
USE_JAVA=	yes
WRKSRC=		${WRKDIR}/${PORTNAME}

ADVANCED_RUN_DEPENDS+=	bash:shells/bash
PRELOADED_RUN_DEPENDS+=	rsync:net/rsync

ADVANCED_SUB_FILES_OFF=	sbt.sh

PLIST_FILES=	bin/sbt

PORTDATA=	*

.include <bsd.port.options.mk>

post-patch:
	@${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/bin/sbt

do-install:
	${MKDIR} ${STAGEDIR}${DATADIR}
	${INSTALL_DATA} ${WRKSRC}/bin/sbt-launch.jar ${STAGEDIR}${DATADIR}
.if ${PORT_OPTIONS:MADVANCED}
	${INSTALL_SCRIPT} ${WRKSRC}/bin/sbt ${STAGEDIR}${DATADIR}
	${INSTALL_SCRIPT} ${WRKSRC}/bin/sbt-launch-lib.bash ${STAGEDIR}${DATADIR}
.if ${PORT_OPTIONS:MPRELOADED}
	cd ${WRKSRC}/lib && ${COPYTREE_SHARE} local-preloaded ${STAGEDIR}${DATADIR}
.endif
	${LN} -s ../${DATADIR_REL}/sbt ${STAGEDIR}${PREFIX}/bin/
.else
	${INSTALL_DATA} ${WRKSRC}/bin/sbt-launch.jar ${STAGEDIR}${DATADIR}
	${INSTALL_SCRIPT} ${WRKDIR}/sbt.sh ${STAGEDIR}${PREFIX}/bin/sbt
.endif

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