]> Freerunner's - freerunner_g.git/commitdiff
add app-misc/lf
authorAndre Ramnitz <andre.ramnitz@mail.de>
Thu, 4 Jun 2026 01:08:16 +0000 (03:08 +0200)
committerAndre Ramnitz <andre.ramnitz@mail.de>
Thu, 4 Jun 2026 01:08:16 +0000 (03:08 +0200)
app-misc/lf/Manifest [new file with mode: 0644]
app-misc/lf/lf-41.ebuild [new file with mode: 0644]
app-misc/lf/metadata.xml [new file with mode: 0644]

diff --git a/app-misc/lf/Manifest b/app-misc/lf/Manifest
new file mode 100644 (file)
index 0000000..5f84a43
--- /dev/null
@@ -0,0 +1,4 @@
+DIST lf-36-vendor.tar.xz 1973216 BLAKE2B 401278a91014deb59d16e1955496e06efadac4966bfa905a101aacadaac8349260b4e560aa3c74d121a70ec1485e54e34501ea933049a71d1c5353aafcd2f9bf SHA512 201713041eceb46fbe2ab72b2ffc3ecfc7ffd75b26a65b7cb2292fcbafddd576ff59141bf4b6c3f9d8e10bfb29634a4774c1189c0546f21ae4378a562a5ec1f6
+DIST lf-36.tar.gz 175288 BLAKE2B 266c26f64561c2baa531b4efc8ca6945b1e1d3d508c7cafbc011f09df70956a27cd1aaede2b55c5440b952a09e2aa5ab7557c9aee5b4924d0177d1540ab06fa3 SHA512 a5af2ffb2c4489142b47701058d7a962dc7657afbf29fa726b6b956d445ddd6fd4f408e5192647ebf9ed63375cba75befb89381f0cc411273c0974d38585fb6f
+DIST lf-41.tar.gz 197515 BLAKE2B 93afe54572d82f537f03a7bbe8b7da6f1845b58a805d5259a8cb1918a3939af3f88cb408b01d703b1c314db8ae64456c88d0543b5d69feb44a720adc50f40661 SHA512 4a04991165daf408d883fc38bb7ac4f8405bb9f62b0c983c19a95708e9384fd82f621a0be2792bf2e819047e1f6a542624cf47d650a765f872a0b5b7cc80c8c4
+DIST lf-r41-vendor.tar.xz 1111848 BLAKE2B ac116f93ff708a5b6c7c1669c6f6135fddc6e326d4e1e2785a6d46ed9fe8cb3bf173156fe83feb016d73e635310b5e30d3435dd3a9c8c1a1b0acf165b914fa5f SHA512 7f0e866af60387e8d3817923533809679c4a8022bf63af48838fb1e6167b91aa9e0b01f27cc44d72d5107e6d92212b29622e4de34fb619f0b6eea3814392d08b
diff --git a/app-misc/lf/lf-41.ebuild b/app-misc/lf/lf-41.ebuild
new file mode 100644 (file)
index 0000000..15ae76d
--- /dev/null
@@ -0,0 +1,73 @@
+# 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"
+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"
+        SRC_URI+=" https://www.ramnitz.eu/dist/${PN}-r${PV}-vendor.tar.xz"
+       S="${WORKDIR}/${PN}-r${PV}"
+fi
+
+LICENSE="MIT"
+# dependency licenses:
+LICENSE+=" Apache-2.0 BSD MIT "
+SLOT="0"
+IUSE="+static"
+
+src_unpack() {
+       if [[ "${PV}" == 9999 ]];then
+               git-r3_src_unpack
+               go-module_live_vendor
+       else
+               default
+       fi
+}
+
+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"
+}
diff --git a/app-misc/lf/metadata.xml b/app-misc/lf/metadata.xml
new file mode 100644 (file)
index 0000000..28b2ee6
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="person">
+               <email>andre.ramnitz@mail.de</email>
+               <name>Andre Ramnitz</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">gokcehan/lf</remote-id>
+       </upstream>
+</pkgmetadata>