# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=libixion
pkgver=0.12.2
pkgrel=1
pkgdesc="a general purpose formula parser & interpreter"
url="https://gitlab.com/ixion/ixion"
arch="all"
license="MPL-2.0"
depends=""
depends_dev=""
makedepends="$depends_dev boost-dev mdds-dev"
install=""
subpackages="$pkgname-dev"
source="http://kohei.us/files/ixion/src/libixion-$pkgver.tar.xz"
builddir="$srcdir/libixion-$pkgver"

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-python \
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
}

dev() {
	default_dev || return 1
	cd "$builddir"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr
}

md5sums="50873fec72f7f74bb0c0c216ee092d32  libixion-0.12.2.tar.xz"
sha256sums="8b44008836bb4e1a3dff4d3e40afec6c73037e3518e72cc85b5cc675fbc2daae  libixion-0.12.2.tar.xz"
sha512sums="0a85120a08c79c73a252a997c8b3df461fe1f8ce8b2334aee0e50bfd887a440a220b44922edd18fbd402b1c8ea8be629e6181493bc618eda198f35159813ddcd  libixion-0.12.2.tar.xz"
