summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: af49124d15177e1619a7ebd2db466389e8b81782 (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: coffebar i8ehkvien@mozmail.com

pkgname=hyprland-per-window-layout
pkgver=2.10
pkgrel=1
pkgdesc='Per window keyboard layout (language) for Hyprland wayland compositor'
arch=('x86_64')
url="https://github.com/coffebar/$pkgname"
license=('GPL')
makedepends=(cargo)
depends=()
_commit=e6023e4
source=("git+$url#commit=$_commit")
sha256sums=('SKIP')

pkgver(){
    cd "$pkgname"
    git describe --tags | sed 's/^v//;s/-/+/g'
}

prepare() {
    cd "$pkgname"
    export RUSTUP_TOOLCHAIN=stable
    test -f /usr/bin/rustup && /usr/bin/rustup update --no-self-update $RUSTUP_TOOLCHAIN
    cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

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

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