# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xfce4-screensaver
pkgver=4.18.3
pkgrel=0
pkgdesc="Screensaver and locker for XFCE"
url="https://gitlab.xfce.org/apps/xfce4-screensaver"
arch="all"
license="GPL-2.0-or-later"
depends="python3"
makedepends="
	dbus-glib-dev
	garcon-dev
	glib-dev
	gtk+3.0-dev
	libwnck3-dev
	libx11-dev
	libxext-dev
	libxfce4ui-dev
	libxklavier-dev
	libxrandr-dev
	libxscrnsaver-dev
	linux-pam-dev
	xfconf-dev
	"
subpackages="$pkgname-doc $pkgname-lang"
source="https://archive.xfce.org/src/apps/xfce4-screensaver/${pkgver%.*}/xfce4-screensaver-$pkgver.tar.bz2
	pam-base-auth.patch
	"
options="suid"
_libexecdir=/usr/lib/xfce4

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--libexecdir=$_libexecdir \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-pam \
		--enable-locking
	make
}

check() {
	make check
}

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

sha512sums="
1be2227bf108ccbe48647feb64d532251c3e636fcc0163801f62759828c2549490b0fd13047f68fff3c10ee09033a526311db63629b889453aaf64797097e871  xfce4-screensaver-4.18.3.tar.bz2
0d53a0e9ee4b8bc5469b7b46068c614d188bb13dfc7d79565d61fae4c854dd4edc72ad7a785d09fb256d9e98564fa2325a2f8af7dbccad645fded5ed525d95ad  pam-base-auth.patch
"
