# Contributor: Carlo Landmeter # Maintainer: Natanael Copa pkgname=libjpeg-turbo pkgver=1.4.1 pkgrel=0 pkgdesc="accelerated baseline JPEG compression and decompression library" url="http://libjpeg-turbo.virtualgl.org/" arch="all" license="GPL" depends="" depends_dev="" makedepends="$depends_dev nasm" install="" replaces="libjpeg" subpackages="$pkgname-dev $pkgname-doc $pkgname-utils" source="http://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-$pkgver.tar.gz " _builddir="$srcdir"/libjpeg-turbo-$pkgver prepare() { local i cd "$_builddir" update_config_sub || return 1 for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ --with-jpeg8 \ || return 1 make || return 1 } package() { cd "$_builddir" make -j1 DESTDIR="$pkgdir" docdir=/usr/share/doc/$pkgname \ install || return 1 rm -f "$pkgdir"/usr/lib/*.la } utils() { pkgdesc="Utilities for manipulating JPEG images" replaces="jpeg" mkdir -p "$subpkgdir"/usr mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ } doc() { default_doc replaces="jpeg-doc" } dev() { default_dev replaces="jpeg-dev" } md5sums="b1f6b84859a16b8ebdcda951fa07c3f2 libjpeg-turbo-1.4.1.tar.gz" sha256sums="4bf5bad4ce85625bffbbd9912211e06790e00fb982b77724af7211034efafb08 libjpeg-turbo-1.4.1.tar.gz" sha512sums="81197fdac40c55cb9820b832c55dab9dd5aa19427a22feb6027510a4dc9c45aeea6a37203447600481f5162a0a2ca972324997cc89fc7e51b51808260df0598d libjpeg-turbo-1.4.1.tar.gz"