blob: faedb262578548bc8c8b89125f8a29f142757162 (
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# Maintainer: CPT_Dawn <ping@cptdawn.dev>
#
# Builds Arch-Sense from the tagged GitHub release tarball. The release workflow
# (.github/workflows/release.yml) bumps pkgver and the tarball checksum (the FIRST
# sha256sums entry) with .github/scripts/bump-pkgbuild.sh and pushes this file to
# the AUR. The remaining sources are the packaged files next to this PKGBUILD.
# ./check.sh runs the packaging checks; ./check.sh --build also builds (from a
# tarball of the local checkout, since an unreleased version has none).
pkgname=arch-sense
pkgver=2.0.3
pkgrel=1
pkgdesc="Terminal control center for Acer Predator & Nitro laptops on Linux: thermals, fans, battery and keyboard RGB"
arch=('x86_64')
url="https://github.com/CPT-Dawn/Arch-Sense"
license=('MIT')
depends=('linuwu-sense-dkms-git' 'libusb' 'gcc-libs' 'glibc')
makedepends=('cargo')
optdepends=('nvidia-utils: GPU temperature via nvidia-smi when hwmon has no GPU sensor')
install=arch-sense.install
source=(
"$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
'arch-sense.service'
'arch-sense.sysusers'
'arch-sense.tmpfiles'
'71-arch-sense.rules'
)
sha256sums=('18c53d7632e8d7b1336a7b71bc39be23f36c0e90f0cca4f652f46d0dc5f03f8b'
'c14e3915fb71c2909e30217439ca9a2a2b275c787ccc9fefbdc1e4471c4eb1d7'
'fda5d014e6980d2ae73a42366182fb46337022c0588a6e81c7635651673c6d67'
'3bb028afeba660ee71b8510a05ef848d2700597b6083873578488fe9742cf3c1'
'6552f52d9ffdd527f968e008fae47342d95309f868296f8190a43cb939ae7e74')
_tree="Arch-Sense-$pkgver"
prepare() {
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --manifest-path "$srcdir/$_tree/Cargo.toml" --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR="$srcdir/target"
cargo build --frozen --release --manifest-path "$srcdir/$_tree/Cargo.toml"
}
check() {
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR="$srcdir/target"
cargo test --frozen --manifest-path "$srcdir/$_tree/Cargo.toml"
}
package() {
install -Dm755 "$srcdir/target/release/arch-sense" "$pkgdir/usr/bin/arch-sense"
install -Dm644 "$srcdir/arch-sense.service" "$pkgdir/usr/lib/systemd/system/arch-sense.service"
install -Dm644 "$srcdir/arch-sense.sysusers" "$pkgdir/usr/lib/sysusers.d/arch-sense.conf"
install -Dm644 "$srcdir/arch-sense.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/arch-sense.conf"
install -Dm644 "$srcdir/71-arch-sense.rules" "$pkgdir/usr/lib/udev/rules.d/71-arch-sense.rules"
install -Dm644 "$srcdir/$_tree/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|