xf86-video-omapfb: pandora: handle cycle/forcer events better
[openembedded.git] / recipes / policykit / policykit_0.96.bb
1 HOMEPAGE = "http://www.packagekit.org/"
2 DEPENDS = "eggdbus libpam expat dbus-glib intltool-native"
3
4 PR = "r1"
5
6 SRC_URI = "http://hal.freedesktop.org/releases/polkit-${PV}.tar.gz;name=polkit \
7           "
8
9 SRC_URI[polkit.md5sum] = "e0a06da501b04ed3bab986a9df5b5aa2"
10 SRC_URI[polkit.sha256sum] = "3426ca917210b2a5525732559368c18f983a4c39a6a55c5dddba26071bd8054a"
11
12 EXTRA_OECONF = "--with-authfw=pam \
13                 --with-os-type=${DISTRO} \
14                 --disable-man-pages \
15                 --disable-gtk-doc \
16                 --enable-introspection=no \
17 "
18
19 S = "${WORKDIR}/polkit-${PV}"
20
21 inherit autotools pkgconfig
22
23 do_install_append () {
24         install -d ${D}${localstatedir}/run/PolicyKit
25 }
26
27 FILES_${PN} += " ${datadir}/dbus-1 \
28                  ${datadir}/PolicyKit ${datadir}/polkit-1\
29                  ${localstatedir}/run/PolicyKit \
30                  ${libdir}/polkit-1/extensions/*.so \
31 "
32
33 FILES_${PN}-dev += " ${libdir}/polkit-1/extensions/*a"
34
35 pkg_postinst_${PN} () {
36     # can't do this offline
37     if [ "x$D" != "x" ]; then
38         exit 1
39     fi
40     grep "^polkituser:" /etc/group > /dev/null || addgroup polkituser
41     grep "^polkituser:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/run/polkit polkituser --ingroup polkituser -g polkituser 
42
43         # Fix owners
44         for i in /etc/polkit-1/localauthority /var/lib/polkit-1 ; do
45                 mkdir -p $i
46                 chown root $i
47                 chmod 700 $i
48         done
49
50         for i in /usr/libexec/polkit-agent-helper-1 /usr/bin/pkexec ; do
51                 chown root $i
52                 chmod 4755 $i
53         done
54
55         DBUSPID=`pidof dbus-daemon`
56     if [ "x$DBUSPID" != "x" ]; then
57         /etc/init.d/dbus-1 force-reload
58     fi
59 }
60
61 pkg_postrm_${PN} () {
62     deluser polkituser || true
63     delgroup polkituser || true
64 }