# Contributor: Clayton Craft <clayton@craftyguy.net>
maintainer="Hugo Osvaldo Barrera <hugo@whynothugo.nl>"
pkgname=nemo
pkgver=6.4.5
pkgrel=0
pkgdesc="File manager for the Cinnamon desktop environment"
arch="all"
url="https://github.com/linuxmint/nemo"
license="GPL-2.0-only"
depends="desktop-file-utils"
makedepends="
	cinnamon-desktop-dev
	dconf-dev
	gobject-introspection-dev
	intltool
	json-glib-dev
	libexif-dev
	libgsf-dev
	libnotify-dev
	libxml2-dev
	meson
	python3
	xapp-dev
	"
checkdepends="xvfb-run"
source="https://github.com/linuxmint/nemo/archive/$pkgver/nemo-$pkgver.tar.gz"
subpackages="$pkgname-doc $pkgname-dev"
options="!check" # tests are broken: https://github.com/linuxmint/nemo/issues/2501

_xmp=false
if ! [ "$CARCH" = s390x ]; then
	makedepends="$makedepends exempi-dev"
	_xmp=true
fi

build() {
	abuild-meson \
		-Dxmp="$_xmp" \
		. output
	meson compile -C output
}

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

check() {
	xvfb-run meson test -C output
}
sha512sums="
4163dafe0d2c581468b70bf78d928b42d4e71823d698b6e8c5f86e48d148f29fcc7b02f451eba6018ae21c6e3f6ec876c5460ddeff16a8a30613ee19fcec496a  nemo-6.4.5.tar.gz
"
