# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=shotwell
pkgver=0.32.8
pkgrel=0
pkgdesc="Digital photo organizer designed for the GNOME desktop environment"
url="https://wiki.gnome.org/Apps/Shotwell"
arch="all"
license="CC-BY-SA-3.0 AND LGPL-2.1-or-later"
subpackages="$pkgname-lang $pkgname-doc"
makedepends="
	dbus-glib-dev
	desktop-file-utils
	gcr-dev
	gexiv2-dev
	gst-plugins-base-dev
	gtk+3.0-dev
	itstool
	json-glib-dev
	libexif-dev
	libgdata-dev
	libgee-dev
	libgphoto2-dev
	libgudev-dev
	libportal-dev
	libraw-dev
	libsecret-dev
	meson
	sqlite-dev
	vala
	webkit2gtk-4.1-dev
	"
checkdepends="appstream-glib"
source="https://download.gnome.org/sources/shotwell/${pkgver%.*}/shotwell-$pkgver.tar.xz"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dinstall_apport_hook=false \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
ce87652958247e9a9bc4540c8a3746a92ab433c65a08a212b57433d43cfc139c764423e03525bd31cb7139c71b962d4697a83bed7641013c8bfd01bd08b56b3f  shotwell-0.32.8.tar.xz
"
