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

pkgname=lune
pkgver=0.8.4
pkgrel=2
pkgdesc="[Latest Stable Source] A standalone Luau script runtime"
arch=(x86_64 aarch64)
conflicts=(lune-git lune-bin)
url="https://lune-org.github.io/docs"
license=(MPL2)
depends=(glibc)
makedepends=(cargo cmake)
options=(!lto)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/filiptibell/lune/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('ff254da9ed4f3f2cf171f69015ce833e3954a8fa2e357aa208718e2e53ed5a01')

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

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

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

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