diff options
| author | mac <ra@afu.re> | 2025-11-29 10:26:16 -0500 |
|---|---|---|
| committer | mac <ra@afu.re> | 2025-11-29 10:26:16 -0500 |
| commit | 179a390cf3719abbb9cf9ee4bde267a721351425 (patch) | |
| tree | a51627daec871a8c156afca1e0b39aa757e08258 /app-misc/lf/lf-38.ebuild | |
| parent | 2e3f9a023d2658d513e962a8cb43a2946dfb3daf (diff) | |
Diffstat (limited to 'app-misc/lf/lf-38.ebuild')
| -rw-r--r-- | app-misc/lf/lf-38.ebuild | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/app-misc/lf/lf-38.ebuild b/app-misc/lf/lf-38.ebuild new file mode 100644 index 0000000..ebd9a73 --- /dev/null +++ b/app-misc/lf/lf-38.ebuild @@ -0,0 +1,52 @@ + +# Copyright 1999-2025 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="-w -X main.gVersion=r${PV}" + use static && { + export CGO_ENABLED=0 + ldflags+=' -extldflags "-static"' + } + + ego build -ldflags="${ldflags}" +} + +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}" + bashcomp_alias lf lfcd + + # zsh-completion + newzshcomp "etc/${PN}.zsh" "_${PN}" + + domenu "${PN}.desktop" +} |
