mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-22 21:43:03 -04:00
app-misc/lf: add 33
Signed-off-by: Efe İzbudak <efe.izbudak@metu.edu.tr>
This commit is contained in:
54
app-misc/lf/lf-33.ebuild
Normal file
54
app-misc/lf/lf-33.ebuild
Normal file
@@ -0,0 +1,54 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit go-module shell-completion desktop xdg
|
||||
|
||||
DESCRIPTION="Terminal file manager"
|
||||
HOMEPAGE="https://github.com/gokcehan/lf"
|
||||
SRC_URI="https://github.com/gokcehan/lf/archive/r${PV}.tar.gz -> ${P}.tar.gz"
|
||||
SRC_URI+=" https://github.com/ephemer4l/gentoo-lf/raw/main/${P}-vendor.tar.xz"
|
||||
S="${WORKDIR}/${PN}-r${PV}"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
|
||||
|
||||
IUSE="+static"
|
||||
|
||||
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 cd script
|
||||
insinto "/usr/share/${PN}"
|
||||
doins "etc/${PN}cd.sh"
|
||||
|
||||
# bash-completion
|
||||
newbashcomp "etc/${PN}.bash" "${PN}"
|
||||
|
||||
# zsh-completion
|
||||
newzshcomp "etc/${PN}.zsh" "_${PN}"
|
||||
|
||||
# fish-completion
|
||||
dofishcomp "etc/${PN}.fish"
|
||||
dofishcomp "etc/${PN}cd.fish"
|
||||
|
||||
domenu "${PN}.desktop"
|
||||
}
|
||||
Reference in New Issue
Block a user