mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
- Add staging support
- Convert to new options framework - USE_ANT, ALL_TARGET instead of custom do-build target - Use PLIST_FILES and not generated plist file
This commit is contained in:
parent
9f347da861
commit
aa4e33bcb6
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=355959
@ -10,43 +10,23 @@ MASTER_SITES= http://archive.apache.org/dist/jakarta/oro/
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Perl/awk/sh regular expressions for Java
|
||||
|
||||
BUILD_DEPENDS= ${LOCALBASE}/bin/ant:${PORTSDIR}/devel/apache-ant
|
||||
|
||||
USE_JAVA= yes
|
||||
USE_ANT= yes
|
||||
JAVA_VERSION= 1.6+
|
||||
|
||||
PLIST= ${WRKDIR}/PLIST
|
||||
ALL_TARGET= jar javadocs
|
||||
|
||||
JAVALIBNAME= ${PORTNAME}-${PORTVERSION}
|
||||
|
||||
.if !defined(NOPORTDOCS)
|
||||
PLIST_FILES= %%JAVAJARDIR%%/${PORTNAME}.jar
|
||||
PORTDOCS= *
|
||||
.endif
|
||||
|
||||
NO_STAGE= yes
|
||||
do-build:
|
||||
@cd ${WRKSRC} && \
|
||||
${SETENV} JAVA_HOME=${JAVA_HOME} ant jar javadocs
|
||||
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