1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-24 09:25:01 +00:00

- Add staging support

- Use PORTDATA for plist generation
This commit is contained in:
Pawel Pekala 2014-04-01 10:28:08 +00:00
parent f1ab75327c
commit 4c7bb81a55
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=349833

View File

@ -24,24 +24,21 @@ WRKSRC= ${WRKDIR}/apache-maven-${DISTVERSION}
INSTANCE_FILE= 020201-${PORTNAME}-${PORTVERSION}
INSTANCES_DIR= etc/maven-wrapper/instances.d/
PLIST_FILES= ${INSTANCES_DIR}/${INSTANCE_FILE}
PORTDATA= *
NO_STAGE= yes
post-extract:
${RM} -f ${WRKSRC}/bin/m2.bat
${ECHO_CMD} "${DATADIR}" > ${WRKSRC}/${INSTANCE_FILE}
do-install:
cd ${WRKSRC} && ${FIND} . -type d -exec ${MKDIR} ${DATADIR}/{} \;
cd ${WRKSRC} && ${FIND} . -type f -not -path "\./bin/" -exec ${INSTALL_DATA} {} ${DATADIR}/{} \;
${INSTALL_DATA} ${WRKSRC}/bin/m2.conf ${DATADIR}/bin/
${INSTALL_SCRIPT} ${WRKDIR}/m2.sh ${DATADIR}/bin/mvn
${MKDIR} ${PREFIX}/${INSTANCES_DIR}
${INSTALL_DATA} ${WRKSRC}/${INSTANCE_FILE} ${PREFIX}/${INSTANCES_DIR}
post-install:
@${FIND} -s ${WRKSRC} -not -type d 2>/dev/null | \
${SED} -ne 's,^${WRKSRC},${DATADIR:S,^${PREFIX}/,,},p' >> ${TMPPLIST}
@${FIND} -s -d ${WRKSRC} -type d 2>/dev/null | \
${SED} -ne 's,^${WRKSRC},@dirrm ${DATADIR:S,^${PREFIX}/,,},p' >> ${TMPPLIST}
cd ${WRKSRC} && ${FIND} . -type d -exec ${MKDIR} \
${STAGEDIR}${DATADIR}/{} \;
cd ${WRKSRC} && ${FIND} . -type f -not -path "\./bin/" \
-exec ${INSTALL_DATA} {} ${STAGEDIR}${DATADIR}/{} \;
${INSTALL_DATA} ${WRKSRC}/bin/m2.conf ${STAGEDIR}${DATADIR}/bin
${INSTALL_SCRIPT} ${WRKDIR}/m2.sh ${STAGEDIR}${DATADIR}/bin/mvn
@${MKDIR} ${STAGEDIR}${PREFIX}/${INSTANCES_DIR}
${INSTALL_DATA} ${WRKSRC}/${INSTANCE_FILE} \
${STAGEDIR}${PREFIX}/${INSTANCES_DIR}
.include <bsd.port.mk>