blob: 4b450dade73dec39b5a4bc95de183268ef247143 (
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
|
# Maintainer: Marieke Westendorp <ma3ke.cyber@gmail.com>
pkgname=tid
pkgver=0.1.1
pkgrel=1
pkgdesc="A small system information bar"
arch=('x86_64')
url="https://git.sr.ht/~ma3ke/tid"
license=('MIT')
depends=()
makedepends=('cargo-nightly')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
backup=("etc/tid/tid.config")
sha512sums=('a370b0eda066ee2614f46afdd56f85e959d44ee60404b7c529d5cafbeb25390826e48f769a2cd3f3f97621ce17e28edd97c7ca3523f0e5280ce2066e03bbaa45')
prepare() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=nightly
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=nightly
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
}
check() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=nightly
export CARGO_TARGET_DIR=target
cargo test --frozen --all-features
}
package() {
cd "$pkgname-$pkgver"
install -Dm 755 "target/release/tid" "$pkgdir/usr/bin/tid"
mkdir -p "$pkgdir/etc/tid"
mkdir -m 655 "$pkgdir/etc/tid/fonts"
find fonts \
-maxdepth 1 \
-type f \
-exec install -Dm 644 -t "$pkgdir/etc/tid/fonts/" {} +
install -Dm 644 "tid.config" "$pkgdir/etc/tid/tid.config"
install -Dm 644 "README.md" "$pkgdir/usr/share/doc/${pkgname}/README.md"
install -Dm 644 "LICENSE" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
}
|