Added PolicyKit-0.9 template.

--HG--
extra : convert_revision : 231021db72f9ea60bcfc247f12eb9c642e28124a
This commit is contained in:
Juan RP 2009-03-22 03:58:00 +01:00
parent 4e87160dec
commit 5b7e35b5f5
6 changed files with 109 additions and 0 deletions

1
templates/PolicyKit-devel Symbolic link
View File

@ -0,0 +1 @@
PolicyKit

View File

@ -0,0 +1,36 @@
#
# This script fixes permissions for some files and dirs,
# and creates the policykit system user/group.
#
case "$2" in
pre)
;;
post)
echo "Running $3-$4 post installation hooks..."
if ! chroot . getent group policykit >/dev/null; then
chroot . groupadd -r policykit
[ $? -ne 0 ] && exit $?
echo "Created policykit system group."
fi
if ! chroot . getent passwd policykit >/dev/null; then
chroot . useradd -c "PolicyKit user" \
-d / -s /sbin/nologin -g policykit -r policykit && \
chroot . passwd -l policykit &>/dev/null
[ $? -ne 0 ] && exit $?
echo "Created policykit system user."
fi
chroot . chgrp policykit var/run/PolicyKit
chroot . chgrp policykit var/lib/PolicyKit
chroot . chown policykit var/lib/PolicyKit-public
chroot . chown policykit:policykit var/lib/misc/PolicyKit.reload
chroot . chown policykit usr/libexec/polkit-set-default-helper
chroot . chmod u+s usr/libexec/polkit-set-default-helper
for i in polkit-read-auth-helper polkit-revoke-helper \
polkit-grant-helper polkit-explicit-grant-helper; do
chroot . chgrp policykit usr/libexec/$i
chroot . chmod g+s usr/libexec/$i
done
chroot . chgrp policykit usr/libexec/polkit-grant-helper-pam
chroot . chmod u+s usr/libexec/polkit-grant-helper-pam
;;
esac

View File

@ -0,0 +1,11 @@
#
# This script removes the policykit user/group.
#
case "$2" in
pre)
chroot . userdel policykit &>/dev/null
[ $? -eq 0 ] && echo "Removed policykit system user/group."
;;
post)
;;
esac

View File

@ -0,0 +1,2 @@
abi_depends=0.9
api_depends=${abi_depends}

View File

@ -0,0 +1,17 @@
# Template file for 'PolicyKit-devel'.
#
short_desc="${short_desc} (development files)"
long_desc="${long_desc}
This package contains files for development, headers, static libs, etc."
Add_dependency run PolicyKit
do_install()
{
mkdir -p ${DESTDIR}/usr/lib
mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr
mv ${SRCPKGDESTDIR}/usr/lib/*.*a ${DESTDIR}/usr/lib
mv ${SRCPKGDESTDIR}/usr/lib/pkgconfig ${DESTDIR}/usr/lib
}

View File

@ -0,0 +1,42 @@
# Template file for 'PolicyKit'
pkgname=PolicyKit
sourcepkg=$pkgname
version=0.9
distfiles="http://hal.freedesktop.org/releases/$pkgname-$version.tar.gz"
build_style=gnu_configure
configure_args="--with-polkit-user=policykit --with-polkit-group=policykit
--disable-static --localstatedir=/var"
short_desc="Authorization Toolkit"
maintainer="Juan RP <xtraeme@gmail.com>"
checksum=f40c7c6bec19d7dba2335bddcffd0457494409a0dfce11d888c748dc892e80b7
long_desc="
PolicyKit is a toolkit for defining and handling authorizations. It is
used for allowing unprivileged processes to speak to privileged processes."
conf_files="/etc/PolicyKit/PolicyKit.conf
/etc/dbus-1/system.d/org.freedesktop.PolicyKit.conf"
subpackages="devel"
Add_dependency full glibc
Add_dependency full dbus
Add_dependency full dbus-glib
Add_dependency full expat
Add_dependency full pam
Add_dependency build intltool
Add_dependency build libxslt
Add_dependency build docbook-xsl
post_install()
{
mkdir -p ${DESTDIR}/etc/pam.d
cat >> ${DESTDIR}/etc/pam.d/polkit <<_EOF
auth requisite pam_nologin.so
auth required pam_env.so
auth required pam_unix.so
account required pam_unix.so
session required pam_limits.so
session required pam_unix.so
password required pam_unix.so
_EOF
chmod 644 ${DESTDIR}/etc/pam.d/polkit
}