diff --git a/sys-power/fan2go-tui/Manifest b/sys-power/fan2go-tui/Manifest new file mode 100644 index 0000000000..2b072bae33 --- /dev/null +++ b/sys-power/fan2go-tui/Manifest @@ -0,0 +1,2 @@ +DIST fan2go-tui-0.2.1-vendor.tar.xz 3363352 BLAKE2B 02941eebcfa20a11d2b04bf14bf96843dfdf3773689b51e23283237a400a62bc11c2e5181b0e3df4964ecb992b06b09563ec4161355a4043647b23d46d6f3a35 SHA512 e2568cbf6a083d16193e541d4da86b6c5ccd76e6d731119f1b0f52256015a3abd38145bde13839e968ac284cba51be9af8c532d305ae8e02e60df0999cf394d8 +DIST fan2go-tui-0.2.1.tar.gz 49286 BLAKE2B 6254a803bc14e6eff0f19b64a8445e42f92b2158a5facb4194bf0ec12484a6a1369be3f2d235caf593c759dc432a761e7b3de196cb0fd353217fae77ec621fe8 SHA512 f45bc6c6e3266456027a56b69929b8634d3a2cd6a77e84e41ab56a2d2f183b9602ff1c0c3b35a334c655e4ff59258e89e19425b953538f62fc04f18178083932 diff --git a/sys-power/fan2go-tui/fan2go-tui-0.2.1.ebuild b/sys-power/fan2go-tui/fan2go-tui-0.2.1.ebuild new file mode 100644 index 0000000000..719bbb79df --- /dev/null +++ b/sys-power/fan2go-tui/fan2go-tui-0.2.1.ebuild @@ -0,0 +1,54 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit go-module shell-completion + +DESCRIPTION="A simple daemon providing dynamic fan speed control" +HOMEPAGE="https://github.com/markusressel/fan2go-tui" +SRC_URI="https://github.com/markusressel/fan2go-tui/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" https://github.com/dsafxP/gentoo-distfiles/releases/download/${P}/${P}-vendor.tar.xz" + +LICENSE="AGPL-3" +# Dependent licenses +LICENSE+=" Apache-2.0 BSD-2 BSD MIT MPL-2.0" +SLOT="0" + +KEYWORDS="~amd64" + +RDEPEND="sys-power/fan2go" + +src_compile() { + local src_date_epoch=$(date +%s || die) + local date=$(date -u -d @${src_date_epoch} +"%Y-%m-%dT%H:%M:%SZ" || die) + local package=${HOMEPAGE#*://} + + ego build ${GOFLAGS} -v -x \ + -ldflags "-extldflags=-Wl,-z,lazy \ + -X ${PN}/cmd/global.Version=${PN} \ + -X ${package}/cmd/global.Version=${PN} \ + -X ${PN}/cmd/global.Date=${date} \ + -X ${package}/cmd/global.Date=${date}" \ + -tags netgo -o ${PN} main.go + + ./${PN} completion fish > ${PN}.fish || die + ./${PN} completion bash > ${PN}.bash || die + ./${PN} completion zsh > ${PN}.zsh || die +} + +src_install() { + dobin ${PN} + einstalldocs + + insinto /etc/${PN} + doins ${PN}.yaml + + newbashcomp "${PN}.bash" "${PN}" + dofishcomp "${PN}.fish" + newzshcomp "${PN}.zsh" "_${PN}" +} + +pkg_postinst() { + elog "You will need to enable fan2go API in its configuration" +} diff --git a/sys-power/fan2go-tui/metadata.xml b/sys-power/fan2go-tui/metadata.xml new file mode 100644 index 0000000000..69cfe5f673 --- /dev/null +++ b/sys-power/fan2go-tui/metadata.xml @@ -0,0 +1,11 @@ + + + + + ghostyn678+git@gmail.com + dsaf + + + markusressel/fan2go-tui + +