summaryrefslogtreecommitdiff
path: root/app-misc/lf/lf-9999.ebuild
blob: b5533ddd7be6fc0f103136c55a0444c8039d36d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit go-module

DESCRIPTION="Terminal file manager"
HOMEPAGE="https://github.com/gokcehan/${PN}"
if [[ "${PV}" = 9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="${HOMEPAGE}.git"
	src_unpack() {
		git-r3_src_unpack
		go-module_live_vendor
	}

	src_compile () {
		gen/build.sh || die
	}
else
	EGO_SUM=(
		"github.com/gdamore/encoding v1.0.0"
		"github.com/gdamore/encoding v1.0.0/go.mod"
		"github.com/gdamore/tcell/v2 v2.3.1"
		"github.com/gdamore/tcell/v2 v2.3.1/go.mod"
		"github.com/lucasb-eyer/go-colorful v1.0.3"
		"github.com/lucasb-eyer/go-colorful v1.0.3/go.mod"
		"github.com/mattn/go-runewidth v0.0.10"
		"github.com/mattn/go-runewidth v0.0.10/go.mod"
		"github.com/rivo/uniseg v0.1.0"
		"github.com/rivo/uniseg v0.1.0/go.mod"
		"golang.org/x/sys v0.0.0-20201119102817-f84b799fce68"
		"golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod"
		"golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod"
		"golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d"
		"golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod"
		"golang.org/x/text v0.3.0"
		"golang.org/x/text v0.3.0/go.mod"
		"gopkg.in/djherbis/times.v1 v1.2.0"
		"gopkg.in/djherbis/times.v1 v1.2.0/go.mod"
	)

	go-module_set_globals

	SRC_URI="${HOMEPAGE}/archive/r${PV}.tar.gz -> ${P}.tar.gz
		${EGO_SUM_SRC_URI}"
	KEYWORDS="amd64 x86"
	S="${WORKDIR}/${PN}-r${PV}"

	src_compile () {
		version="r${PV}" gen/build.sh || die
	}
fi

LICENSE="MIT"
SLOT="0"

src_install() {
	dobin "${PN}"
	doman "${PN}.1"
	dodoc README.md
	docinto examples
	dodoc etc/{lf.{csh,vim},lfcd.{,c}sh,lfrc.example}

	insinto /usr/share/bash-completion/completions
	newins etc/lf.bash lf
	insinto /usr/share/zsh/site-functions
	newins etc/lf.zsh _lf
	insinto /usr/share/fish/vendor_completions.d
	doins etc/lf.fish
	insinto /usr/share/fish/vendor_functions.d
	doins etc/lfcd.fish
}