blob: df8e636b35e261b9632f4b5a9077dcc3a6e3abd7 [file] [log] [blame]
Brad Bishopce086742015-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 Venture90b2a3f2018-10-05 15:08:31 -07005PV = "1.0+git${SRCPV}"
Brad Bishopce086742015-10-27 17:12:45 -04006LICENSE = "Apache-2.0"
7LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
8
Matthew Barthe9972912016-10-05 16:20:54 -05009inherit autotools pkgconfig
Brad Bishopce086742015-10-27 17:12:45 -040010inherit obmc-phosphor-dbus-service
11inherit obmc-phosphor-systemd
Brad Bishopf8a7cd12017-07-09 23:41:49 -040012inherit phosphor-mapperdir
Brad Bishopce086742015-10-27 17:12:45 -040013
Brad Bishop48b19612016-08-07 23:18:32 -040014DEPENDS += "systemd"
Matthew Barthe9972912016-10-05 16:20:54 -050015DEPENDS += "autoconf-archive-native"
Andrew Geissler9ece75f2018-10-02 20:40:17 +000016DEPENDS += "boost"
17DEPENDS += "libtinyxml2"
Matt Spinler1b556ae2017-06-08 12:35:36 -050018DEPENDS += "sdbusplus"
19DEPENDS += "phosphor-logging"
Brad Bishopf8a7cd12017-07-09 23:41:49 -040020DEPENDS += "${PN}-config-native"
Rick Altherrc38aae02016-08-01 14:20:50 -070021
Brad Bishop7476cd12016-11-02 15:21:22 -040022DBUS_SERVICE_${PN} += "xyz.openbmc_project.ObjectMapper.service"
Adriana Kobylak545f8742017-04-11 11:06:59 -050023SYSTEMD_SERVICE_${PN} += " \
24 mapper-wait@.service \
25 mapper-subtree-remove@.service \
26 "
Chris Austen350def12015-12-02 22:32:06 -060027SRC_URI += "git://github.com/openbmc/phosphor-objmgr"
Brad Bishopce086742015-10-27 17:12:45 -040028
Andrew Geissler717b1152020-04-29 18:21:02 +000029SRCREV = "5592202fa6f28040518391c2ef2b7d55ce2da16b"
Brad Bishopce086742015-10-27 17:12:45 -040030
31S = "${WORKDIR}/git"
Brad Bishop9a701b42016-07-26 15:52:01 -040032
Brad Bishop9a701b42016-07-26 15:52:01 -040033python populate_packages_prepend () {
34 mapperlibdir = d.getVar("libdir", True)
35 do_split_packages(d, mapperlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Phosphor mapper %s library', extra_depends='', allow_links=True)
36}
37PACKAGES_DYNAMIC += "^libmapper.*"
38FILES_${PN}_remove = "${libdir}/lib*.so.* ${libdir}/*"
Brad Bishopf8a7cd12017-07-09 23:41:49 -040039
40# Construct a systemd environment file with mapper commandline
41# from the native sysroot /usr/share/phosphor-mapper filesystem.
42python do_emit_env() {
43 path = d.getVar('STAGING_DIR_NATIVE', True) + \
Brad Bishop385c63f2018-10-22 20:48:49 -040044 d.getVar('service_dir', True)
45 services = []
46 for s in os.listdir(path):
47 services.append('.'.join(s.split('-')))
48
49 path = d.getVar('STAGING_DIR_NATIVE', True) + \
Brad Bishopf8a7cd12017-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('-')))
54
Brad Bishop385c63f2018-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('-')))
60
Brad Bishopf8a7cd12017-07-09 23:41:49 -040061 path = [d.getVar('D', True) + d.getVar('envfiledir', True)]
62 path.append('obmc')
63 path.append('mapper')
64 parent = os.path.join(*path[:-1])
65 path = os.path.join(*path)
66
67 if not os.path.exists(parent):
68 os.makedirs(parent)
69 with open(path, 'w+') as fd:
Brad Bishop385c63f2018-10-22 20:48:49 -040070 fd.write('MAPPER_SERVICES="{}"'.format(' '.join(services)))
71 fd.write('\n')
Brad Bishopf8a7cd12017-07-09 23:41:49 -040072 fd.write('MAPPER_INTERFACES="{}"'.format(' '.join(interfaces)))
73 fd.write('\n')
Brad Bishop385c63f2018-10-22 20:48:49 -040074 fd.write('MAPPER_SERVICEBLACKLISTS="{}"'.format(' '.join(service_blacklists)))
75 fd.write('\n')
Brad Bishopf8a7cd12017-07-09 23:41:49 -040076}
77
78do_install[postfuncs] += "do_emit_env"