# $Id: PKGBUILD 149571 2012-02-08 14:46:39Z tpowa $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>

pkgname=openexr
pkgver=1.7.0
pkgrel=2
pkgdesc="An high dynamic-range image file format library"
url="http://www.openexr.com/"
arch=('i686' 'x86_64')
license=('BSD')
depends=('zlib' 'ilmbase')
options=('!libtool')
source=("http://download.savannah.nongnu.org/releases/${pkgname}/${pkgname}-${pkgver}.tar.gz"
        'gcc43.patch')
md5sums=('27113284f7d26a58f853c346e0851d7a'
         'd91fae759053a70bcedcf02eb33ca4a2')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -p0 -i ${srcdir}/gcc43.patch
  ./configure --prefix=/usr
  make
}

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