# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xfce4-screenshooter
pkgver=1.11.1
pkgrel=0
pkgdesc="Screenshot application for Xfce4"
url="https://goodies.xfce.org/projects/applications/xfce4-screenshooter"
arch="all"
license="GPL-2.0-or-later"
subpackages="$pkgname-doc $pkgname-lang $pkgname-imgur"
makedepends="
	exo-dev
	hicolor-icon-theme
	libxext-dev
	libxfce4ui-dev
	xfce4-panel-dev
	"
source="https://archive.xfce.org/src/apps/xfce4-screenshooter/${pkgver%.*}/xfce4-screenshooter-$pkgver.tar.bz2"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--libexecdir=/usr/lib \
		--localstatedir=/var \
		--disable-static
	make
}

check() {
	make check
}

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

imgur() {
	pkgdesc="$pkgdesc (imgur uploader script)"
	depends="$pkgname=$pkgver-r$pkgrel curl jq xclip zenity"

	amove usr/lib/xfce4/screenshooter/scripts/imgur-upload.sh
}

sha512sums="
aee31311faea2bb08d5e29722da190b0c7e2b37948a688a49212cd57cc4efc3f43b3c1588d9326f97eb174771412c60707cc88ae2ee0596546e9750a06112588  xfce4-screenshooter-1.11.1.tar.bz2
"
