blob: 48d805019f90adf9b73774c67291f67a8e9fdb0b (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# Maintainer: desbma
# shellcheck disable=SC2034,SC2148,SC2154,SC2164
pkgname=hddfancontrol
pkgver=2.0.0.f
_pkgver=2.0.0
pkgrel=1
pkgdesc='Regulate fan speed according to hard drive temperature'
arch=('x86_64')
url="https://github.com/desbma/${pkgname}"
license=('GPL-3.0-only')
depends=('gcc-libs' 'hddtemp' 'hdparm' 'smartmontools')
makedepends=('cargo')
backup=('etc/conf.d/hddfancontrol')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/desbma/${pkgname}/archive/${_pkgver}.tar.gz")
sha512sums=('eadff3c7080a3f90c873f70385e7c752a85ffa5e2de81602d30dcdf0328e724fe49eb6797e329a1640376b8c3a8b2c3a03876295324cf57332c4cfd6156bf52b')
prepare() {
cd "${pkgname}-${_pkgver}"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked
}
build() {
cd "${pkgname}-${_pkgver}"
export RUSTUP_TOOLCHAIN=stable
mkdir -p target/man
cargo run --frozen --features gen-man-pages -- ./target/man/
cargo build --frozen --release
}
check() {
cd "${pkgname}-${_pkgver}"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen
}
package() {
cd "${pkgname}-${_pkgver}"
install -Dm 755 -t "${pkgdir}/usr/bin" ./target/release/${pkgname}
install -Dm 644 systemd/hddfancontrol.service "${pkgdir}/usr/lib/systemd/system/hddfancontrol.service"
install -Dm 644 systemd/hddfancontrol.conf "${pkgdir}/etc/conf.d/hddfancontrol"
install -Dm 644 -t "${pkgdir}/usr/share/man/man1" ./target/man/*
}
|