summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 04ca15f4f663e461f60e1b65b4859188b6a8953e (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
# Maintainer: AEnterprise

_pkgname=hyprwatch
pkgname="$_pkgname-git"
pkgrel=1
pkgdesc="A CLI abstraction tool over Hyperland's event socket with some extra data."
pkgver="0.1.0"
arch=(x86_64)
url="https://github.com/VirtCode/hyprwatch"
license=(MIT)
depends=()
makedepends=(
	cargo-nightly
	git
	)
optdepends=()
provides=("$_pkgname")
conflicts=()
b2sums=('SKIP')

source=("git+$url.git")

pkgver() {
	cat $_pkgname/Cargo.toml | grep '^version = ' | sed 's/^version = //g'
}

prepare() {
	cd $_pkgname
	export RUSTUP_TOOLSCHAIN=nightly
	cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
	cd $_pkgname
	export RUSTUP_TOOLCHAIN=nightly
	export CARGO_TARGET_DIR=target
	cargo build --frozen --release
}



package() {
	cd $_pkgname
	install -Dm755 "target/release/$_pkgname" -t "$pkgdir/usr/bin/"
}