xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "Framework for defining and tracking users, login sessions, and seats"
2*4882a593SmuzhiyunDESCRIPTION = "It provides a mechanism for software to react to changes \
3*4882a593Smuzhiyunof any of these items or of any of the metadata associated with them."
4*4882a593SmuzhiyunHOMEPAGE = "http://www.freedesktop.org/wiki/Software/ConsoleKit"
5*4882a593SmuzhiyunBUGTRACKER = "https://bugs.freedesktop.org/buglist.cgi?query_format=specific&product=ConsoleKit"
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunLICENSE = "GPL-2.0-or-later"
8*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
9*4882a593Smuzhiyun                    file://src/main.c;endline=21;md5=0a994e09769780220163255d8f9071c3"
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunDEPENDS = "glib-2.0 glib-2.0-native dbus dbus-glib virtual/libx11"
12*4882a593SmuzhiyunRDEPENDS:${PN} += "base-files"
13*4882a593Smuzhiyun
14*4882a593Smuzhiyuninherit autotools pkgconfig features_check
15*4882a593Smuzhiyun# depends on virtual/libx11
16*4882a593SmuzhiyunREQUIRED_DISTRO_FEATURES = "x11"
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunSRC_URI = "http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-${PV}.tar.xz \
19*4882a593Smuzhiyun           file://sepbuildfix.patch \
20*4882a593Smuzhiyun           file://add-polkit-configure-argument.patch \
21*4882a593Smuzhiyun"
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunSRC_URI[md5sum] = "611792b4d616253a5bdec9175f8b7678"
24*4882a593SmuzhiyunSRC_URI[sha256sum] = "b41d17e06f80059589fbeefe96ad07bcc564c49e65516da1caf975146475565c"
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunS = "${WORKDIR}/ConsoleKit-${PV}"
27*4882a593Smuzhiyun
28*4882a593SmuzhiyunPACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd polkit', d)}"
29*4882a593Smuzhiyun
30*4882a593SmuzhiyunPACKAGECONFIG[pam] = "--enable-pam-module --with-pam-module-dir=${base_libdir}/security,--disable-pam-module,libpam"
31*4882a593SmuzhiyunPACKAGECONFIG[polkit] = "--with-polkit,--without-polkit,polkit"
32*4882a593SmuzhiyunPACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}/,--with-systemdsystemunitdir="
33*4882a593Smuzhiyun
34*4882a593SmuzhiyunFILES:${PN} += "${exec_prefix}/lib/ConsoleKit \
35*4882a593Smuzhiyun                ${libdir}/ConsoleKit  ${systemd_unitdir} ${base_libdir} \
36*4882a593Smuzhiyun                ${datadir}/dbus-1 ${datadir}/PolicyKit ${datadir}/polkit*"
37*4882a593Smuzhiyun
38*4882a593SmuzhiyunPACKAGES =+ "pam-plugin-ck-connector"
39*4882a593SmuzhiyunFILES:pam-plugin-ck-connector += "${base_libdir}/security/*.so"
40*4882a593SmuzhiyunRDEPENDS:pam-plugin-ck-connector += "${PN}"
41*4882a593Smuzhiyun
42*4882a593Smuzhiyundo_install:append() {
43*4882a593Smuzhiyun	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
44*4882a593Smuzhiyun		install -d ${D}${sysconfdir}/tmpfiles.d
45*4882a593Smuzhiyun		echo "d ${localstatedir}/log/ConsoleKit - - - -" \
46*4882a593Smuzhiyun			> ${D}${sysconfdir}/tmpfiles.d/consolekit.conf
47*4882a593Smuzhiyun	fi
48*4882a593Smuzhiyun
49*4882a593Smuzhiyun	# Remove /var/ directories as the daemon creates them as required
50*4882a593Smuzhiyun	rm -rf ${D}${localstatedir}
51*4882a593Smuzhiyun}
52