#!/bin/sh
#
# Copyright 2008 Your name
# Available under the terms of the GNU GPL.
#

NAME="polkit-gnome"
VERSION="0.94"
REVISION="1"

PKG_SOURCEURL='http://hal.freedesktop.org/releases/$NAME-$VERSION.tar.bz2'

. $DLG_ROOT/config
. $DLG_ROOT/SCRIPTS/dropline-functions.sh

unset DLG_LOCALSTATEDIR

cflags
cxxflags
prepare
analyzesource
configure
make
makeinstall

# Let's use console helper...
mkdir -p $PKG_STAGEROOT/usr/sbin
mv $PKG_STAGEROOT/usr/bin/polkit-gnome-authorization $PKG_STAGEROOT/usr/sbin/polkit-gnome-authorization
mkdir -p $PKG_STAGEROOT/etc/pam.d
cat $PKG_COREREPOS/polkit-gnome-authorization-pam > $PKG_STAGEROOT/etc/pam.d/polkit-gnome-authorization
mkdir -p $PKG_STAGEROOT/etc/security/console.apps
cat $PKG_COREREPOS/polkit-gnome-authorization-security > $PKG_STAGEROOT/etc/security/console.apps/polkit-gnome-authorization

# Add symlink
spewdo "cd $PKG_STAGEROOT$PKG_PREFIX/bin ; ln -sf $PKG_PREFIX/bin/consolehelper polkit-gnome-authorization"

tidydocumentation
analyzebinaries
finalizepackage
packagize
cleanup
