# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>

pkgname=ilmbase
pkgver=1.0.2
pkgrel=1
depends=('gcc-libs')
pkgdesc="Base libraries from ILM for OpenEXR"
arch=(i686 x86_64)
license=('custom')
options=('!libtool')
source=(http://savannah.nongnu.org/download/openexr/$pkgname-$pkgver.tar.gz
        tests-compile-fixes.patch)
url="http://www.openexr.com"
md5sums=('26c133ee8ca48e1196fbfb3ffe292ab4'
         '2687ab9ac01b417ee5cf8c0174b72e43')

build() {
  cd ${srcdir}/$pkgname-$pkgver
  patch -Np1 -i ${srcdir}/tests-compile-fixes.patch
  ./configure --prefix=/usr
  make
}

check() {
  cd ${srcdir}/$pkgname-$pkgver
  # one of the tests fails randomly for an unknown reason
  make check || true
}

package() {
  cd ${srcdir}/$pkgname-$pkgver
  make DESTDIR=${pkgdir} install
  install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
}