1 HOMEPAGE = "http://www.packagekit.org/"
2 DEPENDS = "libpam expat dbus-glib intltool-native"
6 SRC_URI = "http://hal.freedesktop.org/releases/PolicyKit-${PV}.tar.gz \
7 file://PolicyKit.conf \
10 EXTRA_OECONF = "--with-authfw=pam --with-os-type=moblin --disable-man-pages --disable-gtk-doc"
12 S = "${WORKDIR}/PolicyKit-${PV}"
14 inherit autotools pkgconfig
16 do_install_append () {
17 install -m 0644 ${WORKDIR}/PolicyKit.conf ${D}${sysconfdir}/PolicyKit/PolicyKit.conf
18 install -d ${D}${localstatedir}/run/PolicyKit
21 FILES_${PN} += " ${datadir}/dbus-1 \
22 ${datadir}/PolicyKit \
23 ${localstatedir}/run/PolicyKit \
26 pkg_postinst_${PN} () {
27 # can't do this offline
28 if [ "x$D" != "x" ]; then
31 grep "^polkituser:" /etc/group > /dev/null || addgroup polkituser
32 grep "^polkituser:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/run/polkit polkituser --ingroup polkituser -g polkituser
34 echo "d root polkituser 0770 /var/run/PolicyKit none" > /etc/default/volatiles/98_policykit
35 rm -f /etc/volatile.cache
38 for i in /var/lib/PolicyKit /usr/libexec/polkit-read-auth-helper /usr/libexec/polkit-revoke-helper /usr/libexec/polkit-grant-helper /usr/libexec/polkit-explicit-grant-helper /usr/libexec/polkit-grant-helper-pam ; do
39 chown root:polkituser $i
42 for i in /var/lib/PolicyKit-public /usr/libexec/polkit-set-default-helper ; do
43 chown polkituser:root $i
46 chown polkituser:polkituser /var/lib/misc/PolicyKit.reload
47 chown root:root /usr/libexec/polkit-resolve-exe-helper
50 for i in /var/run/PolicyKit /var/lib/PolicyKit ; do
54 chmod 755 /var/lib/PolicyKit-public
55 chmod 775 /var/lib/misc/PolicyKit.reload
57 for i in /usr/libexec/polkit-read-auth-helper /usr/libexec/polkit-revoke-helper /usr/libexec/polkit-grant-helper /usr/libexec/polkit-explicit-grant-helper ; do
61 for i in /usr/libexec/polkit-set-default-helper /usr/libexec/polkit-resolve-exe-helper ; do
65 chmod 4754 /usr/libexec/polkit-grant-helper-pam
67 DBUSPID=`pidof dbus-daemon`
68 if [ "x$DBUSPID" != "x" ]; then
69 /etc/init.d/dbus-1 force-reload
74 deluser polkituser || true
75 delgroup polkituser || true
76 rm -f /etc/default/volatiles/98_policykit
77 rm -f /etc/volatile.cache