# Depends on: glib js52 gobject-introspection intltool libxslt docbook-xsl

description="Application development toolkit for controlling system-wide privileges"
url="http://hal.freedesktop.org/docs/polkit"
packager="tnut <tnut@nutyx.org>"
contributors="Pierre B"

name=polkit
version=0.115

source=(http://www.linuxfromscratch.org/patches/blfs/svn/polkit-0.115-security_patch-2.patch
	http://www.freedesktop.org/software/polkit/releases/$name-$version.tar.gz)

build() {
cd $name-$version

patch -Np1 -i ../polkit-0.115-security_patch-2.patch


./configure --prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
--enable-libsystemd-login=no \
--disable-static \
--enable-libelogind=no

make||make -j1

make DESTDIR=$PKG install

# Obsolets libs
rm $PKG/usr/lib/libpolkit-{agent,gobject}-1.la

mkdir -p $PKG/etc/pam.d
cat > $PKG/etc/pam.d/polkit-1 << "EOF"
# Begin /etc/pam.d/polkit-1

auth     include        system-auth
account  include        system-account
password include        system-password
session  include        system-session

# End /etc/pam.d/polkit-1
EOF
}
