1*4882a593SmuzhiyunSUMMARY = "PolicyKit Authorization Framework" 2*4882a593SmuzhiyunDESCRIPTION = "The polkit package is an application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes." 3*4882a593SmuzhiyunHOMEPAGE = "http://www.freedesktop.org/wiki/Software/polkit" 4*4882a593SmuzhiyunLICENSE = "LGPL-2.0-or-later" 5*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb \ 6*4882a593Smuzhiyun file://src/polkit/polkit.h;beginline=1;endline=20;md5=0a8630b0133176d0504c87a0ded39db4" 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunDEPENDS = "expat glib-2.0 intltool-native duktape" 9*4882a593Smuzhiyun 10*4882a593Smuzhiyuninherit autotools gtk-doc pkgconfig useradd systemd gobject-introspection features_check 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunREQUIRED_DISTRO_FEATURES = "polkit" 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunPACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ 15*4882a593Smuzhiyun ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', \ 16*4882a593Smuzhiyun bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \ 17*4882a593Smuzhiyun " 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunPACKAGECONFIG[pam] = "--with-authfw=pam,--with-authfw=shadow,libpam,libpam" 20*4882a593SmuzhiyunPACKAGECONFIG[systemd] = "--enable-libsystemd-login=yes --with-systemdsystemunitdir=${systemd_unitdir}/system/,--enable-libsystemd-login=no --with-systemdsystemunitdir=,systemd" 21*4882a593Smuzhiyun# there is no --enable/--disable option for consolekit and it's not picked by shlibs, so add it to RDEPENDS 22*4882a593SmuzhiyunPACKAGECONFIG[consolekit] = ",,,consolekit" 23*4882a593Smuzhiyun 24*4882a593SmuzhiyunPAM_SRC_URI = "file://polkit-1_pam.patch" 25*4882a593SmuzhiyunSRC_URI = "http://www.freedesktop.org/software/polkit/releases/polkit-${PV}.tar.gz \ 26*4882a593Smuzhiyun ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ 27*4882a593Smuzhiyun file://0001-pkexec-local-privilege-escalation-CVE-2021-4034.patch \ 28*4882a593Smuzhiyun file://0002-CVE-2021-4115-GHSL-2021-077-fix.patch \ 29*4882a593Smuzhiyun file://0003-Added-support-for-duktape-as-JS-engine.patch \ 30*4882a593Smuzhiyun file://0004-Make-netgroup-support-optional.patch \ 31*4882a593Smuzhiyun " 32*4882a593SmuzhiyunSRC_URI[sha256sum] = "c8579fdb86e94295404211285fee0722ad04893f0213e571bd75c00972fd1f5c" 33*4882a593Smuzhiyun 34*4882a593SmuzhiyunEXTRA_OECONF = "--with-os-type=moblin \ 35*4882a593Smuzhiyun --disable-man-pages \ 36*4882a593Smuzhiyun --disable-libelogind \ 37*4882a593Smuzhiyun --with-duktape \ 38*4882a593Smuzhiyun " 39*4882a593Smuzhiyun 40*4882a593Smuzhiyundo_configure:prepend () { 41*4882a593Smuzhiyun rm -f ${S}/buildutil/lt*.m4 ${S}/buildutil/libtool.m4 42*4882a593Smuzhiyun} 43*4882a593Smuzhiyun 44*4882a593Smuzhiyundo_compile:prepend () { 45*4882a593Smuzhiyun export GIR_EXTRA_LIBS_PATH="${B}/src/polkit/.libs" 46*4882a593Smuzhiyun} 47*4882a593Smuzhiyun 48*4882a593SmuzhiyunPACKAGES =+ "${PN}-examples" 49*4882a593Smuzhiyun 50*4882a593SmuzhiyunFILES:${PN}:append = " \ 51*4882a593Smuzhiyun ${libdir}/${BPN}-1 \ 52*4882a593Smuzhiyun ${nonarch_libdir}/${BPN}-1 \ 53*4882a593Smuzhiyun ${datadir}/dbus-1 \ 54*4882a593Smuzhiyun ${datadir}/${BPN}-1 \ 55*4882a593Smuzhiyun ${datadir}/gettext \ 56*4882a593Smuzhiyun" 57*4882a593Smuzhiyun 58*4882a593SmuzhiyunFILES:${PN}-examples = "${bindir}/*example*" 59*4882a593Smuzhiyun 60*4882a593SmuzhiyunUSERADD_PACKAGES = "${PN}" 61*4882a593SmuzhiyunUSERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/${BPN}-1 --shell /bin/nologin polkitd" 62*4882a593Smuzhiyun 63*4882a593SmuzhiyunSYSTEMD_SERVICE:${PN} = "${BPN}.service" 64*4882a593SmuzhiyunSYSTEMD_AUTO_ENABLE = "disable" 65