NAME="libjpeg-turbo"
DESC="Fork of the original IJG libjpeg"
VERSION="3.0.0"
FILES=("https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-$VERSION.tar.gz")
HASHES=("aa1f0a1c72cb6772e34d9d5136267f56")
DEPENDS=()

PACKAGE() {
  tar xf $NAME-$VERSION.tar.gz
  cd $NAME-$VERSION

  mkdir build
  cd    build

  cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=RELEASE    \
      -DENABLE_STATIC=FALSE         \
      -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libjpeg-turbo-$VERSION \
      -DCMAKE_INSTALL_DEFAULT_LIBDIR=lib  \
      ..
  make && make DESTDIR="$ROOTDIR" install

  cd ../.. && rm -rf $NAME-$VERSION
}
