# Description: libjpeg derivative with accelerated baseline JPEG compression and decompression
# URL: https://libjpeg-turbo.org/
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on:

name=libjpeg6-turbo
version=1.5.3
release=1
source=(https://downloads.sourceforge.net/project/libjpeg-turbo/$version/libjpeg-turbo-$version.tar.gz)

build() {
  cd libjpeg-turbo-$version
  ./configure \
    --prefix=/usr \
    --mandir=/usr/share/man \
    --without-simd \
    --with-build-date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m%d)"
  make
  make DESTDIR=$PKG install
  rm -rf $PKG/usr/{bin,include,lib/pkgconfig,share}
  rm $PKG/usr/lib/lib{jpeg.{a,so},turbojpeg.{a,so*}}
}
