summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 424edbfc704cd7de107b5b582cc8c7e139cd0fec (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
# Maintainer: icepie <icepie.dev@gmail.com>

pkgname="gnome-randr-rust"
_pkgname="gnome-randr"
pkgver=0.1.1.44.g688e0c2
pkgrel=1
pkgdesc="xrandr for Gnome/wayland, on distros that don't support wlr-randr"
arch=("x86_64")
url="https://github.com/maxwellainatchi/gnome-randr-rust"
license=("MIT")
depends=()
optdepends=()
makedepends=("rust" "cargo" "git")
provides=("gnome-randr")
conflicts=("gnome-randr")
source=("$_pkgname::git+https://github.com/maxwellainatchi/gnome-randr-rust.git")
sha256sums=("SKIP")

pkgver() {
  cd "$_pkgname"
  echo "$(grep '^version =' Cargo.toml | head -n1 | cut -d\" -f2).$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)"
}

build() {
  cd $_pkgname
  export SHELL_COMPLETIONS_DIR="$PWD/completions"
  cargo build --release
}

check() {
  cd $_pkgname
  cargo test --release
}

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