app-misc/lf - 41-r1 (illogician-overlay)

Search

Install

Install this version:

emerge -a =app-misc/lf-41-r1

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =app-misc/lf-41-r1

Or alternatively:

emerge --autounmask-write -a =app-misc/lf-41-r1

Package Information

Description:
Terminal file manager
Homepage:
https://github.com/gokcehan/lf
License:
MIT

Ebuild Details

Version EAPI Keywords Slot
41-r1 8 ~amd64 ~arm ~arm64 ~x86 0
View Raw Ebuild
# 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/refs/tags/r${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://codeberg.org/illogician/illogician-overlay/raw/branch/main/app-misc/lf/${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"'
	}

	ego build -ldflags="${ldflags}"
}

src_install() {
	local DOCS=( README.md etc/lfrc.example etc/ruler.default )

	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"
}

USE Flags

Manage flags for this package: euse -i <flag> -p app-misc/lf | euse -E <flag> -p app-misc/lf | euse -D <flag> -p app-misc/lf

Global/Standard Flags

static
Default: Enabled (+)

Inherited Eclasses

xdg