blob: a7905f0b6d0ef725e895b9b54b8cff7a26e31c60 [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"
Brad Bishop83254dc2015-10-27 17:12:45 -04004LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
Brad Bishop5f077512016-08-07 23:18:32 -04006DEPENDS += "systemd"
Andrew Geissler2a90ad92018-10-02 20:40:17 +00007DEPENDS += "boost"
8DEPENDS += "libtinyxml2"
Matt Spinlera469b142017-06-08 12:35:36 -05009DEPENDS += "sdbusplus"
10DEPENDS += "phosphor-logging"
Brad Bishop2ad7ce32017-07-09 23:41:49 -040011DEPENDS += "${PN}-config-native"
Andrew Geissler164e7412022-09-23 15:00:31 -050012DEPENDS += "cli11"
13SRCREV = "8c243629a9e6866ccac247d74f274b86bc1fad50"
Ed Tanous9936f862022-09-19 09:13:20 -070014PV = "1.0+git${SRCPV}"
15PR = "r1"
Rick Altherr68aa1402016-08-01 14:20:50 -070016
Ed Tanous9936f862022-09-19 09:13:20 -070017SRC_URI += "git://github.com/openbmc/phosphor-objmgr;branch=master;protocol=https"
18
Patrick Williams12fc9392021-08-06 09:16:53 -050019SYSTEMD_SERVICE:${PN} += " \
Adriana Kobylakfcaf72e2017-04-11 11:06:59 -050020 mapper-wait@.service \
21 mapper-subtree-remove@.service \
22 "
Brad Bishop83254dc2015-10-27 17:12:45 -040023S = "${WORKDIR}/git"
Brad Bishopea4022a2016-07-26 15:52:01 -040024
Ed Tanous9936f862022-09-19 09:13:20 -070025inherit meson pkgconfig
26inherit obmc-phosphor-dbus-service
27inherit obmc-phosphor-systemd
28inherit phosphor-mapperdir
29
Andrew Geissler3a829bb2021-08-26 15:50:49 +000030EXTRA_OEMESON += "-Dtests=disabled"
William A. Kennington III46225fa2021-06-04 17:50:09 -070031
Ed Tanous9936f862022-09-19 09:13:20 -070032do_install[postfuncs] += "do_emit_env"
33
34PACKAGES_DYNAMIC += "^libmapper.*"
35
36FILES:${PN}:remove = "${libdir}/lib*.so.* ${libdir}/*"
37
Patrick Williams12fc9392021-08-06 09:16:53 -050038python populate_packages:prepend () {
Brad Bishopea4022a2016-07-26 15:52:01 -040039 mapperlibdir = d.getVar("libdir", True)
40 do_split_packages(d, mapperlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Phosphor mapper %s library', extra_depends='', allow_links=True)
41}
Brad Bishop2ad7ce32017-07-09 23:41:49 -040042# Construct a systemd environment file with mapper commandline
43# from the native sysroot /usr/share/phosphor-mapper filesystem.
44python do_emit_env() {
45 path = d.getVar('STAGING_DIR_NATIVE', True) + \
Brad Bishop4f045d02018-10-22 20:48:49 -040046 d.getVar('service_dir', True)
47 services = []
48 for s in os.listdir(path):
49 services.append('.'.join(s.split('-')))
Brad Bishop4f045d02018-10-22 20:48:49 -040050 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('-')))
Brad Bishop4f045d02018-10-22 20:48:49 -040055 path = d.getVar('STAGING_DIR_NATIVE', True) + \
56 d.getVar('serviceblacklist_dir', True)
57 service_blacklists = []
58 for x in os.listdir(path):
59 service_blacklists.append('.'.join(x.split('-')))
Brad Bishop2ad7ce32017-07-09 23:41:49 -040060 path = [d.getVar('D', True) + d.getVar('envfiledir', True)]
61 path.append('obmc')
62 path.append('mapper')
63 parent = os.path.join(*path[:-1])
64 path = os.path.join(*path)
Brad Bishop2ad7ce32017-07-09 23:41:49 -040065 if not os.path.exists(parent):
66 os.makedirs(parent)
67 with open(path, 'w+') as fd:
Brad Bishop4f045d02018-10-22 20:48:49 -040068 fd.write('MAPPER_SERVICES="{}"'.format(' '.join(services)))
69 fd.write('\n')
Brad Bishop2ad7ce32017-07-09 23:41:49 -040070 fd.write('MAPPER_INTERFACES="{}"'.format(' '.join(interfaces)))
71 fd.write('\n')
Brad Bishop4f045d02018-10-22 20:48:49 -040072 fd.write('MAPPER_SERVICEBLACKLISTS="{}"'.format(' '.join(service_blacklists)))
73 fd.write('\n')
Brad Bishop2ad7ce32017-07-09 23:41:49 -040074}
75
Ed Tanous9936f862022-09-19 09:13:20 -070076DBUS_SERVICE:${PN} += "xyz.openbmc_project.ObjectMapper.service"