# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Mark Riedesel <mark+alpine@klowner.com>
pkgname=ilmbase
pkgver=2.2.0
pkgrel=2
pkgdesc="Base libraries from ILM for OpenEXR"
url="http://www.openexr.com"
arch="all"
license="BSD"
makedepends="bash linux-headers"
subpackages="$pkgname-dev"
source="http://download.savannah.nongnu.org/releases/openexr/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare
	update_config_sub
}

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

check() {
	cd "$builddir"
	make check
}
package() {
	make DESTDIR="$pkgdir" \
		-C "$builddir" install
}

sha512sums="0bbad14ed2bd286dff3987b16ef8631470211da54f822cb3e29b7931807216845ded81c9bf41fd2d22a8b362e8b9904a5450f61f5a242e460083e86b846513f1  ilmbase-2.2.0.tar.gz"