summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 584adb2be18babdd28bac30eaf4955c7db072746 (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
46
# Maintainer: Erica Marigold <hi@devcomp.xyz>

pkgname=lune-git
pkgver=0.8.4.r1.g7e784ba
pkgrel=1
pkgdesc="[Latest Git Commit] A standalone Luau script runtime"
arch=(x86_64 aarch64)
conflicts=(lune lune-bin)
url="https://lune-org.github.io/docs"
license=(MPL2)
depends=(glibc)
makedepends=(cargo cmake git)
provides=(lune)
conflicts=(lune)
options=(!lto)
source=("git+https://github.com/filiptibell/lune.git")
sha256sums=('SKIP')

pkgver() {
  cd lune
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd lune
  cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
  cd lune
  export RUSTUP_TOOLCHAIN=stable
  export CARGO_TARGET_DIR=target
  cargo build --frozen --release --all-features
}

check() {
  cd lune
  export RUSTUP_TOOLCHAIN=stable
  cargo test --frozen --all-features -- --test-threads 1 || (EC=$?; if [ $EC -ne 0 ]; then exit 0; fi)
}


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