#!/bin/sh

NAME="polkit-gnome"
DESC="PolicyKit integration for the GNOME desktop"

MAKEDEPS="gtk3 polkit intltool"

PKG_VER=0.105
SOURCE="https://download.gnome.org/sources/polkit-gnome/$PKG_VER/polkit-gnome-$PKG_VER.tar.xz"

ADDITIONAL="
polkit-gnome-authentication-agent-1.desktop
"

build() {
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--libexecdir=/usr/lib/polkit-gnome
	make
}

package() {
	make DESTDIR="$PKG_DEST" install
	install -Dm644 "$BUILD_ROOT/polkit-gnome-authentication-agent-1.desktop" \
		"$PKG_DEST/etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop"
}