blob: 9e2eb05c623919ed4a750422900d1b67df9d8568 [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001SUMMARY = "PolicyKit Authorization Framework"
2DESCRIPTION = "The polkit package is an application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes."
3HOMEPAGE = "http://www.freedesktop.org/wiki/Software/polkit"
4LICENSE = "LGPL-2.0-or-later"
5LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb"
6
Patrick Williams03514f12024-04-05 07:04:11 -05007SRC_URI = "git://gitlab.freedesktop.org/polkit/polkit.git;protocol=https;branch=master"
Andrew Geissler517393d2023-01-13 08:55:19 -06008
9S = "${WORKDIR}/git"
Patrick Williamsb58112e2024-03-07 11:16:36 -060010SRCREV = "82f0924dc0eb23b9df68e88dbaf9e07c81940a5a"
Andrew Geissler517393d2023-01-13 08:55:19 -060011
12DEPENDS = "expat glib-2.0"
13
14inherit meson pkgconfig useradd systemd gettext gobject-introspection features_check
15
16REQUIRED_DISTRO_FEATURES = "polkit"
17
18PACKAGECONFIG = " \
19 ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
20 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'consolekit', d)} \
21 dbus \
22 mozjs \
23"
24PACKAGECONFIG[dbus] = ",,dbus"
25PACKAGECONFIG[gtk-doc] = "-Dgtk_doc=true,-Dgtk_doc=false,gtk-doc-native"
26PACKAGECONFIG[pam] = "-Dauthfw=pam,-Dauthfw=shadow,libpam,libpam"
27PACKAGECONFIG[systemd] = "-Dsession_tracking=libsystemd-login,-Dsession_tracking=ConsoleKit,systemd"
28PACKAGECONFIG[consolekit] = ",,,consolekit"
29
30# Default to mozjs javascript library
Patrick Williams169d7bc2024-01-05 11:33:25 -060031PACKAGECONFIG[mozjs] = "-Djs_engine=mozjs,,mozjs-115,,,duktape"
Andrew Geissler517393d2023-01-13 08:55:19 -060032# duktape javascript engine is much smaller and faster but is not compatible with
33# same javascript standards as mozjs. For example array.includes() function is not
34# supported. Test rule compatibility when switching to duktape.
35PACKAGECONFIG[duktape] = "-Djs_engine=duktape,,duktape,,,mozjs"
36
37USERADD_PACKAGES = "${PN}"
38USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 --shell /bin/nologin polkitd"
39
40SYSTEMD_SERVICE:${PN} = "${BPN}.service"
41SYSTEMD_AUTO_ENABLE = "disable"
42
43do_install:append() {
44 #Fix up permissions on polkit rules.d to work with rpm4 constraints
45 chmod 700 ${D}/${datadir}/polkit-1/rules.d
Patrick Williams73bd93f2024-02-20 08:07:48 -060046 chmod 700 ${D}/${sysconfdir}/polkit-1/rules.d
Andrew Geissler517393d2023-01-13 08:55:19 -060047 chown polkitd:root ${D}/${datadir}/polkit-1/rules.d
Patrick Williams73bd93f2024-02-20 08:07:48 -060048 chown polkitd:root ${D}/${sysconfdir}/polkit-1/rules.d
Andrew Geissler517393d2023-01-13 08:55:19 -060049}
50
Patrick Williamsb58112e2024-03-07 11:16:36 -060051FILES:${PN} += " \
52 ${libdir}/pam.d/polkit-1 \
53 ${libdir}/sysusers.d \
54 ${libdir}/polkit-1 \
55 ${nonarch_libdir}/pam.d/polkit-1 \
56 ${nonarch_libdir}/sysusers.d \
57 ${nonarch_libdir}/polkit-1 \
58 ${datadir} \
59"