summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3c95229527aee53a1737fe8f43211637df3dc8fa (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
# Maintainer: Dawid Potocki <archlinux a dawidpotocki , com>

pkgname=wayfreeze
pkgver=0.2.1
pkgrel=1
pkgdesc='Tool to freeze the screen of a Wayland compositor'
arch=('x86_64')
url='https://github.com/Jappie3/wayfreeze'
license=('AGPL-3.0-only')
depends=('glibc' 'libgcc' 'libxkbcommon' 'wayland')
makedepends=('cargo')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Jappie3/wayfreeze/archive/refs/tags/${pkgver}.tar.gz")
b2sums=('d9a1e255758cca00510950690d483db01630c1ef42a718a537ffaee7180e0dc9835a1cc8c010e5a5ffac5fd7eea1beb7f3f86579871fe71d7d9e26c58dfeacd7')

prepare() {
	cd "${pkgname}-${pkgver}"

	export RUSTUP_TOOLCHAIN="stable"
	cargo fetch --locked --target host-tuple
}

build() {
	cd "${pkgname}-${pkgver}"

	export RUSTUP_TOOLCHAIN="stable"
	export CARGO_TARGET_DIR="target"
	cargo build --frozen --release --all-features
}

package() {
	cd "${pkgname}-${pkgver}"

	install -Dm0755 "target/release/$pkgname" -t "$pkgdir/usr/bin"
}