aboutsummaryrefslogtreecommitdiffstats
path: root/testing/luapak/APKBUILD
blob: 4e5358cb29a5481d20746284e6749042bc91675c (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=luapak
pkgver=0.1.0_beta4
_pkgver=${pkgver/_/.}
pkgrel=0
pkgdesc="Easily build a standalone executable for any Lua program"
url="https://github.com/jirutka/luapak"
arch="noarch"
license="MIT"
_luaver=5.3
depends="lua$_luaver
	lua$_luaver-depgraph
	lua$_luaver-glob-pattern
	lua$_luaver-filesystem
	lua$_luaver-optparse
	luarocks$_luaver
	binutils
	gcc
	libc-dev
	lua$_luaver-dev
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/jirutka/$pkgname/archive/v$_pkgver.tar.gz"
builddir="$srcdir/$pkgname-$_pkgver"
options="!check"  # upstream does not provide tests yet

prepare() {
	default_prepare

	cd "$builddir"
	sed -i "s|#!/usr/bin/env lua|#!/usr/bin/lua$_luaver|" bin/luapak
}

package() {
	local lmod_dir="$pkgdir/usr/share/lua/$_luaver"
	cd "$builddir"

	mkdir -p "$lmod_dir"
	cp -r luapak "$lmod_dir"/

	install -m 755 -D bin/luapak "$pkgdir"/usr/bin/luapak
}

sha512sums="ffcb705f274ff42d03ba192ab379c927f9d2d7100f959ce4f28132cab69bcb737c8e5454bad24f2f1d0c3ffed27bb3b2eaa82382e87376578daf8836424543f2  luapak-0.1.0_beta4.tar.gz"