sys-power/fan2go-tui - 0.2.1 (guru)

Search

Install

Install this version:

emerge -a =sys-power/fan2go-tui-0.2.1

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

autounmask =sys-power/fan2go-tui-0.2.1

Or alternatively:

emerge --autounmask-write -a =sys-power/fan2go-tui-0.2.1

Package Information

Description:
A simple daemon providing dynamic fan speed control
Homepage:
https://github.com/markusressel/fan2go-tui
License:
AGPL-3 Apache-2.0 BSD-2 BSD MIT MPL-2.0

Ebuild Details

Version EAPI Keywords Slot
0.2.1 8 ~amd64 0
View Raw Ebuild
# 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"
}

Inherited Eclasses

Dependencies

RDEPEND

sys-power/fan2go

Manifest for 0.2.1

Type File Size Source URLs
DIST fan2go-tui-0.2.1-vendor.tar.xz 3363352 bytes https://github.com/dsafxP/gentoo-distfiles/releases/download/fan2go-tui-0.2.1/fan2go-tui-0.2.1-vendor.tar.xz
DIST fan2go-tui-0.2.1.tar.gz 49286 bytes https://github.com/markusressel/fan2go-tui/archive/refs/tags/0.2.1.tar.gz