app-misc/lf: add 38

logic changes:
- use an ebuild template

Signed-off-by: ingenarel <ingenarelitems@gmail.com>
Part-of: https://github.com/gentoo/guru/pull/399
Signed-off-by: ingenarel <ingenarelitems@gmail.com>
This commit is contained in:
ingenarel
2025-11-29 04:57:36 +06:00
parent d8e487a2fe
commit b67aef7386
2 changed files with 73 additions and 0 deletions

View File

@@ -4,3 +4,5 @@ DIST lf-36-vendor.tar.xz 1994660 BLAKE2B 90b99edcd0c49acd1d28c7952b4222ecf0859c4
DIST lf-36.tar.gz 175288 BLAKE2B 266c26f64561c2baa531b4efc8ca6945b1e1d3d508c7cafbc011f09df70956a27cd1aaede2b55c5440b952a09e2aa5ab7557c9aee5b4924d0177d1540ab06fa3 SHA512 a5af2ffb2c4489142b47701058d7a962dc7657afbf29fa726b6b956d445ddd6fd4f408e5192647ebf9ed63375cba75befb89381f0cc411273c0974d38585fb6f
DIST lf-37-vendor.tar.xz 1997432 BLAKE2B 9f0294400ae3c787812195762fef11da8ee6621c4e00fa2becbfb5953810e671040b4daa9571312a9f20644f8374995a15e9dca0ab5b15c4497c22fd27520d32 SHA512 12c565a47ddc2eb08536e04428de599c3406236f8e682998097706255d88ce6da39940fd1d4279d84b5dcb82cbe7e38b5d53c938f15cfbe3c752eb92b18cb6c6
DIST lf-37.tar.gz 180281 BLAKE2B 3a714dbd5fa391f57d8e802ac023b77230203ea8cc7922b4f747adcd921ea8aa0289cb5f0625c3a3b6334b08abd220797dabd5239d10979120cfb7d4f9bab99c SHA512 a965f59e7684950005ad4af5ae1d8851cf55d487fa129483816ff050fedfd07306fd32c46876271d45d190a12c6b2c793dcce14963754a6bbff7f93c0011a4c7
DIST lf-38-deps.tar.xz 17984560 BLAKE2B 3600702f2c1fb9cbd1f2d97efd65c87a2429ff2bd1aaae0d20036e44ddec3aab1898df477c5415e1898551532481b94ac8c34fd092c2959f6e3e58b70040f79d SHA512 669f486b20b5a79e7b623178e743451bb255be0fdb02590a276b702c5347ecd740a1fc614e401cacea1f5daa40939fbee5a5d5c81fcdf660b9fa21d5daae164c
DIST lf-38.tar.gz 179583 BLAKE2B e960d7e2196bed001fd6f5b4436c2ebf9f364b00d7d950bb1677e579371e2ed0f69fe283d6193d840bfb5754e5723e97aa893dcac8484d89d88cb28b79c8849d SHA512 b9949b64fb658524a8cc71a4442fe89099ec3772aecb35154f2312ed078ad73c1f3a6da1cce6d99806700f46142450618b0fe8842039ae36d78642481de6b078

71
app-misc/lf/lf-38.ebuild Normal file
View File

@@ -0,0 +1,71 @@
# 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"
if [[ "${PV}" == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/gokcehan/lf.git"
src_unpack() {
git-r3_src_unpack
go-module_live_vendor
}
else
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
SRC_URI="https://github.com/gokcehan/${PN}/archive/refs/tags/r${PV}.tar.gz -> ${P}.tar.gz"
# possible depfiles link if used
SRC_URI+=" https://github.com/ingenarel/guru-depfiles/releases/download/${P}-deps.tar.xz/${P}-deps.tar.xz"
S="${WORKDIR}/${PN}-r${PV}"
fi
LICENSE="MIT"
# echo "# dependency licenses:"; printf 'LICENSES+=" '
# go-licenses report ./... 2>/dev/null | awk -F ',' '{ print $NF }' | sort --unique | tr '\n' ' '; echo '"'
# dependency licenses:
LICENSES+=" Apache-2.0 BSD-3-Clause MIT "
SLOT="0"
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}"
# fish-completion
dofishcomp "etc/${PN}.fish"
dofishcomp "etc/${PN}cd.fish"
domenu "${PN}.desktop"
}