# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=ffcall
pkgver=2.0
pkgrel=1
pkgdesc="C library for implementing foreign function calls in embedded interpreters"
url="http://www.gnu.org/software/libffcall/"
arch="all !x86 !armhf"
license="GPL-2.0"
depends=""
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-doc"
source="https://ftp.gnu.org/gnu/libffcall/libffcall-$pkgver.tar.gz"

builddir="$srcdir"/libffcall-$pkgver

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make -j1
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	mkdir -p "$pkgdir"/usr/share/man \
		"$pkgdir"/usr/share/doc/ffcall \
		"$pkgdir"/usr/share/doc/doc
	make DESTDIR="$pkgdir" htmldir=/usr/share/doc/ffcall install
}

sha512sums="d75aa1df97b14692a9137745bae5b24c4d8f739cb1c7f854e7ed47e4a77a49759122abd6b0e445efa56381f47932c13cd21a154b2783649afb9c7a39e73fea04  libffcall-2.0.tar.gz"
