blob: 6925d71c1bb96924fcee5277890e7e78dfd18370 [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"
Ed Tanous9936f862022-09-19 09:13:20 -070012SRCREV = "1e94e60b4fb6f6e1ebe42eeeeaf52a070ae11c30"
13PV = "1.0+git${SRCPV}"
14PR = "r1"
Rick Altherr68aa1402016-08-01 14:20:50 -070015
Ed Tanous9936f862022-09-19 09:13:20 -070016SRC_URI += "git://github.com/openbmc/phosphor-objmgr;branch=master;protocol=https"
17
Patrick Williams12fc9392021-08-06 09:16:53 -050018SYSTEMD_SERVICE:${PN} += " \
Adriana Kobylakfcaf72e2017-04-11 11:06:59 -050019 mapper-wait@.service \
20 mapper-subtree-remove@.service \
21 "
Brad Bishop83254dc2015-10-27 17:12:45 -040022S = "${WORKDIR}/git"
Brad Bishopea4022a2016-07-26 15:52:01 -040023
Ed Tanous9936f862022-09-19 09:13:20 -070024inherit meson pkgconfig
25inherit obmc-phosphor-dbus-service
26inherit obmc-phosphor-systemd
27inherit phosphor-mapperdir
28
Andrew Geissler3a829bb2021-08-26 15:50:49 +000029EXTRA_OEMESON += "-Dtests=disabled"
William A. Kennington III46225fa2021-06-04 17:50:09 -070030
Ed Tanous9936f862022-09-19 09:13:20 -070031do_install[postfuncs] += "do_emit_env"
32
33PACKAGES_DYNAMIC += "^libmapper.*"
34
35FILES:${PN}:remove = "${libdir}/lib*.so.* ${libdir}/*"
36
Patrick Williams12fc9392021-08-06 09:16:53 -050037python populate_packages:prepend () {
Brad Bishopea4022a2016-07-26 15:52:01 -040038 mapperlibdir = d.getVar("libdir", True)
39 do_split_packages(d, mapperlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Phosphor mapper %s library', extra_depends='', allow_links=True)
40}
Brad Bishop2ad7ce32017-07-09 23:41:49 -040041# 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('-')))
Brad Bishop4f045d02018-10-22 20:48:49 -040049 path = d.getVar('STAGING_DIR_NATIVE', True) + \
Brad Bishop2ad7ce32017-07-09 23:41:49 -040050 d.getVar('interface_dir', True)
51 interfaces = []
52 for i in os.listdir(path):
53 interfaces.append('.'.join(i.split('-')))
Brad Bishop4f045d02018-10-22 20:48:49 -040054 path = d.getVar('STAGING_DIR_NATIVE', True) + \
55 d.getVar('serviceblacklist_dir', True)
56 service_blacklists = []
57 for x in os.listdir(path):
58 service_blacklists.append('.'.join(x.split('-')))
Brad Bishop2ad7ce32017-07-09 23:41:49 -040059 path = [d.getVar('D', True) + d.getVar('envfiledir', True)]
60 path.append('obmc')
61 path.append('mapper')
62 parent = os.path.join(*path[:-1])
63 path = os.path.join(*path)
Brad Bishop2ad7ce32017-07-09 23:41:49 -040064 if not os.path.exists(parent):
65 os.makedirs(parent)
66 with open(path, 'w+') as fd:
Brad Bishop4f045d02018-10-22 20:48:49 -040067 fd.write('MAPPER_SERVICES="{}"'.format(' '.join(services)))
68 fd.write('\n')
Brad Bishop2ad7ce32017-07-09 23:41:49 -040069 fd.write('MAPPER_INTERFACES="{}"'.format(' '.join(interfaces)))
70 fd.write('\n')
Brad Bishop4f045d02018-10-22 20:48:49 -040071 fd.write('MAPPER_SERVICEBLACKLISTS="{}"'.format(' '.join(service_blacklists)))
72 fd.write('\n')
Brad Bishop2ad7ce32017-07-09 23:41:49 -040073}
74
Ed Tanous9936f862022-09-19 09:13:20 -070075DBUS_SERVICE:${PN} += "xyz.openbmc_project.ObjectMapper.service"