summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorBrinkerVII2021-11-03 21:13:59 +0100
committerBrinkerVII2021-11-03 21:13:59 +0100
commite3801d40051d043e55c60b76850f85cd31e44bbe (patch)
tree4878ba9139f6590768358399a9ee9099d21a5162 /PKGBUILD
parent0abcc16da9508a568ec40bd08ddbf36cdd3314ce (diff)
downloadaur-e3801d40051d043e55c60b76850f85cd31e44bbe.tar.gz
Build from sources, move to -bin
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD39
1 files changed, 27 insertions, 12 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e112e3e62f92..4bba6d676c09 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,26 +3,41 @@
_pkgbase=luau
pkgname=luau
pkgver=0.501
-pkgrel=2
+pkgrel=3
-pkgdesc='A fast, small, safe, gradually typed embeddable scripting language derived from Lua '
-arch=('x86_64')
+pkgdesc='A fast, small, safe, gradually typed embeddable scripting language derived from Lua'
+arch=('any')
url='https://github.com/Roblox/luau'
license=('MIT')
-makedepends=('unzip')
-conflicts=("$_pkgbase"-git)
+makedepends=('unzip' 'cmake')
+conflicts=("$_pkgbase"-git "$_pkgbase"-bin)
provides=("$_pkgbase")
-source=('https://github.com/Roblox/luau/releases/download/0.501/luau-ubuntu.zip')
-
-sha512sums=('cac11ce57965eab563120fb041497d69d8794ee5c4b812f604d977bfca02fa22573b6414a16291475d0156e2cc0c104d75ea7f265b3e5989510d11a6a8c3cb45')
+source=("https://github.com/Roblox/luau/archive/refs/tags/$pkgver.zip")
+sha512sums=('8f48af3714827ad188a05dded313ffdb5a403f4f660f9aa2077407272a010c334c727aaee606f5980aa304067d61801c932f149c015c791b70d9ff8b8f3cf3df')
prepare() {
- unzip -o luau-ubuntu.zip
+ unzip -o "$pkgver.zip"
}
-package() {
- install -Dm755 "$srcdir/luau" "$pkgdir/usr/bin/luau"
- install -Dm755 "$srcdir/luau-analyze" "$pkgdir/usr/bin/luau-analyze"
+build() {
+ _build_dir=$srcdir/build
+ _luau_root=$srcdir/luau-$pkgver
+
+ _cpu_threads=$(grep -c processor /proc/cpuinfo)
+ export MAKEFLAGS="-j $_cpu_threads"
+
+ mkdir -p "$_build_dir"
+ cd "$_build_dir"
+
+ cmake "$_luau_root" -DCMAKE_BUILD_TYPE=Release
+ cmake --build . --target Luau.Repl.CLI Luau.Analyze.CLI --config Release
}
+
+package() {
+ _build_dir=$srcdir/build
+
+ install -Dm755 "$_build_dir/luau" "$pkgdir/usr/bin/luau"
+ install -Dm755 "$_build_dir/luau-analyze" "$pkgdir/usr/bin/luau-analyze"
+} \ No newline at end of file