mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-10-12 17:51:11 -04:00
sys-power/fan2go: add 0.13.0-r1, 0.14.0
Signed-off-by: dsaf <ghostyn678+git@gmail.com>
This commit is contained in:
4 files changed
+151
No files matched your search
@@ -1,2 +1,4 @@
|
||||
DIST fan2go-0.13.0-vendor.tar.xz 2502196 BLAKE2B 27296a117d6f9f4c683f0ae369b1db94f216d890d473ea68e50b7f1ea766c8ff91de53610a0393f9aee0ef95da283fc8c8ce6cec2f18aca3c289b94806ac8624 SHA512 50f0da6b564c86221f27a5ebb466753105caab4cc6a6037290f28286dbd79eaab724aae52120075e2311844a9f1f7b7ab0054a3c1dd7f745cf28ad653b6cf5e8
|
||||
DIST fan2go-0.13.0.tar.gz 240777 BLAKE2B e181d6585ac712a909eecf677df5786b995c9addb84717048708189e913fe7d7329ca9c741aab32cbeec18310fa76dfe1705370898b10ad75f55a2e44098fa39 SHA512 650b486ad72e7ea5e16f97d3881bdbd3e96d0d4adec156ce13e4f5088bdff288785b7d4aa8015397aed7f81c069231448057a2509ff085d24d049f6fdf1e9b52
|
||||
DIST fan2go-0.14.0-vendor.tar.xz 2328624 BLAKE2B 559dcc0366a897ba4e8b9b50d58882137b73fa399eda4fe1170844d87cf448036324ae524d82b8ab033719ff9b70bb845a4e2080007c55b102a03faf577fffa6 SHA512 7ef97285deea41d96dbe748888af2425fa5ed288f0c59628571bf4f43312888924bc44feb9207be8168dba53f378a55001cc081fbf01a8b860371d06f091ebdc
|
||||
DIST fan2go-0.14.0.tar.gz 252801 BLAKE2B 91887fd650b848280408673f7bbf8fc04b3007d8f7a0077e13f1237837f11c913adfa081aae12d7345397d463d02ea9600fba2fc7d0f15e43e917d8e482f7a40 SHA512 c65fe8e423625bd20f350c65bc1d55dc95d204b2ed60d270d7a851337fe3fb79948a4e9aa98765b9213daaf04f7f4e783e1e281df59123eb79b99aacf4b72636
|
||||
@@ -0,0 +1,73 @@
|
||||
# Copyright 2022-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit go-module shell-completion systemd
|
||||
|
||||
# git rev-parse --short HEAD
|
||||
MY_GIT_COMMIT="325ee9d"
|
||||
|
||||
DESCRIPTION="A simple daemon providing dynamic fan speed control"
|
||||
HOMEPAGE="https://github.com/markusressel/fan2go"
|
||||
SRC_URI="
|
||||
https://github.com/markusressel/fan2go/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
|
||||
https://github.com/dsafxP/gentoo-distfiles/releases/download/${P}a/${P}-vendor.tar.xz
|
||||
"
|
||||
|
||||
LICENSE="AGPL-3"
|
||||
# Dependent licenses
|
||||
LICENSE+=" Apache-2.0 BSD ISC MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
IUSE="nvml"
|
||||
|
||||
BDEPEND=">=dev-lang/go-1.25.0"
|
||||
DEPEND="sys-apps/lm-sensors"
|
||||
RDEPEND="${DEPEND}
|
||||
nvml? ( x11-drivers/nvidia-drivers )
|
||||
"
|
||||
|
||||
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#*://}
|
||||
|
||||
local mytags="netgo"
|
||||
|
||||
use nvml || mytags+=",disable_nvml"
|
||||
|
||||
local mygoargs=(
|
||||
-v -x
|
||||
-ldflags "-extldflags=-Wl,-z,lazy
|
||||
-X ${PN}/cmd/global.Version=${PV}
|
||||
-X ${package}/cmd/global.Version=${PV}
|
||||
-X ${PN}/cmd/global.Commit=${MY_GIT_COMMIT}
|
||||
-X ${package}/cmd/global.Commit=${MY_GIT_COMMIT}
|
||||
-X ${PN}/cmd/global.Date=${date}
|
||||
-X ${package}/cmd/global.Date=${date}"
|
||||
-tags "${mytags}"
|
||||
-o ${PN}
|
||||
)
|
||||
|
||||
ego build "${mygoargs[@]}" 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
|
||||
|
||||
systemd_dounit fan2go.service
|
||||
|
||||
insinto /etc/fan2go
|
||||
doins fan2go.yaml
|
||||
|
||||
newbashcomp "${PN}.bash" "${PN}"
|
||||
dofishcomp "${PN}.fish"
|
||||
newzshcomp "${PN}.zsh" "_${PN}"
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
# Copyright 2022-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit go-module shell-completion systemd
|
||||
|
||||
# git rev-parse --short HEAD
|
||||
MY_GIT_COMMIT="fe54456"
|
||||
|
||||
DESCRIPTION="A simple daemon providing dynamic fan speed control"
|
||||
HOMEPAGE="https://github.com/markusressel/fan2go"
|
||||
SRC_URI="
|
||||
https://github.com/markusressel/fan2go/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
|
||||
https://github.com/dsafxP/gentoo-distfiles/releases/download/${P}/${P}-vendor.tar.xz
|
||||
"
|
||||
|
||||
LICENSE="AGPL-3"
|
||||
# Dependent licenses
|
||||
LICENSE+=" Apache-2.0 BSD ISC MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
IUSE="nvml"
|
||||
|
||||
BDEPEND=">=dev-lang/go-1.25.0"
|
||||
DEPEND="sys-apps/lm-sensors"
|
||||
RDEPEND="${DEPEND}
|
||||
nvml? ( x11-drivers/nvidia-drivers )
|
||||
"
|
||||
|
||||
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#*://}
|
||||
|
||||
local mytags="netgo"
|
||||
|
||||
use nvml || mytags+=",disable_nvml"
|
||||
|
||||
local mygoargs=(
|
||||
-v -x
|
||||
-ldflags "-extldflags=-Wl,-z,lazy
|
||||
-X ${PN}/cmd/global.Version=${PV}
|
||||
-X ${package}/cmd/global.Version=${PV}
|
||||
-X ${PN}/cmd/global.Commit=${MY_GIT_COMMIT}
|
||||
-X ${package}/cmd/global.Commit=${MY_GIT_COMMIT}
|
||||
-X ${PN}/cmd/global.Date=${date}
|
||||
-X ${package}/cmd/global.Date=${date}"
|
||||
-tags "${mytags}"
|
||||
-o ${PN}
|
||||
)
|
||||
|
||||
ego build "${mygoargs[@]}" 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
|
||||
|
||||
systemd_dounit fan2go.service
|
||||
|
||||
insinto /etc/fan2go
|
||||
doins fan2go.yaml
|
||||
|
||||
newbashcomp "${PN}.bash" "${PN}"
|
||||
dofishcomp "${PN}.fish"
|
||||
newzshcomp "${PN}.zsh" "_${PN}"
|
||||
}
|
||||
@@ -5,6 +5,9 @@
|
||||
<email>ghostyn678+git@gmail.com</email>
|
||||
<name>dsaf</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="nvml">Enable the NVML device discovery</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="github">markusressel/fan2go</remote-id>
|
||||
<bugs-to>https://github.com/markusressel/fan2go/issues</bugs-to>
|
||||
|
||||
Reference in new issue
Block a user