summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9dd43d5eea2ddc2a36150e70c1fe65f2fc28a2f4 (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: Joey Li https://joeyli.dev
pkgname=weather-rs
pkgver=0.0.1
pkgrel=1
epoch=
pkgdesc="Weather App made to run in the terminal written in Rust"
arch=('x86_64')
url="https://github.com/einstein8612/weather-rs"
license=('MIT')
groups=()
depends=()
makedepends=("cargo")
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
noextract=()
sha256sums=('61c0fff71b4995c94e8bb145939de2987a6f6da7f2a0d68dbb140fb603d93aa2')
validpgpkeys=()

prepare() {
	cd "$pkgname-$pkgver"
	export RUSTUP_TOOLCHAIN=stable
	cargo update
}

build() {
	cd "$pkgname-$pkgver"
	export RUSTUP_TOOLCHAIN=stable
	export CARGO_TARGET_DIR=target
	cargo build --release
	rm -f target/release/weather
	mv target/release/weather-rs target/release/weather
}

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

package() {
	cd "$pkgname-$pkgver"
	install -Dm 755 "target/release/weather" -t "$pkgdir/usr/bin"
	install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
	install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}