Created
November 9, 2017 02:41
-
-
Save aidanharris/03ce326e1b06e3ced8897c55094a52cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 1999-2017 Gentoo Foundation | |
# Distributed under the terms of the GNU General Public License v2 | |
EAPI=6 | |
GOLANG_PKG_IMPORTPATH="github.com/junegunn" | |
GOLANG_PKG_TAGS="${PV}" | |
GOLANG_PKG_HAVE_TEST=1 | |
GOLANG_PKG_USE_CGO=1 | |
inherit golang-live bash-completion-r1 | |
DESCRIPTION="A general-purpose command-line fuzzy finder" | |
LICENSE="MIT" | |
SLOT="0" | |
KEYWORDS="amd64 arm x86" | |
IUSE="tmux neovim vim bash-completion zsh-completion fish-completion" | |
RDEPEND="tmux? ( app-misc/tmux )" | |
src_install() { | |
golang-live_src_install | |
doman man/man1/${PN}.1 | |
# Install TMUX utils | |
if use tmux; then | |
dobin bin/${PN}-tmux | |
doman man/man1/${PN}-tmux.1 | |
fi | |
# Install bash completion files | |
if use bash-completion; then | |
newbashcomp shell/completion.bash ${PN} | |
insinto /etc/profile.d/ | |
newins shell/key-bindings.bash ${PN}.sh | |
fi | |
# Install zsh completion files | |
if use zsh-completion; then | |
insinto /usr/share/zsh/site-functions | |
newins shell/completion.zsh _${PN} | |
insinto /usr/share/zsh/site-contrib/ | |
newins shell/key-bindings.zsh ${PN}.zsh | |
fi | |
# Install fish completion files | |
if use fish-completion; then | |
insinto /usr/share/fish/functions/ | |
newins shell/key-bindings.fish fzf_key_bindings.fish | |
fi | |
# Install VIM plugin | |
if use vim; then | |
insinto /usr/share/vim/vimfiles/plugin | |
doins plugin/${PN}.vim | |
fi | |
# Install Neovim plugin | |
if use neovim; then | |
insinto /usr/share/nvim/runtime/plugin | |
doins plugin/${PN}.vim | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment