# Template file for 'gnome-calculator'
pkgname=ConsoleKit
reverts="0.9.1_1"
version=0.4.6
revision=7
build_style=gnu-configure
configure_args="--enable-udev-acl --with-pam-module-dir=/usr/lib/security --enable-pam-module"
hostmakedepends="automake libtool pkg-config glib-devel"
makedepends="acl-devel libudev-devel polkit-devel dbus-glib-devel glib-devel libX11-devel pam-devel"
depends="dbus"
short_desc="A framework for defining and tracking users, login sessions, and seats"
maintainer="Enno Boland <eb@s01.de>"
homepage="http://www.freedesktop.org/wiki/Software/ConsoleKit"
license="GPL"
distfiles="http://www.freedesktop.org/software/ConsoleKit/dist/${pkgname}-${version}.tar.xz"
checksum=b41d17e06f80059589fbeefe96ad07bcc564c49e65516da1caf975146475565c

make_dirs="
 /etc/${pkgname}/run-seat.d 0755 root root
 /etc/${pkgname}/run-session.d 0755 root root
 /usr/lib/${pkgname}/run-session.d 0755 root root
 /usr/lib/${pkgname}/run-seat.d 0755 root root
 /var/log/${pkgname} 0755 root root"

pre_configure() {
	autoreconf -fi
}
post_install() {
	vinstall ${FILESDIR}/90-consolekit-3 755 etc/X11/xinit/xinitrc.d 90-consolekit
	vinstall ${FILESDIR}/pam-foreground-compat.ck 755 usr/lib/${pkgname}/run-session.d
}

ConsoleKit-devel_package() {
	short_desc+=" - development files"
	depends="dbus-devel ${sourcepkg}>=${version}_${revision}"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/*.so
		vmove usr/lib/pkgconfig
	}
}