svn commit: r318687 - head/emulators/hfs

Alexey Dokuchaev danfe at FreeBSD.org
Tue May 21 12:13:54 UTC 2013


Author: danfe
Date: Tue May 21 12:13:53 2013
New Revision: 318687
URL: http://svnweb.freebsd.org/changeset/ports/318687

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

Modified:
  head/emulators/hfs/Makefile

Modified: head/emulators/hfs/Makefile
==============================================================================
--- head/emulators/hfs/Makefile	Tue May 21 12:03:04 2013	(r318686)
+++ head/emulators/hfs/Makefile	Tue May 21 12:13:53 2013	(r318687)
@@ -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}


More information about the svn-ports-head mailing list