# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Joeny Ang <ang(dot)joeny(at)gmail(dot)com>
# Contributor: Brad Fanella <bradfanella@archlinux.us>

pkgname=libraw
pkgver=0.22.0
pkgrel=2
pkgdesc='A library for reading RAW files obtained from digital photo cameras (CRW/CR2, NEF, RAF, DNG, and others)'
arch=(x86_64 aarch64)
url='https://www.libraw.org/'
license=(CDDL-1.0
         LGPL-2.1-only)
depends=(gcc-libs
         glibc
         lcms2
         libjpeg-turbo
         zlib)
makedepends=(git)
source=(git+https://github.com/LibRaw/LibRaw#tag=$pkgver)
sha256sums=('493e060186d5c798ff7d123f146d4d5b271fb054ee6449a91bb6b2fcb5629963')

prepare() {
  cd LibRaw
  autoreconf -fiv
}

build() {
  cd LibRaw
  ./configure --prefix=/usr
  make
}

package() {
  cd LibRaw
  make DESTDIR="$pkgdir" install
}
