- Install data files in DATADIR=${JAVASHAREDIR}/${PORTNAME}

- Install documentation files in ${DOCSDIR}
- Use PORTDOCS to reduce pkg-plist size
- Bump PORTREVISION

Reviewed by:	glewis
This commit is contained in:
Herve Quiroz 2006-09-06 21:52:18 +00:00
parent c39f8e4494
commit 1ad918df13
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=172426
3 changed files with 76 additions and 1505 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= apache-ant
PORTVERSION= 1.6.5
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= devel java
MASTER_SITES= ${MASTER_SITE_APACHE:S,%SUBDIR%/,ant/binaries/:bin,} \
${MASTER_SITE_LOCAL:S,%SUBDIR%/,hq/:man,} \
@ -29,14 +29,14 @@ USE_JAVA= yes
JAVA_VERSION= 1.2+
NO_BUILD= YES
PORTDESTDIR= ${PREFIX}/ant
DATADIR= ${JAVASHAREDIR}/${PORTNAME}
READMES= LICENSE README WHATSNEW
DATADIRS= lib etc
.if !defined(NOPORTDOCS)
DATADIRS+= docs
PORTDOCS= *
.endif
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
MANPAGE_SUBDIR= apache-ant-manpage
@ -46,38 +46,40 @@ MAN1= ant.1
MAN5= build.xml.5
SUB_FILES= ant.sh
SUB_LIST= ANT_HOME=${PORTDESTDIR}
post-extract:
@${TAR} -C ${WRKSRC} -xzf ${DISTDIR}/${MANPAGE_DISTFILE}
do-install:
@${ECHO_MSG} -n ">> Creating destination directory..."
@${MKDIR} ${PORTDESTDIR}/bin
@${ECHO_MSG} " [ DONE ]"
@${ECHO_MSG} -n ">> Installing scripts..."
@${MKDIR} ${DATADIR}/bin
@${INSTALL_SCRIPT} ${WRKDIR}/ant.sh ${PREFIX}/bin/ant
@${INSTALL_SCRIPT} ${WRKSRC}/bin/antRun ${PORTDESTDIR}/bin/
@${INSTALL_SCRIPT} ${WRKSRC}/bin/antRun ${DATADIR}/bin/
@${ECHO_MSG} " [ DONE ]"
@${ECHO_MSG} -n ">> Installing readme files..."
@${INSTALL_DATA} ${READMES:S|^|${WRKSRC}/|} ${PORTDESTDIR}
.for d in etc lib
@${ECHO_MSG} -n ">> Installing data directory '${d}'..."
@cd ${WRKSRC} && ${FIND} ${d} -type d -exec ${MKDIR} ${DATADIR}/\{} \;
@cd ${WRKSRC} && ${FIND} ${d} -type f -exec ${INSTALL_DATA} \{} ${DATADIR}/\{} \;
@${ECHO_MSG} " [ DONE ]"
.endfor
@${ECHO_MSG} -n ">> Installing manpages..."
@${INSTALL_MAN} ${MANPAGE_WRKSRC}/ant.1 ${MAN1PREFIX}/man/man1
@${INSTALL_MAN} ${MANPAGE_WRKSRC}/build.xml.5 ${MAN5PREFIX}/man/man5
@${ECHO_MSG} " [ DONE ]"
.if defined(DATADIRS)
.for DIR in ${DATADIRS}
@${ECHO_MSG} -n ">> Installing data directory '${DIR}'..."
@cd ${INSTALL_WRKSRC}; \
${FIND} ${DIR} -type d -exec ${MKDIR} ${PORTDESTDIR}/\{} \; ;\
${FIND} ${DIR} -type f -exec ${INSTALL_DATA} \{} ${PORTDESTDIR}/\{} \;
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@${ECHO_MSG} -n ">> Installing readme files..."
@${INSTALL_DATA} ${READMES:S|^|${WRKSRC}/|} ${DOCSDIR}
@${ECHO_MSG} " [ DONE ]"
@${ECHO_MSG} -n ">> Installing documentation files..."
@cd ${WRKSRC}/docs && ${FIND} . -type d -exec ${MKDIR} ${DOCSDIR}/\{} \;
@cd ${WRKSRC}/docs && ${FIND} . -type f -exec ${INSTALL_DATA} \{} ${DOCSDIR}/\{} \;
@${ECHO_MSG} " [ DONE ]"
.endfor
.endif
.include <bsd.port.mk>

View File

@ -12,7 +12,7 @@
DEFAULT_JIKES=false
ANT_HOME=${ANT_HOME:-"%%ANT_HOME%%"}
DATADIR=${DATADIR:-"%%DATADIR%%"}
#-----------------------------------------------------------------------------
@ -33,7 +33,7 @@ fi
usejikes=${usejikes:-${DEFAULT_JIKES}};
# Set ANT_LIB location
ANT_LIB="${ANT_HOME}/lib"
ANT_LIB="${DATADIR}/lib"
#-----------------------------------------------------------------------------
# Determine CLASSPATH
@ -79,4 +79,4 @@ if [ ! -x "${JAVACMD}" ]; then
exit 1
fi
exec "${JAVACMD}" ${ANT_OPTS} -classpath "${LOCALCLASSPATH}" -Dant.home="${ANT_HOME}" org.apache.tools.ant.launch.Launcher ${ANT_ARGS} -lib "${CLASSPATH}" "$@"
exec "${JAVACMD}" ${ANT_OPTS} -classpath "${LOCALCLASSPATH}" -Dant.home="${DATADIR}" org.apache.tools.ant.launch.Launcher ${ANT_ARGS} -lib "${CLASSPATH}" "$@"

File diff suppressed because it is too large Load Diff