blob: f1167b040f195f8726051f8013554376a64c8cec [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
Matthew Barth730ecb82016-11-16 10:17:02 -060010inherit obmc-phosphor-python-autotools
Brad Bishop83254dc2015-10-27 17:12:45 -040011inherit obmc-phosphor-dbus-service
12inherit obmc-phosphor-systemd
Brad Bishop2ad7ce32017-07-09 23:41:49 -040013inherit phosphor-mapperdir
Brad Bishop83254dc2015-10-27 17:12:45 -040014
Brad Bishop5f077512016-08-07 23:18:32 -040015DEPENDS += "systemd"
Matthew Barth11381c42016-10-05 16:20:54 -050016DEPENDS += "autoconf-archive-native"
Andrew Geissler2a90ad92018-10-02 20:40:17 +000017DEPENDS += "boost"
18DEPENDS += "libtinyxml2"
Matt Spinlera469b142017-06-08 12:35:36 -050019DEPENDS += "sdbusplus"
20DEPENDS += "phosphor-logging"
Brad Bishop2ad7ce32017-07-09 23:41:49 -040021DEPENDS += "${PN}-config-native"
Rick Altherr68aa1402016-08-01 14:20:50 -070022
Brad Bishop59fc7e32016-11-02 15:21:22 -040023DBUS_SERVICE_${PN} += "xyz.openbmc_project.ObjectMapper.service"
Adriana Kobylakfcaf72e2017-04-11 11:06:59 -050024SYSTEMD_SERVICE_${PN} += " \
25 mapper-wait@.service \
26 mapper-subtree-remove@.service \
27 "
Matthew Barth11381c42016-10-05 16:20:54 -050028RDEPENDS_libmapper += "libsystemd"
Brad Bishop83254dc2015-10-27 17:12:45 -040029RDEPENDS_${PN} += " \
Brad Bishop2ad7ce32017-07-09 23:41:49 -040030 python-argparse \
Brad Bishop83254dc2015-10-27 17:12:45 -040031 python-xml \
32 python-dbus \
33 python-pygobject \
Patrick Williams73f46432017-03-03 12:52:30 -060034 pyphosphor-dbus \
Patrick Venture082cb892017-07-31 10:52:27 -070035 pyphosphor-utils \
Matt Spinlera469b142017-06-08 12:35:36 -050036 sdbusplus \
37 phosphor-logging \
Brad Bishop83254dc2015-10-27 17:12:45 -040038 "
Chris Austenb70cb7e2015-12-02 22:32:06 -060039SRC_URI += "git://github.com/openbmc/phosphor-objmgr"
Brad Bishop83254dc2015-10-27 17:12:45 -040040
Andrew Geissler34571232019-01-04 21:20:22 +000041SRCREV = "8ce2ddd93c15d8a9358b4e62d2810869a413d3c0"
Brad Bishop83254dc2015-10-27 17:12:45 -040042
43S = "${WORKDIR}/git"
Brad Bishopea4022a2016-07-26 15:52:01 -040044
Brad Bishopea4022a2016-07-26 15:52:01 -040045python populate_packages_prepend () {
46 mapperlibdir = d.getVar("libdir", True)
47 do_split_packages(d, mapperlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Phosphor mapper %s library', extra_depends='', allow_links=True)
48}
49PACKAGES_DYNAMIC += "^libmapper.*"
50FILES_${PN}_remove = "${libdir}/lib*.so.* ${libdir}/*"
Brad Bishop2ad7ce32017-07-09 23:41:49 -040051
52# Construct a systemd environment file with mapper commandline
53# from the native sysroot /usr/share/phosphor-mapper filesystem.
54python do_emit_env() {
55 path = d.getVar('STAGING_DIR_NATIVE', True) + \
Brad Bishop4f045d02018-10-22 20:48:49 -040056 d.getVar('service_dir', True)
57 services = []
58 for s in os.listdir(path):
59 services.append('.'.join(s.split('-')))
60
61 path = d.getVar('STAGING_DIR_NATIVE', True) + \
Brad Bishop2ad7ce32017-07-09 23:41:49 -040062 d.getVar('interface_dir', True)
63 interfaces = []
64 for i in os.listdir(path):
65 interfaces.append('.'.join(i.split('-')))
66
Brad Bishop4f045d02018-10-22 20:48:49 -040067 path = d.getVar('STAGING_DIR_NATIVE', True) + \
68 d.getVar('serviceblacklist_dir', True)
69 service_blacklists = []
70 for x in os.listdir(path):
71 service_blacklists.append('.'.join(x.split('-')))
72
Brad Bishop2ad7ce32017-07-09 23:41:49 -040073 path = [d.getVar('D', True) + d.getVar('envfiledir', True)]
74 path.append('obmc')
75 path.append('mapper')
76 parent = os.path.join(*path[:-1])
77 path = os.path.join(*path)
78
79 if not os.path.exists(parent):
80 os.makedirs(parent)
81 with open(path, 'w+') as fd:
Brad Bishop4f045d02018-10-22 20:48:49 -040082 fd.write('MAPPER_SERVICES="{}"'.format(' '.join(services)))
83 fd.write('\n')
Brad Bishop2ad7ce32017-07-09 23:41:49 -040084 fd.write('MAPPER_INTERFACES="{}"'.format(' '.join(interfaces)))
85 fd.write('\n')
Brad Bishop4f045d02018-10-22 20:48:49 -040086 fd.write('MAPPER_SERVICEBLACKLISTS="{}"'.format(' '.join(service_blacklists)))
87 fd.write('\n')
Brad Bishop2ad7ce32017-07-09 23:41:49 -040088}
89
90do_install[postfuncs] += "do_emit_env"