# Maintainer: afontenot # Contributor: Gaetan Bisson # Contributor: Allan McRae # Contributor: Simone Sclavi 'Ito' # Contributor: N30N pkgname="mozjpeg" pkgver=4.1.4 pkgrel=1 pkgdesc="JPEG image codec with accelerated baseline decoding and superior encoding" url="https://github.com/mozilla/mozjpeg" license=("BSD") arch=("i686" "x86_64" "armv7h") depends=("glibc" "libpng") makedepends=("nasm" "cmake") source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz") sha1sums=('ffb05e8db04b3521a450e651bd5db6ce7656c60c') provides=("libjpeg" "libjpeg.so" "turbojpeg" "libjpeg-turbo") conflicts=("libjpeg" "mozjpeg-git" "turbojpeg" "libjpeg-turbo") build() { cd "${srcdir}/${pkgname}-${pkgver}" cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib -DENABLE_STATIC=FALSE -DPNG_SUPPORTED=TRUE -DWITH_JPEG8=TRUE . make } # There are a lot of tests: if you don't want to run them, you or # your AUR helper should use `makepkg --nocheck`. check() { cd "${srcdir}/${pkgname}-${pkgver}" make test } package() { cd "${srcdir}/${pkgname}-${pkgver}" make \ DESTDIR="${pkgdir}" \ docdir="/usr/share/doc/${pkgname}" \ exampledir="/usr/share/doc/${pkgname}" \ install install -D LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" install -m644 jpegint.h "${pkgdir}/usr/include" }