| 3 |
3 |
|
| 4 |
4 |
EAPI=8
|
| 5 |
5 |
|
|
6 |
if [[ ${PV} == 9999 ]]; then
|
|
7 |
inherit git-r3
|
|
8 |
EGIT_REPO_URI="https://github.com/kovidgoyal/kitty.git"
|
|
9 |
else
|
|
10 |
SRC_URI="https://github.com/kovidgoyal/kitty/releases/download/v${PV}/kitty-${PV}.tar.xz"
|
|
11 |
S=${WORKDIR}/kitty-${PV}
|
|
12 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
|
13 |
fi
|
|
14 |
|
| 6 |
15 |
DESCRIPTION="Shell integration scripts for kitty, a GPU-based terminal emulator"
|
| 7 |
16 |
HOMEPAGE="https://sw.kovidgoyal.net/kitty/"
|
| 8 |
|
SRC_URI="https://github.com/kovidgoyal/kitty/releases/download/v${PV}/kitty-${PV}.tar.xz"
|
| 9 |
|
S="${WORKDIR}/kitty-${PV}"
|
| 10 |
17 |
|
| 11 |
18 |
LICENSE="GPL-3"
|
| 12 |
19 |
SLOT="0"
|
| 13 |
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
|
| 14 |
20 |
RESTRICT="test" # intended to be ran on the full kitty package
|
| 15 |
21 |
|
| 16 |
22 |
src_compile() { :; }
|
| 17 |
23 |
|
| 18 |
24 |
src_install() {
|
| 19 |
|
# install the whole directory in the upstream suggested location
|
| 20 |
|
# for consistency (i.e. less variation between distros if someone
|
| 21 |
|
# ssh into Gentoo), then set symlinks to autoload where possible
|
| 22 |
|
# (these exit immediately if KITTY_SHELL_INTEGRATION is unset)
|
| 23 |
|
insinto /usr/share/kitty
|
| 24 |
|
doins -r shell-integration
|
| 25 |
|
|
| 26 |
|
dosym -r {/usr/share/kitty/shell-integration/bash/,/etc/bash/bashrc.d/90-}kitty.bash
|
| 27 |
|
|
| 28 |
|
dosym -r /usr/share/{kitty/shell-integration/fish,fish}/vendor_completions.d/kitty.fish
|
| 29 |
|
dosym -r /usr/share/{kitty/shell-integration/fish,fish}/vendor_conf.d/kitty-shell-integration.fish
|
| 30 |
|
|
| 31 |
|
dosym -r /usr/share/{kitty/shell-integration/zsh/completions,zsh/site-functions}/_kitty
|
| 32 |
|
# zsh integration is handled automatically without needing to modify rc files,
|
| 33 |
|
# but may require user intervention depending on zsh invocation or if remote
|
| 34 |
|
|
| 35 |
|
# this is used internally by the ssh kitten and is not useful there
|
| 36 |
|
rm -r "${ED}"/usr/share/kitty/shell-integration/ssh || die
|
|
25 |
# split from the kitty package to allow installing individually on
|
|
26 |
# remote machines and have shell integration scripts be auto-loaded
|
|
27 |
insinto /etc/bash/bashrc.d
|
|
28 |
newins shell-integration/bash/kitty.bash 90-kitty.bash
|
|
29 |
|
|
30 |
insinto /usr/share/fish
|
|
31 |
doins -r shell-integration/fish/vendor_conf.d
|
|
32 |
|
|
33 |
# unfortunately zsh currently lacks a bashrc.d equivalent, copy
|
|
34 |
# to docdir for now so users can use it manually if needed (also at
|
|
35 |
# /usr/lib*/kitty/shell-integration/zsh if kitty is installed)
|
|
36 |
docinto zsh
|
|
37 |
docompress -x /usr/share/doc/${PF}/zsh
|
|
38 |
dodoc shell-integration/zsh/{.zshenv,kitty-integration,kitty.zsh}
|
| 37 |
39 |
}
|