summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 200e926e00681ea77732681c7fa371c9c2f46889 (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
# Maintainer: kormpu mcgpapu@gmail.com

#https://wiki.archlinux.org/title/Rust_package_guidelines
pkgname="tronclock"
pkgdesc="An ncurses based clock resembling the screensaver shown in TRON: Legacy"
pkgver=2.0
pkgrel=4
arch=('any')
url="https://github.com/papuSpartan/tronclock"
source=("git+https://github.com/papuSpartan/tronclock.git")
license=('GPL3')
depends=()
makedepends=('cargo' 'git')
b2sums=('SKIP')

prepare() {
	cd "$pkgname"
	cargo update
    cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}


build() {
	cd "$pkgname"
	export RUSTUP_TOOLCHAIN=stable
	export CARGO_TARGET_DIR=target
	cargo build --frozen --release --all-features
}

check() {
	cd "$pkgname"
	export RUSTUP_TOOLCHAIN=stable
	cargo test --frozen --all-features
}

package() {
	cd "$pkgname"
	install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
	install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
	install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}