# Contributor: Martijn Braam <martijn@brixit.nl>
# Maintainer: Martijn Braam <martijn@brixit.nl>
pkgname=libdng
pkgver=0.2.1
pkgrel=0
pkgdesc="Interface library between libtiff and the world to make sure the output is valid DNG"
url="https://gitlab.com/megapixels-org/libdng"
arch="all !s390x" # Libtiff does weird things on s390x
license="MIT"
source="https://gitlab.com/megapixels-org/libdng/-/archive/$pkgver/libdng-$pkgver.tar.gz"
makedepends="cmake linux-headers meson tiff-dev scdoc"
subpackages="$pkgname-doc $pkgname-dev $pkgname-utils"

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

utils() {
	pkgdesc="DNG manipulation utlities using libdng"
	amove usr/bin
}


sha512sums="
9a2bee7f4d33dd087bfdfe744319edcbfd22dbc420c506dcb978974cbc6724141fa6ecc2ff5c6c43419d4bb8054e9ed97550590259c325887ec93fef68e17a83  libdng-0.2.1.tar.gz
"
