aboutsummaryrefslogtreecommitdiffstats
path: root/devel/rebar
diff options
context:
space:
mode:
authorolgeni <olgeni@FreeBSD.org>2015-05-26 21:56:06 +0800
committerolgeni <olgeni@FreeBSD.org>2015-05-26 21:56:06 +0800
commit7cc93c136eca2f36cf731812d0b9ed495b23e4bc (patch)
tree1d6e347745f4465a8e7c567d6526e5011282892b /devel/rebar
parentae4186c64f075a69cd0a35b3f0e2602fa63f8eee (diff)
downloadfreebsd-ports-gnome-7cc93c136eca2f36cf731812d0b9ed495b23e4bc.tar.gz
freebsd-ports-gnome-7cc93c136eca2f36cf731812d0b9ed495b23e4bc.tar.zst
freebsd-ports-gnome-7cc93c136eca2f36cf731812d0b9ed495b23e4bc.zip
Add options for installing bash and zsh completions.
PR: 200430 Submitted by: olgeni Approved by: maintainer
Diffstat (limited to 'devel/rebar')
-rw-r--r--devel/rebar/Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/devel/rebar/Makefile b/devel/rebar/Makefile
index 7d14044f10da..33833506139e 100644
--- a/devel/rebar/Makefile
+++ b/devel/rebar/Makefile
@@ -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>