blob: 6b6aba3b132f4f8800bf0f4b81f273c9f60bafd4 (
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: dadav <dadav at protonmail dot com>
pkgname=battery-notify
pkgver=0.3.3
pkgrel=1
pkgdesc='A simple battery notifier for Linux.'
arch=('x86_64')
url='https://github.com/cdown/battery-notify'
license=('MIT')
makedepends=('git' 'cargo')
provides=("battery-notify=$pkgver")
conflicts=("battery-notify-git")
source=("$pkgname::git+$url")
sha256sums=('SKIP')
prepare() {
cd "$pkgname" || exit
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cd "$pkgname" || exit
cargo build --release --frozen --all-features
}
check() {
export RUSTUP_TOOLCHAIN=stable
cd "$pkgname" || exit
cargo test --frozen --all-features --release
}
package() {
cd "$pkgname" || exit
install -Dm755 battery-notify.service -t "$pkgdir/usr/lib/systemd/user/"
install -D target/release/battery-notify -t "$pkgdir/usr/bin/"
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}
# vim:set ts=2 sw=2 et:
|