aboutsummaryrefslogtreecommitdiff
path: root/dns/dog
diff options
context:
space:
mode:
authorLewis Cook <lcook@FreeBSD.org>2022-12-13 20:55:16 +0000
committerLewis Cook <lcook@FreeBSD.org>2022-12-13 21:11:45 +0000
commit69709b474bb799f6393c4b43a0b828403cd4656f (patch)
tree909e36cd5740ea751a5149a715cc197df1210b11 /dns/dog
parentda864ad35667ca83742a1b34e1d75eedc71d5f06 (diff)
downloadports-69709b474bb799f6393c4b43a0b828403cd4656f.tar.gz
ports-69709b474bb799f6393c4b43a0b828403cd4656f.zip
dns/dog: Simplify shell completion installation
Diffstat (limited to 'dns/dog')
-rw-r--r--dns/dog/Makefile20
-rw-r--r--dns/dog/pkg-plist4
2 files changed, 9 insertions, 15 deletions
diff --git a/dns/dog/Makefile b/dns/dog/Makefile
index d1c4744b6049..b0bf180fa362 100644
--- a/dns/dog/Makefile
+++ b/dns/dog/Makefile
@@ -94,27 +94,25 @@ CARGO_CRATES= addr2line-0.14.0 \
winreg-0.6.2 \
mutagen,mutagen-core,mutagen-transform@git+https://github.com/llogiq/mutagen\#c7abc956a10e8a3e2cc71f21279ea0a42f7b7c10
+PLIST_FILES= bin/${PORTNAME}
PORTDOCS= README.md
OPTIONS_DEFINE= COMPLETIONS DOCS
OPTIONS_DEFAULT= COMPLETIONS
-OPTIONS_SUB= yes
-COMPLETIONS_DESC= Install shell completions for bash, fish and zsh
+COMPLETIONS_DESC= Install bash, fish and zsh shell completions
+COMPLETIONS_PLIST_FILES= share/bash-completion/completions/${PORTNAME} \
+ share/fish/vendor_completions.d/${PORTNAME}.fish \
+ share/zsh/site-functions/_${PORTNAME}
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
post-install-COMPLETIONS-on:
- @${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d
- ${INSTALL_DATA} ${WRKSRC}/completions/${PORTNAME}.bash \
- ${STAGEDIR}${PREFIX}/etc/bash_completion.d/${PORTNAME}
- @${MKDIR} ${STAGEDIR}${PREFIX}/share/fish/completions
- ${INSTALL_DATA} ${WRKSRC}/completions/${PORTNAME}.fish \
- ${STAGEDIR}${PREFIX}/share/fish/completions/${PORTNAME}.fish
- @${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
- ${INSTALL_DATA} ${WRKSRC}/completions/${PORTNAME}.zsh \
- ${STAGEDIR}${PREFIX}/share/zsh/site-functions/_${PORTNAME}
+.for _shell in bash fish zsh
+ ${INSTALL_DATA} ${WRKSRC}/completions/${PORTNAME}.${_shell} \
+ ${STAGEDIR}${PREFIX}/${COMPLETIONS_PLIST_FILES:M*${_shell}*}
+.endfor
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
diff --git a/dns/dog/pkg-plist b/dns/dog/pkg-plist
deleted file mode 100644
index ed035134fc7e..000000000000
--- a/dns/dog/pkg-plist
+++ /dev/null
@@ -1,4 +0,0 @@
-bin/dog
-%%COMPLETIONS%%etc/bash_completion.d/dog
-%%COMPLETIONS%%share/fish/completions/dog.fish
-%%COMPLETIONS%%share/zsh/site-functions/_dog