# Maintainer: Virt pkgname=watt pkgver=0.3.1 pkgrel=1 pkgdesc='Modern CPU frequency and power management utility for Linux' url='https://github.com/NotAShelf/watt' license=('MPL-2.0') makedepends=('cargo') depends=() arch=('x86_64' 'armv7h') source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz" "$pkgname.service") sha256sums=('406834dae5e4734987d5777e207b62cb4e89f7acc992a423215ee38e99d88191' 'SKIP') prepare() { cd "$pkgname-$pkgver" export RUSTUP_TOOLCHAIN=stable cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" } build() { cd "$pkgname-$pkgver" export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target cargo build --frozen --release --all-features } package() { # install custom systemd service adapted from the nix module install -Dm644 "$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service" cd "$pkgname-$pkgver" # TODO: revert this install -Dm0755 "target/release/superfreq" "$pkgdir/usr/bin/$pkgname" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }