# Contributor: rubicon <rubicon@mailo.com>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=lfe
pkgver=2.2.0
pkgrel=1
pkgdesc="Lisp Flavoured Erlang"
url="https://lfe.io/"
arch="all"
license="Apache-2.0"
depends="erlang"
makedepends="erlang27-dev"
subpackages="$pkgname-doc"
source="https://github.com/lfe/lfe/archive/$pkgver/lfe-$pkgver.tar.gz"

build() {
	make compile
}

check() {
	./bin/lfe -e '(help)'
}

package() {
	make PREFIX="$pkgdir/usr" install

	install -Dvm644 doc/*.txt \
		-t "$pkgdir"/usr/share/doc/$pkgname/

	cd "$pkgdir"/usr/bin
	ln -svf ../lib/lfe/bin/* .
}

sha512sums="
029cbc638f1c125fbb9053de5f7bb1d261575e6f390e38133f34d3bc6f2905c4d8aab7c8cdff5ba67ddbdfcd6546e37c66924104e8d825247513dee829a170df  lfe-2.2.0.tar.gz
"
