# Contributor: Alan Lacerda <alacerda@alpinelinux.org>
# Maintainer: Alan Lacerda <alacerda@alpinelinux.org>
pkgname=pluma
pkgver=1.28.0
pkgrel=0
pkgdesc="A small and lightweight UTF-8 text editor for the MATE"
url="https://github.com/mate-desktop/pluma"
arch="all"
license="GPL-2.0-or-later"
# tests require gsettings-schemas, gvfs-mount
options="!check"
depends="mate-desktop"
makedepends="
	dconf-dev
	enchant2-dev
	fortify-headers
	gsettings-desktop-schemas-dev
	gtk+3.0-dev
	gtksourceview-dev
	gtksourceview4-dev
	intltool
	iso-codes-dev
	itstool
	libpeas-dev
	libsm-dev
	libxml2-utils
	mate-desktop-dev
	"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-pyc"
source="https://pub.mate-desktop.org/releases/${pkgver%.*}/pluma-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--sysconfdir=/etc \
		--enable-static=no \
		--prefix=/usr
	make
}

check() {
	make check
}

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

pyc() {
	default_pyc
	find usr/lib/pluma -type d -name __pycache__ | while IFS='
' read -r line; do
		amove $line
	done
}

sha512sums="
8f21aabed46a70dfe8446ddf6db5cc4326782328d0b8dd3689c8b906cc8d4b746712c6b9decfa48ef028bdbb8a0b1c6a2ec43def23488ae55cfd59aafd5a691a  pluma-1.28.0.tar.xz
"
