blob: b94ec0e11f40dd150ba230d1f817ef95a02beb50 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# Created by: Herve Quiroz <hq@FreeBSD.org>
# $FreeBSD$
PORTNAME= jaxup
PORTVERSION= 1.01
PORTREVISION= 3
CATEGORIES= textproc java
MASTER_SITES= http://klomp.org/jaxup/
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
MAINTAINER= ports@FreeBSD.org
COMMENT= Java XUpdate engine
BUILD_DEPENDS= ${JAR_DEPENDS}
RUN_DEPENDS= ${JAR_DEPENDS}
JAR_DEPENDS= ${JAVALIBDIR}/jdom.jar:${PORTSDIR}/java/jdom \
${JAVALIBDIR}/jaxen-full.jar:${PORTSDIR}/java/jaxen \
${JAVALIBDIR}/xercesImpl.jar:${PORTSDIR}/textproc/xerces-j
USES= zip
WRKSRC= ${WRKDIR}/${PORTNAME}
USE_JAVA= yes
JAVA_VERSION= 1.6+
DATADIR= ${JAVASHAREDIR}/${PORTNAME}
OPTIONS_DEFINE= DOCS
USE_ANT= yes
ALL_TARGET= jar
DOCS_ALL_TARGET=docs
PLIST_FILES+= %%DATADIR%%/jaxup-xupdater.jar bin/jaxup-xupdater \
%%JAVAJARDIR%%/${PORTNAME}.jar
PORTDOCS= LICENSE.txt api index.html jaxup_files xupdate-wd.html xupdate-wd_files
.include <bsd.port.pre.mk>
UTIL_CLASSPATH_JARS= jaxen-full saxpath xercesImpl
UTIL_CLASSPATH!= ${ECHO_CMD} ${UTIL_CLASSPATH_JARS:S,^,${JAVALIBDIR}/,:S,$,.jar,} | ${TR} " " ":"
.if ${PORT_OPTIONS:MDOCS}
JDK_API!= (${FIND} -s ${LOCALBASE}/share/doc/jdk1.[4-5] -maxdepth 1 -name api -type d 2>/dev/null || ${ECHO_CMD}) | ${TAIL} -n 1
.if ${JDK_API} != ""
MAKE_ARGS+= -Dj2se.apidocs="${JDK_API}"
.endif
JAXEN_API!= (${FIND} -s ${LOCALBASE}/share/doc/jaxen -maxdepth 1 -name javadoc -type d 2>/dev/null || ${ECHO_CMD}) | ${TAIL} -n 1
.if ${JAXEN_API} != ""
MAKE_ARGS+= -Djaxen.apidocs="${JAXEN_API}"
.endif
.endif
post-extract:
${CP} ${FILESDIR}/build.xml ${WRKSRC}/
${CP} ${FILESDIR}/DOMXUpdater.java ${WRKDIR}/
${SED} -e 's,%%LOCALBASE%%,${LOCALBASE},g ; s,%%DATADIR%%,${DATADIR},g' \
${FILESDIR}/jaxup-xupdater.sh >${WRKDIR}/jaxup-xupdater
post-build:
@${ECHO_MSG} ">> Building utility classes..."
cd ${WRKDIR} && ${JAVAC} -classpath "${UTIL_CLASSPATH}:${WRKSRC}/build/lib/jaxup.jar" DOMXUpdater.java
${ECHO_CMD} "Main-Class: DOMXUpdater" >${WRKDIR}/MANIFEST
cd ${WRKDIR} && ${JAR} -cmf MANIFEST jaxup-xupdater.jar DOMXUpdater.class
do-install:
@${ECHO_MSG} -n ">> Installing JAR as ${JAVAJARDIR}/${PORTNAME}.jar..."
@${MKDIR} ${STAGEDIR}${JAVAJARDIR}
${INSTALL_DATA} ${WRKSRC}/build/lib/${PORTNAME}.jar ${STAGEDIR}${JAVAJARDIR}/
@${ECHO_MSG} " [ DONE ]"
@${ECHO_MSG} ">> Installing utility scripts and classes..."
${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKDIR}/jaxup-xupdater.jar ${STAGEDIR}${DATADIR}/
${INSTALL_SCRIPT} ${WRKDIR}/jaxup-xupdater ${STAGEDIR}${PREFIX}/bin/
@${ECHO_MSG} " [ DONE ]"
.if ${PORT_OPTIONS:MDOCS}
@${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..."
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC}/build/docs \
&& ${FIND} . -type d -exec ${MKDIR} ${STAGEDIR}${DOCSDIR}/{} \; \
&& ${FIND} . -type f -exec ${INSTALL_DATA} {} ${STAGEDIR}${DOCSDIR}/{} \;
${INSTALL_DATA} ${WRKSRC}/LICENSE.txt ${STAGEDIR}${DOCSDIR}/
@${ECHO_MSG} " [ DONE ]"
.endif
.include <bsd.port.post.mk>
|