blob: 50e6fe5bdea8eff7690d256fef8c079539a1f373 [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
Matthew Barth67cb5a52016-11-16 10:17:02 -060010inherit obmc-phosphor-python-autotools
Brad Bishopce086742015-10-27 17:12:45 -040011inherit obmc-phosphor-dbus-service
12inherit obmc-phosphor-systemd
Brad Bishopf8a7cd12017-07-09 23:41:49 -040013inherit phosphor-mapperdir
Brad Bishopce086742015-10-27 17:12:45 -040014
Brad Bishop48b19612016-08-07 23:18:32 -040015DEPENDS += "systemd"
Matthew Barthe9972912016-10-05 16:20:54 -050016DEPENDS += "autoconf-archive-native"
Andrew Geissler9ece75f2018-10-02 20:40:17 +000017DEPENDS += "boost"
18DEPENDS += "libtinyxml2"
Matt Spinler1b556ae2017-06-08 12:35:36 -050019DEPENDS += "sdbusplus"
20DEPENDS += "phosphor-logging"
Brad Bishopf8a7cd12017-07-09 23:41:49 -040021DEPENDS += "${PN}-config-native"
Rick Altherrc38aae02016-08-01 14:20:50 -070022
Brad Bishop7476cd12016-11-02 15:21:22 -040023DBUS_SERVICE_${PN} += "xyz.openbmc_project.ObjectMapper.service"
Adriana Kobylak545f8742017-04-11 11:06:59 -050024SYSTEMD_SERVICE_${PN} += " \
25 mapper-wait@.service \
26 mapper-subtree-remove@.service \
27 "
Brad Bishopce086742015-10-27 17:12:45 -040028RDEPENDS_${PN} += " \
Brad Bishopf8a7cd12017-07-09 23:41:49 -040029 python-argparse \
Brad Bishopce086742015-10-27 17:12:45 -040030 python-xml \
31 python-dbus \
32 python-pygobject \
Patrick Williamsfee25822017-03-03 12:52:30 -060033 pyphosphor-dbus \
Patrick Venturebe3afaa2017-07-31 10:52:27 -070034 pyphosphor-utils \
Brad Bishopce086742015-10-27 17:12:45 -040035 "
Chris Austen350def12015-12-02 22:32:06 -060036SRC_URI += "git://github.com/openbmc/phosphor-objmgr"
Brad Bishopce086742015-10-27 17:12:45 -040037
Andrew Geissler17fc81b2019-04-09 16:31:54 +000038SRCREV = "686ae77a74a9a8862c6d1ec66938b7fc281211d1"
Brad Bishopce086742015-10-27 17:12:45 -040039
40S = "${WORKDIR}/git"
Brad Bishop9a701b42016-07-26 15:52:01 -040041
Brad Bishop9a701b42016-07-26 15:52:01 -040042python populate_packages_prepend () {
43 mapperlibdir = d.getVar("libdir", True)
44 do_split_packages(d, mapperlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Phosphor mapper %s library', extra_depends='', allow_links=True)
45}
46PACKAGES_DYNAMIC += "^libmapper.*"
47FILES_${PN}_remove = "${libdir}/lib*.so.* ${libdir}/*"
Brad Bishopf8a7cd12017-07-09 23:41:49 -040048
49# Construct a systemd environment file with mapper commandline
50# from the native sysroot /usr/share/phosphor-mapper filesystem.
51python do_emit_env() {
52 path = d.getVar('STAGING_DIR_NATIVE', True) + \
Brad Bishop385c63f2018-10-22 20:48:49 -040053 d.getVar('service_dir', True)
54 services = []
55 for s in os.listdir(path):
56 services.append('.'.join(s.split('-')))
57
58 path = d.getVar('STAGING_DIR_NATIVE', True) + \
Brad Bishopf8a7cd12017-07-09 23:41:49 -040059 d.getVar('interface_dir', True)
60 interfaces = []
61 for i in os.listdir(path):
62 interfaces.append('.'.join(i.split('-')))
63
Brad Bishop385c63f2018-10-22 20:48:49 -040064 path = d.getVar('STAGING_DIR_NATIVE', True) + \
65 d.getVar('serviceblacklist_dir', True)
66 service_blacklists = []
67 for x in os.listdir(path):
68 service_blacklists.append('.'.join(x.split('-')))
69
Brad Bishopf8a7cd12017-07-09 23:41:49 -040070 path = [d.getVar('D', True) + d.getVar('envfiledir', True)]
71 path.append('obmc')
72 path.append('mapper')
73 parent = os.path.join(*path[:-1])
74 path = os.path.join(*path)
75
76 if not os.path.exists(parent):
77 os.makedirs(parent)
78 with open(path, 'w+') as fd:
Brad Bishop385c63f2018-10-22 20:48:49 -040079 fd.write('MAPPER_SERVICES="{}"'.format(' '.join(services)))
80 fd.write('\n')
Brad Bishopf8a7cd12017-07-09 23:41:49 -040081 fd.write('MAPPER_INTERFACES="{}"'.format(' '.join(interfaces)))
82 fd.write('\n')
Brad Bishop385c63f2018-10-22 20:48:49 -040083 fd.write('MAPPER_SERVICEBLACKLISTS="{}"'.format(' '.join(service_blacklists)))
84 fd.write('\n')
Brad Bishopf8a7cd12017-07-09 23:41:49 -040085}
86
87do_install[postfuncs] += "do_emit_env"