1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

- Add staging support

- Convert to new options framework
This commit is contained in:
Pawel Pekala 2014-05-30 18:19:15 +00:00
parent 9b7bbbe07d
commit 1dda6ea844
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=355887

View File

@ -16,22 +16,22 @@ LICENSE= APACHE20
USE_JAVA= yes
JAVA_VERSION= 1.6+
USE_ANT= yes
ALL_TARGET= jar
.if !defined(NOPORTDOCS)
ALL_TARGET+= javadoc
PORTDOCS= *
.endif
JARFILE= ${PORTNAME}-${PORTVERSION}.jar
DESTJARFILE= ${PORTNAME}.jar
PLIST_FILES= %%JAVAJARDIR%%/${DESTJARFILE}
PORTDOCS= *
OPTIONS_DEFINE= DOCS
NO_STAGE= yes
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MDOCS}
ALL_TARGET+= javadoc
.endif
JDK_API!= (${FIND} -s ${LOCALBASE}/share/doc/jdk1.? -maxdepth 1 -name api -type d 2>/dev/null || ${ECHO_CMD}) | ${TAIL} -n 1
.if ${JDK_API} != ""
@ -39,16 +39,11 @@ MAKE_ARGS+= -Djdk.javadoc=${JDK_API}
.endif
do-install:
@${ECHO_MSG} -n ">> Installing JAR as ${JAVAJARDIR}/${DESTJARFILE}..."
@${INSTALL_DATA} ${WRKSRC}/target/${JARFILE} ${JAVAJARDIR}/${DESTJARFILE}
@${ECHO_MSG} " [ DONE ]"
.if !defined(NOPORTDOCS)
@${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}/..."
@cd ${WRKSRC}/target/apidocs \
&& ${FIND} . -type d -exec ${MKDIR} ${DOCSDIR}/{} \; \
&& ${FIND} . -type f -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} \;
@${ECHO_MSG} " [ DONE ]"
${INSTALL_DATA} ${WRKSRC}/target/${JARFILE} \
${STAGEDIR}${JAVAJARDIR}/${DESTJARFILE}
.if ${PORT_OPTIONS:MDOCS}
(cd ${WRKSRC}/target/apidocs && ${COPYTREE_SHARE} . \
${STAGEDIR}${DOCSDIR})
.endif
.include <bsd.port.post.mk>