summaryrefslogtreecommitdiffstats
path: root/java/java-checkstyle/Makefile
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2002-11-22 23:48:17 +0000
committeredwin <edwin@FreeBSD.org>2002-11-22 23:48:17 +0000
commit36ba69f80044747e13006f5b5dde45d82146305e (patch)
treeea96b1be0cb7956cc0d2ec881118445517c232b5 /java/java-checkstyle/Makefile
parentd149c4747c729bec7a47200266a159be2f3cd257 (diff)
downloadFreeBSD-ports-36ba69f80044747e13006f5b5dde45d82146305e.zip
FreeBSD-ports-36ba69f80044747e13006f5b5dde45d82146305e.tar.gz
Maintainer springcleaning of his Makefiles
PR: ports/45513,ports/45512,ports/45511 Submitted by: Dave Glowacki <dglo@hyde.ssec.wisc.edu>
Diffstat (limited to 'java/java-checkstyle/Makefile')
-rw-r--r--java/java-checkstyle/Makefile65
1 files changed, 36 insertions, 29 deletions
diff --git a/java/java-checkstyle/Makefile b/java/java-checkstyle/Makefile
index 2758c29..cf5cea5 100644
--- a/java/java-checkstyle/Makefile
+++ b/java/java-checkstyle/Makefile
@@ -22,40 +22,47 @@ NEED_JAVAC= YES
PLIST= ${WRKDIR}/PLIST
-CLASSES_SUBDIR= share/java/classes
-STYLE_SUBDIR= share/java/${PORTNAME}
+JAVALIBNAME= ${PORTNAME}-${PORTVERSION}
+APIDOCSDIR= ${DOCSDIR}/${JAVALIBNAME}
+STYLEDIR= ${JAVASHAREDIR}/${PORTNAME}
-post-extract:
- @${TOUCH} ${WRKDIR}/PLIST
+pre-install:
+ @${RM} -f ${PLIST}
+ @${TOUCH} ${PLIST}
do-build:
- @(cd ${WRKSRC}; ${SETENV} JAVA_HOME=${JAVA_HOME} ant build.bindist)
-
-do-install:
- @${MKDIR} ${PREFIX}/${CLASSES_SUBDIR}
- @${INSTALL_DATA} ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION}/${PORTNAME}-all-${PORTVERSION}.jar ${PREFIX}/${CLASSES_SUBDIR}/${PORTNAME}.jar
- @${ECHO} ${CLASSES_SUBDIR}/${PORTNAME}.jar >> ${PLIST}
- @${MKDIR} ${PREFIX}/${STYLE_SUBDIR}
- @(cd ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION}/contrib && \
- ${TAR} -c -f - .) \
- | (cd ${PREFIX}/${STYLE_SUBDIR} && ${TAR} --unlink -x -f -)
- @cd ${PREFIX} \
- && ${FIND} ${STYLE_SUBDIR} -type f -print >> ${PLIST}
- @cd ${PREFIX} \
- && ${FIND} ${STYLE_SUBDIR} -type d -print | sort -r | \
- ${SED} "s,^,@dirrm ,g" >> ${PLIST}
+ @cd ${WRKSRC} && \
+ ${SETENV} JAVA_HOME=${JAVA_HOME} ant build.bindist
+
+do-install: do-install-jar do-install-data do-install-apidocs
+
+do-install-jar:
+ @${MKDIR} ${JAVAJARDIR}
+ @${INSTALL_DATA} ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION}/${PORTNAME}-all-${PORTVERSION}.jar ${JAVAJARDIR}/${PORTNAME}.jar
+ @${ECHO} ${JAVAJARDIR}/${PORTNAME}.jar | \
+ ${SED} "s,${PREFIX}/*,," >> ${PLIST}
+ @${ECHO} "@unexec ${RMDIR} ${JAVAJARDIR} 2>/dev/null || true" | \
+ ${SED} "s,${PREFIX}/*,," >> ${PLIST}
+
+do-install-data:
+ @${MKDIR} ${STYLEDIR}
+ @${CP} -r ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION}/contrib/* ${STYLEDIR}
+ @${FIND} ${STYLEDIR} -type f -print | \
+ ${SED} "s,${PREFIX}/*,," >> ${PLIST}
+ @${FIND} ${STYLEDIR} -type d -print | sort -r | \
+ ${SED} -e "s,${PREFIX}/*,," -e "s,^,@dirrm ,g" >> ${PLIST}
+
+do-install-apidocs:
.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
+ @${MKDIR} ${APIDOCSDIR}
@(cd ${WRKSRC}/target/dist/${PORTNAME}-${PORTVERSION} && \
- ${TAR} -c --exclude '*.jar' --exclude contrib -f - .) \
- | (cd ${DOCSDIR} && ${TAR} --unlink -x -f -)
- @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR}
- @cd ${PREFIX} \
- && ${FIND} share/doc/${PORTNAME} -type f -print >> ${PLIST}
- @cd ${PREFIX} \
- && ${FIND} share/doc/${PORTNAME} -type d -print | sort -r | \
- ${SED} "s,^,@dirrm ,g" >> ${PLIST}
+ ${TAR} -c --exclude '*.jar' --exclude contrib -f - .) | \
+ (cd ${APIDOCSDIR} && ${TAR} --unlink -x -f -)
+ @${CHOWN} -h -R ${SHAREOWN}:${SHAREGRP} ${APIDOCSDIR}
+ @${FIND} ${APIDOCSDIR} -type f -print | \
+ ${SED} "s,${PREFIX}/*,," >> ${PLIST}
+ @${FIND} ${APIDOCSDIR} -type d -print | sort -r | \
+ ${SED} -e "s,${PREFIX}/*,," -e "s,^,@dirrm ,g" >> ${PLIST}
.endif
- @${ECHO} "@unexec ${RMDIR} %D/${CLASSES_SUBDIR} 2>/dev/null || true" >> ${PLIST}
.include <bsd.port.mk>
OpenPOWER on IntegriCloud