From ef3cf416e2b60bfcab5a97945c778e543a105544 Mon Sep 17 00:00:00 2001 From: Sam James Date: Mon, 29 Aug 2022 21:03:58 +0100 Subject: app-shells/fzf: fix MY_GIT_REV Signed-off-by: Sam James --- app-shells/fzf/fzf-0.33.0-r1.ebuild | 72 +++++++++++++++++++++++++++++++++++++ app-shells/fzf/fzf-0.33.0.ebuild | 72 ------------------------------------- 2 files changed, 72 insertions(+), 72 deletions(-) create mode 100644 app-shells/fzf/fzf-0.33.0-r1.ebuild delete mode 100644 app-shells/fzf/fzf-0.33.0.ebuild (limited to 'app-shells') diff --git a/app-shells/fzf/fzf-0.33.0-r1.ebuild b/app-shells/fzf/fzf-0.33.0-r1.ebuild new file mode 100644 index 000000000000..c9d9f1200796 --- /dev/null +++ b/app-shells/fzf/fzf-0.33.0-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 2019-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 go-module + +DESCRIPTION="General-purpose command-line fuzzy finder, written in Golang" +HOMEPAGE="https://github.com/junegunn/fzf" + +# For fancy versioning only. Bump on the next release! +# MY_GIT_REV is the first 7 characters of release commit, we truncate it +# after to make it easier to copy/paste. +MY_GIT_REV=e03ac3136e17a525bc67d62728ccb3eb8179f183 +MY_GIT_REV=${MY_GIT_REV:0:7} + +SRC_URI="https://github.com/junegunn/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-deps.tar.xz" + +LICENSE="MIT BSD-with-disclosure" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" + +src_prepare() { + default + sed -i 's/-s -w //' Makefile || die # bug 795225 +} + +src_compile() { + emake PREFIX="${EPREFIX}"/usr VERSION=${PV} REVISION=${MY_GIT_REV} bin/${PN} +} + +src_install() { + dobin bin/${PN} + doman man/man1/${PN}.1 + + dobin bin/${PN}-tmux + doman man/man1/${PN}-tmux.1 + + insinto /usr/share/vim/vimfiles/plugin + doins plugin/${PN}.vim + + insinto /usr/share/nvim/runtime/plugin + doins plugin/${PN}.vim + + newbashcomp shell/completion.bash ${PN} + + insinto /usr/share/zsh/site-functions + newins shell/completion.zsh _${PN} + + insinto /usr/share/fzf + doins shell/key-bindings.bash + doins shell/key-bindings.fish + doins shell/key-bindings.zsh +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]]; then + elog "To add fzf support to your shell, make sure to use the right file" + elog "from ${EROOT}/usr/share/fzf." + elog + elog "For bash, add the following line to ~/.bashrc:" + elog + elog " # source ${EROOT}/usr/share/bash-completion/completions/fzf" + elog " # source ${EROOT}/usr/share/fzf/key-bindings.bash" + elog + elog "Plugins for Vim and Neovim are installed to respective directories" + elog "and will work out of the box." + elog + elog "For fzf support in tmux see fzf-tmux(1)." + fi +} diff --git a/app-shells/fzf/fzf-0.33.0.ebuild b/app-shells/fzf/fzf-0.33.0.ebuild deleted file mode 100644 index 12b7161dcb56..000000000000 --- a/app-shells/fzf/fzf-0.33.0.ebuild +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 2019-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit bash-completion-r1 go-module - -DESCRIPTION="General-purpose command-line fuzzy finder, written in Golang" -HOMEPAGE="https://github.com/junegunn/fzf" - -# For fancy versioning only. Bump on the next release! -# MY_GIT_REV is the first 7 characters of release commit, we truncate it -# after to make it easier to copy/paste. -MY_GIT_REV=4993d19466d5f3ac127de5c0c461cde7ef1894d7 -MY_GIT_REV=${MY_GIT_REV:0:7} - -SRC_URI="https://github.com/junegunn/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" -SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-deps.tar.xz" - -LICENSE="MIT BSD-with-disclosure" -SLOT="0" -KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" - -src_prepare() { - default - sed -i 's/-s -w //' Makefile || die # bug 795225 -} - -src_compile() { - emake PREFIX="${EPREFIX}"/usr VERSION=${PV} REVISION=${MY_GIT_REV} bin/${PN} -} - -src_install() { - dobin bin/${PN} - doman man/man1/${PN}.1 - - dobin bin/${PN}-tmux - doman man/man1/${PN}-tmux.1 - - insinto /usr/share/vim/vimfiles/plugin - doins plugin/${PN}.vim - - insinto /usr/share/nvim/runtime/plugin - doins plugin/${PN}.vim - - newbashcomp shell/completion.bash ${PN} - - insinto /usr/share/zsh/site-functions - newins shell/completion.zsh _${PN} - - insinto /usr/share/fzf - doins shell/key-bindings.bash - doins shell/key-bindings.fish - doins shell/key-bindings.zsh -} - -pkg_postinst() { - if [[ -z ${REPLACING_VERSIONS} ]]; then - elog "To add fzf support to your shell, make sure to use the right file" - elog "from ${EROOT}/usr/share/fzf." - elog - elog "For bash, add the following line to ~/.bashrc:" - elog - elog " # source ${EROOT}/usr/share/bash-completion/completions/fzf" - elog " # source ${EROOT}/usr/share/fzf/key-bindings.bash" - elog - elog "Plugins for Vim and Neovim are installed to respective directories" - elog "and will work out of the box." - elog - elog "For fzf support in tmux see fzf-tmux(1)." - fi -} -- cgit v1.2.3-65-gdbad