Lines 22-61
Link Here
|
22 |
|
22 |
|
23 |
PLIST= ${WRKDIR}/PLIST |
23 |
PLIST= ${WRKDIR}/PLIST |
24 |
|
24 |
|
25 |
CLASSES_SUBDIR= share/java/classes |
25 |
JAVALIBNAME= ${PORTNAME}-${PORTVERSION} |
26 |
STYLE_SUBDIR= share/java/${PORTNAME} |
26 |
APIDOCSDIR= ${DOCSDIR}/${JAVALIBNAME} |
|
|
27 |
STYLEDIR= ${JAVASHAREDIR}/${PORTNAME} |
27 |
|
28 |
|
28 |
post-extract: |
29 |
pre-install: |
29 |
@${TOUCH} ${WRKDIR}/PLIST |
30 |
@${RM} -f ${PLIST} |
|
|
31 |
@${TOUCH} ${PLIST} |
30 |
|
32 |
|
31 |
do-build: |
33 |
do-build: |
32 |
@(cd ${WRKSRC}; ${SETENV} JAVA_HOME=${JAVA_HOME} ant build.bindist) |
34 |
@cd ${WRKSRC} && \ |
|
|
35 |
${SETENV} JAVA_HOME=${JAVA_HOME} ant build.bindist |
33 |
|
36 |
|
34 |
do-install: |
37 |
do-install: do-install-jar do-install-data do-install-apidocs |
35 |
@${MKDIR} ${PREFIX}/${CLASSES_SUBDIR} |
38 |
|
36 |
@${INSTALL_DATA} ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION}/${PORTNAME}-all-${PORTVERSION}.jar ${PREFIX}/${CLASSES_SUBDIR}/${PORTNAME}.jar |
39 |
do-install-jar: |
37 |
@${ECHO} ${CLASSES_SUBDIR}/${PORTNAME}.jar >> ${PLIST} |
40 |
@${MKDIR} ${JAVAJARDIR} |
38 |
@${MKDIR} ${PREFIX}/${STYLE_SUBDIR} |
41 |
@${INSTALL_DATA} ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION}/${PORTNAME}-all-${PORTVERSION}.jar ${JAVAJARDIR}/${PORTNAME}.jar |
39 |
@(cd ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION}/contrib && \ |
42 |
@${ECHO} ${JAVAJARDIR}/${PORTNAME}.jar | \ |
40 |
${TAR} -c -f - .) \ |
43 |
${SED} "s,${PREFIX}/*,," >> ${PLIST} |
41 |
| (cd ${PREFIX}/${STYLE_SUBDIR} && ${TAR} --unlink -x -f -) |
44 |
@${ECHO} "@unexec ${RMDIR} ${JAVAJARDIR} 2>/dev/null || true" | \ |
42 |
@cd ${PREFIX} \ |
45 |
${SED} "s,${PREFIX}/*,," >> ${PLIST} |
43 |
&& ${FIND} ${STYLE_SUBDIR} -type f -print >> ${PLIST} |
46 |
|
44 |
@cd ${PREFIX} \ |
47 |
do-install-data: |
45 |
&& ${FIND} ${STYLE_SUBDIR} -type d -print | sort -r | \ |
48 |
@${MKDIR} ${STYLEDIR} |
46 |
${SED} "s,^,@dirrm ,g" >> ${PLIST} |
49 |
@${CP} -r ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION}/contrib/* ${STYLEDIR} |
|
|
50 |
@${FIND} ${STYLEDIR} -type f -print | \ |
51 |
${SED} "s,${PREFIX}/*,," >> ${PLIST} |
52 |
@${FIND} ${STYLEDIR} -type d -print | sort -r | \ |
53 |
${SED} -e "s,${PREFIX}/*,," -e "s,^,@dirrm ,g" >> ${PLIST} |
54 |
|
55 |
do-install-apidocs: |
47 |
.if !defined(NOPORTDOCS) |
56 |
.if !defined(NOPORTDOCS) |
48 |
@${MKDIR} ${DOCSDIR} |
57 |
@${MKDIR} ${APIDOCSDIR} |
49 |
@(cd ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION} && \ |
58 |
@(cd ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION} && \ |
50 |
${TAR} -c --exclude '*.jar' --exclude contrib -f - .) \ |
59 |
${TAR} -c --exclude '*.jar' --exclude contrib -f - .) | \ |
51 |
| (cd ${DOCSDIR} && ${TAR} --unlink -x -f -) |
60 |
(cd ${APIDOCSDIR} && ${TAR} --unlink -x -f -) |
52 |
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR} |
61 |
@${CHOWN} -h -R ${SHAREOWN}:${SHAREGRP} ${APIDOCSDIR} |
53 |
@cd ${PREFIX} \ |
62 |
@${FIND} ${APIDOCSDIR} -type f -print | \ |
54 |
&& ${FIND} share/doc/${PORTNAME} -type f -print >> ${PLIST} |
63 |
${SED} "s,${PREFIX}/*,," >> ${PLIST} |
55 |
@cd ${PREFIX} \ |
64 |
@${FIND} ${APIDOCSDIR} -type d -print | sort -r | \ |
56 |
&& ${FIND} share/doc/${PORTNAME} -type d -print | sort -r | \ |
65 |
${SED} -e "s,${PREFIX}/*,," -e "s,^,@dirrm ,g" >> ${PLIST} |
57 |
${SED} "s,^,@dirrm ,g" >> ${PLIST} |
|
|
58 |
.endif |
66 |
.endif |
59 |
@${ECHO} "@unexec ${RMDIR} %D/${CLASSES_SUBDIR} 2>/dev/null || true" >> ${PLIST} |
|
|
60 |
|
67 |
|
61 |
.include <bsd.port.mk> |
68 |
.include <bsd.port.mk> |