summaryrefslogtreecommitdiffstats
path: root/java/jrosetta/Makefile
blob: 2b2d69cae0cc83fb2e9633696b11b8da8f2defb0 (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
# New ports collection makefile for:	jrosetta
# Date created:				11 February 2010
# Whom:					rfarmer@predatorlabs.net
#
# $FreeBSD$
#

PORTNAME=	jrosetta
PORTVERSION=	1.0.4
PORTREVISION=	1
CATEGORIES=	java devel
MASTER_SITES=	http://maven.artenum.com/content/groups/public/com/artenum/${PORTNAME}/${PORTVERSION}/:source \
		http://maven.artenum.com/content/groups/public/com/artenum/${PORTNAME}/${PORTNAME}-api/${PORTVERSION}/:api \
		http://maven.artenum.com/content/groups/public/com/artenum/${PORTNAME}/${PORTNAME}-engine/${PORTVERSION}/:engine

MAINTAINER=	ports@FreeBSD.org
COMMENT=	API for building a graphical console in Swing

USE_JAVA=	yes
JAVA_VERSION=	1.5+
JAVA_RUN=	yes

PLIST_FILES=	%%JAVAJARDIR%%/jrosetta-api.jar \
		%%JAVAJARDIR%%/jrosetta-engine.jar

OPTIONS=	COMPILE	"Download and compile source instead of binaries" off

.include <bsd.port.options.mk>

.if defined(WITH_COMPILE)
DISTFILES=	${PORTNAME}-${PORTVERSION}-sources.jar:source

BUILD_DEPENDS=	mvn:${PORTSDIR}/devel/maven3
JAVA_BUILD=	yes
USE_ZIP=	yes

MANUAL_PACKAGE_BUILD=	maven fetches files during build target

OUTPUT=		${WRKDIR}/m2/com/artenum/jrosetta
.else
DISTFILES=	${PORTNAME}-api-${PORTVERSION}.jar:api \
		${PORTNAME}-engine-${PORTVERSION}.jar:engine
EXTRACT_ONLY=

NO_BUILD=	yes
.endif

.if defined(WITH_COMPILE)
post-patch:
	${MKDIR} ${WRKDIR}/m2
	${CP} ${FILESDIR}/settings.xml ${WRKDIR}
	${REINPLACE_CMD} -e "s|WORK|${WRKDIR}|" ${WRKDIR}/settings.xml

do-build:
	(cd ${WRKSRC} && ${LOCALBASE}/bin/mvn -gs "${WRKDIR}/settings.xml" clean install)
.endif

do-install:
.if defined(WITH_COMPILE)
	${INSTALL_DATA} ${OUTPUT}/jrosetta-api/${PORTVERSION}/jrosetta-api-${PORTVERSION}.jar \
		${JAVAJARDIR}/jrosetta-api.jar
	${INSTALL_DATA} ${OUTPUT}/jrosetta-engine/${PORTVERSION}/jrosetta-engine-${PORTVERSION}.jar \
		${JAVAJARDIR}/jrosetta-engine.jar
.else
	${INSTALL_DATA} ${DISTDIR}/jrosetta-api-${PORTVERSION}.jar \
		${JAVAJARDIR}/jrosetta-api.jar
	${INSTALL_DATA} ${DISTDIR}/jrosetta-engine-${PORTVERSION}.jar \
		${JAVAJARDIR}/jrosetta-engine.jar
.endif

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