mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-24 09:25:01 +00:00
1: Stagify.
2: use options helper to handle PORTSEXAMPLES Approved by: portmgr@ (blanket approval)
This commit is contained in:
parent
504dc884dc
commit
2da3686e2f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=360123
@ -22,22 +22,18 @@ DATADIR= ${PYTHON_SITELIBDIR}
|
||||
FIND_DIRS= -type d \! -empty
|
||||
FIND_DATA= -type f
|
||||
FIND_DELETE= \( -name "*.txt" -and -maxdepth 2 \)
|
||||
OPTIONS_DEFINE= EXAMPLES
|
||||
|
||||
.if !defined(WITH_EXAMPLES)
|
||||
PLIST_SUB= PORTEXAMPLES="@comment "
|
||||
.else
|
||||
PLIST_SUB= PORTEXAMPLES=""
|
||||
.endif
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
NO_STAGE= yes
|
||||
do-install:
|
||||
@cd ${WRKSRC} && ${FIND} . ${FIND_DIRS} -exec ${MKDIR} ${DATADIR}/{} \;
|
||||
@cd ${WRKSRC} && ${FIND} . ${FIND_DIRS} -exec ${MKDIR} ${STAGEDIR}${DATADIR}/{} \;
|
||||
@cd ${WRKSRC} && ${FIND} . ${FIND_DELETE} -delete
|
||||
@cd ${WRKSRC} && ${FIND} . ${FIND_DATA} -exec ${INSTALL_DATA} {} ${DATADIR}/{} \;
|
||||
.if !defined(WITH_EXAMPLES)
|
||||
${RM} -r ${DATADIR}/${PORTNAME}/examples
|
||||
@cd ${WRKSRC} && ${FIND} . ${FIND_DATA} -exec ${INSTALL_DATA} {} ${STAGEDIR}${DATADIR}/{} \;
|
||||
.if ${PORT_OPTIONS:MEXAMPLES}
|
||||
${MV} ${STAGEDIR}${DATADIR}/${PORTNAME}/examples ${STAGEDIR}${EXAMPLESDIR}
|
||||
.else
|
||||
${MV} ${DATADIR}/${PORTNAME}/examples ${EXAMPLESDIR}
|
||||
${RM} -r ${STAGEDIR}${DATADIR}/${PORTNAME}/examples
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user