app-misc/lf: add 27

Signed-off-by: Dex Conner <cantcuckthis@danwin1210.de>
This commit is contained in:
Dex Conner
2022-04-07 21:27:49 +03:00
parent eac77dc802
commit 1463f0fcca
2 changed files with 90 additions and 0 deletions

85
app-misc/lf/lf-27.ebuild Normal file
View File

@@ -0,0 +1,85 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit go-module bash-completion-r1
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/go.mod"
"golang.org/x/sys v0.0.0-20220209214540-3681064d5158"
"golang.org/x/sys v0.0.0-20220209214540-3681064d5158/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="https://github.com/gokcehan/lf/archive/r${PV}.tar.gz -> ${P}.tar.gz
${EGO_SUM_SRC_URI}"
DESCRIPTION="Terminal file manager"
HOMEPAGE="https://github.com/gokcehan/lf"
IUSE="+static X"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
LICENSE="MIT"
SLOT="0"
S="${WORKDIR}/${PN}-r${PV}"
src_compile() {
local ldflags="-s -w -X main.gVersion=r${PV}"
use static && {
export CGO_ENABLED=0
ldflags+=' -extldflags "-static"'
}
go build -ldflags="${ldflags}" || die 'go build failed'
}
src_install() {
local DOCS=( README.md etc/lfrc.example )
dobin "${PN}"
einstalldocs
doman "${PN}.1"
# bash & zsh
insinto "/usr/share/${PN}"
doins "etc/${PN}cd.sh"
# bash-completion
newbashcomp "etc/${PN}.bash" "${PN}"
# zsh-completion
insinto /usr/share/zsh/site-functions
newins "etc/${PN}.zsh" "_${PN}"
# fish-completion
insinto /usr/share/fish/vendor_completions.d
doins "etc/${PN}.fish"
insinto /usr/share/fish/vendor_functions.d
doins "etc/${PN}cd.fish"
use X && {
insinto /usr/share/applications
doins "${PN}.desktop"
}
}