aboutsummaryrefslogblamecommitdiffstats
path: root/community/fennel/APKBUILD
blob: 23be0f4c8045294d7406ca8369a8ca44247bca85 (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                 
            
        



                             
                                                                                            
                                                                                             
                                           


                          
                                      


         
                                                                                                  
                                                                 





                                                                 


                                                                 

                                                                        
 


                                                                
                                     


                                                
                                                                                                                                                                  
# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=fennel
pkgver=0.9.1
pkgrel=0
pkgdesc="A Lua Lisp Language"
url="https://fennel-lang.org"
arch="all"
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="87e7ffbef0b49499a93255f50e77f53b9be4faa6d4609d8d65e3a64470bbf07b49a55e7dd547fda4b0e5fe0f4f1e6ece18282cc89955a57ed0a50be8dc01261c  fennel-0.9.1.tar.gz"