From b2d099552749ffcc930fa1a298721b682dc9b8aa Mon Sep 17 00:00:00 2001 From: Michael Kuc Date: Wed, 10 Apr 2019 13:21:16 +0100 Subject: [PATCH] Added nfancurve. --- nfancurve/PKGBUILD | 36 ++++++++++++++++++++++++++++++++++++ nfancurve/nfancurve.desktop | 5 +++++ nfancurve/nfancurve.install | 19 +++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 nfancurve/PKGBUILD create mode 100644 nfancurve/nfancurve.desktop create mode 100644 nfancurve/nfancurve.install diff --git a/nfancurve/PKGBUILD b/nfancurve/PKGBUILD new file mode 100644 index 0000000..112130d --- /dev/null +++ b/nfancurve/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Sefa Eyeoglu + +_pkgname=nfancurve +pkgname=${_pkgname}-git +pkgver=v017.r17.gb36e1c2 +pkgrel=1 +pkgdesc="A small and lightweight Bash script for using a custom fan curve in Linux for NVIDIA GPUs" +arch=("any") +url="https://github.com/nan0s7/nfancurve" +license=("GPL3") +depends=("bash" "nvidia" "procps") +makedepends=("git") +conflicts=("${_pkgname}") +install=${_pkgname}.install +source=( + "${_pkgname}::git+https://github.com/nan0s7/${_pkgname}.git" + "nfancurve.desktop" +) +sha512sums=( + "SKIP" + "eacb0f97ee0f1b25074060fca34637258dc239a776e7e738eaa5b0c46f365f2c08cbe41cb527708e22360b19a8e0c4cc3141bd53964531b8ce344890195ef5f4" +) + +pkgver() { + cd "${_pkgname}" + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +package() { + cd "${_pkgname}" + + install -m755 -D "temp.sh" "${pkgdir}/usr/bin/nfancurve" + install -m644 -D "config" "${pkgdir}/usr/share/doc/${_pkgname}/config.example" + install -m644 -D "config" "${pkgdir}/etc/${_pkgname}/config" + install -m644 -D "../nfancurve.desktop" "${pkgdir}/usr/share/applications/nfancurve.desktop" +} diff --git a/nfancurve/nfancurve.desktop b/nfancurve/nfancurve.desktop new file mode 100644 index 0000000..d9be627 --- /dev/null +++ b/nfancurve/nfancurve.desktop @@ -0,0 +1,5 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Name=nan0s7's fan curve script +Type=Application +Exec=/usr/bin/nfancurve -c /etc/nfancurve/config diff --git a/nfancurve/nfancurve.install b/nfancurve/nfancurve.install new file mode 100644 index 0000000..169041c --- /dev/null +++ b/nfancurve/nfancurve.install @@ -0,0 +1,19 @@ +# Colored makepkg-like functions +note() { + printf "${blue}==>${yellow} NOTE:${bold} $1${all_off}\n" +} + +all_off="$(tput sgr0)" +bold="${all_off}$(tput bold)" +blue="${bold}$(tput setaf 4)" +yellow="${bold}$(tput setaf 3)" + +post_install() { + note "You can edit the config file to use nfancurve, at /etc/nfancurve/config." + note "The example config can also be found at /usr/share/doc/nfancurve/config.sh.example" + note "You can also copy the desktop file from /usr/share/applications/nfancurve.desktop to your local autostart folder (most likely \"\$HOME/.config/autostart/\")" +} + +post_upgrade() { + post_install +}