svn commit: r387477 - head/devel/rebar

Jimmy Olgeni olgeni at FreeBSD.org
Tue May 26 13:56:07 UTC 2015


Author: olgeni
Date: Tue May 26 13:56:06 2015
New Revision: 387477
URL: https://svnweb.freebsd.org/changeset/ports/387477

Log:
  Add options for installing bash and zsh completions.
  
  PR:		200430
  Submitted by:	olgeni
  Approved by:	maintainer

Modified:
  head/devel/rebar/Makefile

Modified: head/devel/rebar/Makefile
==============================================================================
--- head/devel/rebar/Makefile	Tue May 26 13:32:36 2015	(r387476)
+++ head/devel/rebar/Makefile	Tue May 26 13:56:06 2015	(r387477)
@@ -13,11 +13,28 @@ LICENSE=	APACHE20
 BUILD_DEPENDS=	${LOCALBASE}/bin/escript:${PORTSDIR}/lang/erlang
 RUN_DEPENDS:=	${BUILD_DEPENDS}
 
+OPTIONS_DEFINE=	BASH ZSH
+
 USE_GITHUB=	yes
 
 PLIST_FILES=	bin/${PORTNAME}
 
+BASH_PLIST_FILES=	share/bash-completion/completions/rebar
+ZSH_PLIST_FILES=	share/zsh/site-functions/_rebar
+
+.include <bsd.port.options.mk>
+
 do-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
+.if ${PORT_OPTIONS:MBASH}
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/bash-completion/completions
+	${INSTALL_DATA} ${WRKSRC}/priv/shell-completion/bash/rebar \
+		${STAGEDIR}${PREFIX}/share/bash-completion/completions/rebar
+.endif
+.if ${PORT_OPTIONS:MZSH}
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions/
+	${INSTALL_DATA} ${WRKSRC}/priv/shell-completion/zsh/_rebar \
+		${STAGEDIR}${PREFIX}/share/zsh/site-functions/
+.endif
 
 .include <bsd.port.mk>


More information about the svn-ports-all mailing list