mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-03 01:23:49 +00:00
- Add staging support
- Convert to new options framework - USE_ANT, ALL_TARGET, MAKE_ARGS instead of custom do-build target - Use PLIST_FILES and not generated plist file
This commit is contained in:
parent
023ce00d00
commit
4e24a1e8dc
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=355963
@ -11,44 +11,24 @@ MASTER_SITE_SUBDIR= regexp/binaries
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Regular expressions for Java
|
||||
|
||||
BUILD_DEPENDS= ${LOCALBASE}/bin/ant:${PORTSDIR}/devel/apache-ant
|
||||
|
||||
USE_JAVA= yes
|
||||
JAVA_VERSION= 1.6+
|
||||
|
||||
PLIST= ${WRKDIR}/PLIST
|
||||
USE_ANT= yes
|
||||
ALL_TARGET= test package
|
||||
MAKE_ARGS= -Djakarta-site.dir=${WRKSRC}
|
||||
|
||||
JAVALIBNAME= ${PORTNAME}-${PORTVERSION}
|
||||
|
||||
.if !defined(NOPORTDOCS)
|
||||
PLIST_FILES= %%JAVAJARDIR%%/${PORTNAME}.jar
|
||||
PORTDOCS= *
|
||||
.endif
|
||||
|
||||
NO_STAGE= yes
|
||||
do-build:
|
||||
@if [ ! -f ${WRKSRC}/lib ]; then ${MKDIR} ${WRKSRC}/lib; fi
|
||||
@cd ${WRKSRC} && \
|
||||
${SETENV} JAVA_HOME=${JAVA_HOME} ant -Djakarta-site.dir=${WRKSRC} test package
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
pre-install:
|
||||
@${RM} -f ${PLIST}
|
||||
@${TOUCH} ${PLIST}
|
||||
@${ECHO} ${JAVAJARDIR}/${PORTNAME}.jar | \
|
||||
${SED} "s,${PREFIX}/*,," >> ${PLIST}
|
||||
@${ECHO} "@unexec ${RMDIR} ${JAVAJARDIR} 2>/dev/null || true" | \
|
||||
${SED} "s,${PREFIX}/*,," >> ${PLIST}
|
||||
|
||||
do-install: do-install-jar do-install-apidocs
|
||||
|
||||
do-install-jar:
|
||||
@${MKDIR} ${JAVAJARDIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/${PORTNAME}-${PORTVERSION}.jar ${JAVAJARDIR}/${PORTNAME}.jar
|
||||
|
||||
do-install-apidocs:
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
@${CP} -r ${WRKSRC}/docs/api/* ${DOCSDIR}
|
||||
@${CHOWN} -h -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR}
|
||||
.endif
|
||||
do-install:
|
||||
@${MKDIR} ${STAGEDIR}${JAVAJARDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}-${PORTVERSION}.jar \
|
||||
${STAGEDIR}${JAVAJARDIR}/${PORTNAME}.jar
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
(cd ${WRKSRC}/docs/api && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user