aboutsummaryrefslogtreecommitdiffstats
path: root/community/fennel/APKBUILD
blob: 47270d8f9d7306690cea5e76353f83e5fe7cd554 (plain) (blame)
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: Will Sinatra <wpsinatra@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=fennel
pkgver=0.10.0
pkgrel=0
pkgdesc="A Lua Lisp Language"
url="https://fennel-lang.org"
# riscv64 blocked by lua
arch="all !riscv64"
license="MIT"
source="fennel-$pkgver.tar.gz::https://git.sr.ht/~technomancy/fennel/archive/$pkgver.tar.gz"
_lua_version=5.3 #Upstream suggests building against 5.3 until 5.4 has better library support
makedepends="lua5.3 lua5.3-dev lua5.3-libs"
subpackages="$pkgname-doc"

check() {
	make test LUA=lua$_lua_version
}

build() {
	make fennel-bin LUA=lua$_lua_version STATIC_LUA_LIB=/usr/lib/liblua-$_lua_version.so.0.0.0
	./fennel-bin --compile src/fennel/binary.fnl > binary.lua
}

package() {
	install -Dm644 "fennelview.lua" \
			-t "$pkgdir/usr/share/lua/$_lua_version/"

	install -Dm644 "fennel.lua" \
			-t "$pkgdir/usr/share/lua/$_lua_version/"

	install -Dm644 "binary.lua" \
			-t "$pkgdir/usr/share/lua/$_lua_version/fennel/"

	install -Dm644 "fennel.1" \
			-t "$pkgdir/usr/share/man/man1/fennel.1"

	install -Dm755 "fennel-bin" \
			"$pkgdir/usr/bin/fennel"
}

sha512sums="
3b41cbaed60f6aebc92047d4e2f4c1529871bbe0b42a53543db4c9320d627c89450384ace90d2564460a7cbab5fc36c6315f754b42b3531ee37e41ea2aa5fe04  fennel-0.10.0.tar.gz
"