summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 496fe149e98425a238eccd4d0b98940a1c77e712 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Maintainer: ThatOneCalculator (Kainoa Kanter) <kainoakanter@gmail.com>
_pkgname="asus-5606-fan-state"
pkgname="${_pkgname}-git"
pkgver=r6.ccf90a6
pkgrel=1
pkgdesc="Script to set the fan state on the ZenBook S 16 UM5606 and Vivobook M5606"
arch=('any')
url="https://github.com/ThatOneCalculator/${_pkgname}"
license=('MIT')
depends=('sudo' 'bash')
source=("git+$url.git")
noextract=()
sha256sums=('SKIP')

pkgver() {
    cd "$srcdir/$_pkgname"
    ( set -o pipefail
        git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    )
}

prepare() {
    printf "%b" "\n\n-----------------------\nInstalled as \e[1;34mfan_state\e[0m\n-----------------------\n\n"
}

package() {
    install -Dm755 "$srcdir"/"$_pkgname"/fan_state "$pkgdir/usr/bin/fan_state"
    install -Dm644 "$srcdir"/"$_pkgname"/README.md "$pkgdir/usr/share/doc/fan_state"
}