Add an OPTION to install symlinks for subcommands (disabled by default).

This commit is contained in:
Alexey Dokuchaev 2013-05-21 12:13:53 +00:00
parent 13c815cc8f
commit d7d7ecd36d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=318687

View File

@ -19,20 +19,31 @@ USE_GMAKE= yes
MAKE_ARGS= CCPLUSPLUS="${CXX} -c" LD="${CXX}" DEBUG="${CFLAGS}" \
INSTALLPATH="${PREFIX}" MANINSTALLDIR="${MANPREFIX}/man/man1"
MAN1= hfs.1
PLIST_FILES= bin/hfs
MAN1= ${PORTNAME}.1
PLIST_FILES= bin/${PORTNAME}
PORTDOCS= README
OPTIONS_DEFINE= DOCS
OPTIONS_DEFINE= ALIASES DOCS
ALIASES_DESC= Install subcommand symbolic links
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MALIASES}
ALIASES= bin/hcat bin/hcd bin/hdir bin/hls bin/hpwd bin/hread
PLIST_FILES+= ${ALIASES}
.endif
post-patch:
@${REINPLACE_CMD} -e 's|/usr/.* ||' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's|Volume::Enumerate|Enumerate|' \
${WRKSRC}/volume.h
post-install:
.if ${PORT_OPTIONS:MALIASES}
. for l in ${ALIASES}
${LN} -sf ${PORTNAME} ${PREFIX}/${l}
. endfor
.endif
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${DOCSDIR}