blob: 9d8d90a29da5f8947ff2501aed831a986615e121 [file] [log] [blame]
Brad Bishop83254dc2015-10-27 17:12:45 -04001SUMMARY = "Phosphor DBUS Object Manager"
2DESCRIPTION = "Phosphor DBUS object manager."
3HOMEPAGE = "http://github.com/openbmc/phosphor-objmgr"
4PR = "r1"
Patrick Venture3720a742018-10-05 15:08:31 -07005PV = "1.0+git${SRCPV}"
Brad Bishop83254dc2015-10-27 17:12:45 -04006LICENSE = "Apache-2.0"
7LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
8
Andrew Geissler3a829bb2021-08-26 15:50:49 +00009inherit meson pkgconfig
Brad Bishop83254dc2015-10-27 17:12:45 -040010inherit obmc-phosphor-dbus-service
11inherit obmc-phosphor-systemd
Brad Bishop2ad7ce32017-07-09 23:41:49 -040012inherit phosphor-mapperdir
Brad Bishop83254dc2015-10-27 17:12:45 -040013
Brad Bishop5f077512016-08-07 23:18:32 -040014DEPENDS += "systemd"
Andrew Geissler2a90ad92018-10-02 20:40:17 +000015DEPENDS += "boost"
16DEPENDS += "libtinyxml2"
Matt Spinlera469b142017-06-08 12:35:36 -050017DEPENDS += "sdbusplus"
18DEPENDS += "phosphor-logging"
Brad Bishop2ad7ce32017-07-09 23:41:49 -040019DEPENDS += "${PN}-config-native"
Rick Altherr68aa1402016-08-01 14:20:50 -070020
Patrick Williams12fc9392021-08-06 09:16:53 -050021DBUS_SERVICE:${PN} += "xyz.openbmc_project.ObjectMapper.service"
22SYSTEMD_SERVICE:${PN} += " \
Adriana Kobylakfcaf72e2017-04-11 11:06:59 -050023 mapper-wait@.service \
24 mapper-subtree-remove@.service \
25 "
Patrick Williamsbb99d222022-01-24 15:55:09 -060026SRC_URI += "git://github.com/openbmc/phosphor-objmgr;branch=master;protocol=https"
Brad Bishop83254dc2015-10-27 17:12:45 -040027
Andrew Geisslerb0409c02022-01-11 14:50:53 +000028SRCREV = "b15df6b28b97a0887e52d5f5e5899b10475943e1"
Brad Bishop83254dc2015-10-27 17:12:45 -040029
30S = "${WORKDIR}/git"
Brad Bishopea4022a2016-07-26 15:52:01 -040031
Andrew Geissler3a829bb2021-08-26 15:50:49 +000032EXTRA_OEMESON += "-Dtests=disabled"
William A. Kennington III46225fa2021-06-04 17:50:09 -070033
Patrick Williams12fc9392021-08-06 09:16:53 -050034python populate_packages:prepend () {
Brad Bishopea4022a2016-07-26 15:52:01 -040035 mapperlibdir = d.getVar("libdir", True)
36 do_split_packages(d, mapperlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Phosphor mapper %s library', extra_depends='', allow_links=True)
37}
38PACKAGES_DYNAMIC += "^libmapper.*"
Patrick Williams12fc9392021-08-06 09:16:53 -050039FILES:${PN}:remove = "${libdir}/lib*.so.* ${libdir}/*"
Brad Bishop2ad7ce32017-07-09 23:41:49 -040040
41# Construct a systemd environment file with mapper commandline
42# from the native sysroot /usr/share/phosphor-mapper filesystem.
43python do_emit_env() {
44 path = d.getVar('STAGING_DIR_NATIVE', True) + \
Brad Bishop4f045d02018-10-22 20:48:49 -040045 d.getVar('service_dir', True)
46 services = []
47 for s in os.listdir(path):
48 services.append('.'.join(s.split('-')))
49
50 path = d.getVar('STAGING_DIR_NATIVE', True) + \
Brad Bishop2ad7ce32017-07-09 23:41:49 -040051 d.getVar('interface_dir', True)
52 interfaces = []
53 for i in os.listdir(path):
54 interfaces.append('.'.join(i.split('-')))
55
Brad Bishop4f045d02018-10-22 20:48:49 -040056 path = d.getVar('STAGING_DIR_NATIVE', True) + \
57 d.getVar('serviceblacklist_dir', True)
58 service_blacklists = []
59 for x in os.listdir(path):
60 service_blacklists.append('.'.join(x.split('-')))
61
Brad Bishop2ad7ce32017-07-09 23:41:49 -040062 path = [d.getVar('D', True) + d.getVar('envfiledir', True)]
63 path.append('obmc')
64 path.append('mapper')
65 parent = os.path.join(*path[:-1])
66 path = os.path.join(*path)
67
68 if not os.path.exists(parent):
69 os.makedirs(parent)
70 with open(path, 'w+') as fd:
Brad Bishop4f045d02018-10-22 20:48:49 -040071 fd.write('MAPPER_SERVICES="{}"'.format(' '.join(services)))
72 fd.write('\n')
Brad Bishop2ad7ce32017-07-09 23:41:49 -040073 fd.write('MAPPER_INTERFACES="{}"'.format(' '.join(interfaces)))
74 fd.write('\n')
Brad Bishop4f045d02018-10-22 20:48:49 -040075 fd.write('MAPPER_SERVICEBLACKLISTS="{}"'.format(' '.join(service_blacklists)))
76 fd.write('\n')
Brad Bishop2ad7ce32017-07-09 23:41:49 -040077}
78
79do_install[postfuncs] += "do_emit_env"