blob: d5e91981233c7ab578b795f1cb57b97caf250aa2 [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
Matthew Barth11381c42016-10-05 16:20:54 -05009inherit autotools 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"
Matthew Barth11381c42016-10-05 16:20:54 -050015DEPENDS += "autoconf-archive-native"
Andrew Geissler2a90ad92018-10-02 20:40:17 +000016DEPENDS += "boost"
17DEPENDS += "libtinyxml2"
Matt Spinlera469b142017-06-08 12:35:36 -050018DEPENDS += "sdbusplus"
19DEPENDS += "phosphor-logging"
Brad Bishop2ad7ce32017-07-09 23:41:49 -040020DEPENDS += "${PN}-config-native"
Rick Altherr68aa1402016-08-01 14:20:50 -070021
Brad Bishop59fc7e32016-11-02 15:21:22 -040022DBUS_SERVICE_${PN} += "xyz.openbmc_project.ObjectMapper.service"
Adriana Kobylakfcaf72e2017-04-11 11:06:59 -050023SYSTEMD_SERVICE_${PN} += " \
24 mapper-wait@.service \
25 mapper-subtree-remove@.service \
26 "
Chris Austenb70cb7e2015-12-02 22:32:06 -060027SRC_URI += "git://github.com/openbmc/phosphor-objmgr"
Brad Bishop83254dc2015-10-27 17:12:45 -040028
Andrew Geissler263df7f2021-07-30 16:30:44 +000029SRCREV = "bdaa7f8bb4b34ec4d5f806135364e3ffcc427c0e"
Brad Bishop83254dc2015-10-27 17:12:45 -040030
31S = "${WORKDIR}/git"
Brad Bishopea4022a2016-07-26 15:52:01 -040032
William A. Kennington III46225fa2021-06-04 17:50:09 -070033EXTRA_OECONF += "--disable-tests"
34
Brad Bishopea4022a2016-07-26 15:52:01 -040035python populate_packages_prepend () {
36 mapperlibdir = d.getVar("libdir", True)
37 do_split_packages(d, mapperlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Phosphor mapper %s library', extra_depends='', allow_links=True)
38}
39PACKAGES_DYNAMIC += "^libmapper.*"
40FILES_${PN}_remove = "${libdir}/lib*.so.* ${libdir}/*"
Brad Bishop2ad7ce32017-07-09 23:41:49 -040041
42# 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('-')))
50
51 path = d.getVar('STAGING_DIR_NATIVE', True) + \
Brad Bishop2ad7ce32017-07-09 23:41:49 -040052 d.getVar('interface_dir', True)
53 interfaces = []
54 for i in os.listdir(path):
55 interfaces.append('.'.join(i.split('-')))
56
Brad Bishop4f045d02018-10-22 20:48:49 -040057 path = d.getVar('STAGING_DIR_NATIVE', True) + \
58 d.getVar('serviceblacklist_dir', True)
59 service_blacklists = []
60 for x in os.listdir(path):
61 service_blacklists.append('.'.join(x.split('-')))
62
Brad Bishop2ad7ce32017-07-09 23:41:49 -040063 path = [d.getVar('D', True) + d.getVar('envfiledir', True)]
64 path.append('obmc')
65 path.append('mapper')
66 parent = os.path.join(*path[:-1])
67 path = os.path.join(*path)
68
69 if not os.path.exists(parent):
70 os.makedirs(parent)
71 with open(path, 'w+') as fd:
Brad Bishop4f045d02018-10-22 20:48:49 -040072 fd.write('MAPPER_SERVICES="{}"'.format(' '.join(services)))
73 fd.write('\n')
Brad Bishop2ad7ce32017-07-09 23:41:49 -040074 fd.write('MAPPER_INTERFACES="{}"'.format(' '.join(interfaces)))
75 fd.write('\n')
Brad Bishop4f045d02018-10-22 20:48:49 -040076 fd.write('MAPPER_SERVICEBLACKLISTS="{}"'.format(' '.join(service_blacklists)))
77 fd.write('\n')
Brad Bishop2ad7ce32017-07-09 23:41:49 -040078}
79
80do_install[postfuncs] += "do_emit_env"