- Don't mkdir ${JAVAJARDIR} (already in mtree)

- Use %%JAVAJARDIR%%
- Use FIND | INSTALL_DATA rather than CP
This commit is contained in:
Herve Quiroz 2005-07-29 12:36:08 +00:00
parent c16aea60cf
commit 18543e1e62
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=140394

View file

@ -24,24 +24,19 @@ NO_BUILD= YES
PORTDOCS= api LICENSE
.endif
JARFILE= ${PORTNAME}.jar
PLIST_FILES+= ${JAVAJARDIR:S,^${PREFIX}/,,}/${JARFILE}
PLIST_FILES+= %%JAVAJARDIR%%/${JARFILE}
post-extract:
@${MV} ${WRKSRC}/LICENSE ${WRKSRC}/docs/
do-install:
@${ECHO_MSG} -n ">> Installing JAR as ${JAVAJARDIR}/${JARFILE}..."
@${MKDIR} ${JAVAJARDIR}
@${INSTALL_DATA} ${WRKSRC}/${JARFILE} ${JAVAJARDIR}/
@${ECHO_MSG} " [ DONE ]"
.if !defined(NOPORTDOCS)
@${ECHO_MSG} -n ">> Installing documentation..."
@${MKDIR} ${DOCSDIR}
.for DOCFILE in ${PORTDOCS}
@${CP} -r ${WRKSRC}/docs/${DOCFILE} ${DOCSDIR}/
@${ECHO_MSG} -n " ${DOCFILE}"
.endfor
@${CHOWN} -h -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR}
@cd ${WRKSRC}/docs && ${FIND} ${PORTDOCS} -type d -exec ${MKDIR} ${DOCSDIR}/{} \;
@cd ${WRKSRC}/docs && ${FIND} ${PORTDOCS} -type f -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} \;
@${ECHO_MSG} " [ DONE ]"
.endif