svn commit: r387326 - head/devel/rebar3
Jimmy Olgeni
olgeni at FreeBSD.org
Sun May 24 19:47:01 UTC 2015
Author: olgeni
Date: Sun May 24 19:47:00 2015
New Revision: 387326
URL: https://svnweb.freebsd.org/changeset/ports/387326
Log:
Add options for installing bash and zsh completions.
Modified:
head/devel/rebar3/Makefile
Modified: head/devel/rebar3/Makefile
==============================================================================
--- head/devel/rebar3/Makefile Sun May 24 18:58:25 2015 (r387325)
+++ head/devel/rebar3/Makefile Sun May 24 19:47:00 2015 (r387326)
@@ -16,12 +16,24 @@ BUILD_DEPENDS= ${LOCALBASE}/bin/erl:${PO
${LOCALBASE}/bin/git:${PORTSDIR}/devel/git
RUN_DEPENDS= ${LOCALBASE}/bin/erl:${PORTSDIR}/lang/erlang
+OPTIONS_DEFINE= BASH ZSH
+
USE_GITHUB= yes
GH_ACCOUNT= rebar
GH_TAGNAME= 9ad3025
PLIST_FILES= bin/${PORTNAME}
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MBASH}
+PLIST_FILES+= share/bash-completion/completions/rebar3
+.endif
+
+.if ${PORT_OPTIONS:MZSH}
+PLIST_FILES+= share/zsh/site-functions/_rebar3
+.endif
+
post-extract:
@${CP} -R ${WRKDIR}/_build ${WRKSRC}/
@@ -30,5 +42,15 @@ do-build:
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/rebar3 \
+ ${STAGEDIR}${PREFIX}/share/bash-completion/completions/rebar3
+.endif
+.if ${PORT_OPTIONS:MZSH}
+ @${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions/
+ ${INSTALL_DATA} ${WRKSRC}/priv/shell-completion/zsh/_rebar3 \
+ ${STAGEDIR}${PREFIX}/share/zsh/site-functions/
+.endif
.include <bsd.port.mk>
More information about the svn-ports-all
mailing list