summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e8db7f77710fa63b162aa34a6ccd80d727a46546 (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
# Maintainer: Nakidai <plaza521 at inbox dot ru>
pkgname=nomi-git
pkgdesc="Minecraft launcher powered by Rust"
url="https://github.com/Umatriz/nomi"
license=("GPL-3.0-or-later")

provides=("nomi")
conflicts=("nomi")

pkgver=0.1.2.pre1.r1.gbaf5204
pkgrel=1

arch=("x86_64")
options=(!lto)
depends=("glibc" "gcc-libs" "bzip2" "openssl")
makedepends=("git" "cargo")

source=(
    "$pkgname::git+https://github.com/Umatriz/nomi.git#branch=main"
)
sha256sums=('SKIP')

pkgver() {
    cd "$pkgname"
    git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

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

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

package() {
    install -Dm755 "$pkgname/target/release/client" "$pkgdir/usr/bin/nomi"
}