# $Id: PKGBUILD 130999 2015-04-08 22:23:25Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Bartłomiej Piotrowski
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=jbig2dec
pkgver=0.12
pkgrel=1
pkgdesc='Decoder implementation of the JBIG2 image compression format'
url='http://www.ghostscript.com/jbig2dec.html'
arch=('x86_64' 'i686')
license=('GPL3')
depends=('libpng')
source=("http://downloads.ghostscript.com/public/${pkgname}/${pkgname}-${pkgver}.tar.gz"
        'libpng.patch')
sha1sums=('b543d1c73267bc029f0fc57f468f8fcac27dd20f'
          '96ce78085af547d0563af75fd8ac78eebb0402f5')

prepare() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	patch -p1 -i ../libpng.patch
}

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	./autogen.sh --prefix=/usr
	make
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make DESTDIR="${pkgdir}" install
}
