| Brad Bishop | ce08674 | 2015-10-27 17:12:45 -0400 | [diff] [blame] | 1 | SUMMARY = "Phosphor DBUS Object Manager" | 
|  | 2 | DESCRIPTION = "Phosphor DBUS object manager." | 
|  | 3 | HOMEPAGE = "http://github.com/openbmc/phosphor-objmgr" | 
|  | 4 | PR = "r1" | 
|  | 5 | LICENSE = "Apache-2.0" | 
|  | 6 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc" | 
|  | 7 |  | 
| Matthew Barth | e997291 | 2016-10-05 16:20:54 -0500 | [diff] [blame] | 8 | inherit autotools pkgconfig | 
| Matthew Barth | 67cb5a5 | 2016-11-16 10:17:02 -0600 | [diff] [blame] | 9 | inherit obmc-phosphor-python-autotools | 
| Brad Bishop | ce08674 | 2015-10-27 17:12:45 -0400 | [diff] [blame] | 10 | inherit obmc-phosphor-dbus-service | 
|  | 11 | inherit obmc-phosphor-systemd | 
| Brad Bishop | f8a7cd1 | 2017-07-09 23:41:49 -0400 | [diff] [blame] | 12 | inherit phosphor-mapperdir | 
| Brad Bishop | ce08674 | 2015-10-27 17:12:45 -0400 | [diff] [blame] | 13 |  | 
| Brad Bishop | 48b1961 | 2016-08-07 23:18:32 -0400 | [diff] [blame] | 14 | DEPENDS += "systemd" | 
| Matthew Barth | e997291 | 2016-10-05 16:20:54 -0500 | [diff] [blame] | 15 | DEPENDS += "autoconf-archive-native" | 
| Andrew Geissler | 9ece75f | 2018-10-02 20:40:17 +0000 | [diff] [blame] | 16 | DEPENDS += "boost" | 
|  | 17 | DEPENDS += "libtinyxml2" | 
| Matt Spinler | 1b556ae | 2017-06-08 12:35:36 -0500 | [diff] [blame] | 18 | DEPENDS += "sdbusplus" | 
|  | 19 | DEPENDS += "phosphor-logging" | 
| Brad Bishop | f8a7cd1 | 2017-07-09 23:41:49 -0400 | [diff] [blame] | 20 | DEPENDS += "${PN}-config-native" | 
| Rick Altherr | c38aae0 | 2016-08-01 14:20:50 -0700 | [diff] [blame] | 21 |  | 
| Brad Bishop | 7476cd1 | 2016-11-02 15:21:22 -0400 | [diff] [blame] | 22 | DBUS_SERVICE_${PN} += "xyz.openbmc_project.ObjectMapper.service" | 
| Adriana Kobylak | 545f874 | 2017-04-11 11:06:59 -0500 | [diff] [blame] | 23 | SYSTEMD_SERVICE_${PN} += " \ | 
|  | 24 | mapper-wait@.service \ | 
|  | 25 | mapper-subtree-remove@.service \ | 
|  | 26 | " | 
| Matthew Barth | e997291 | 2016-10-05 16:20:54 -0500 | [diff] [blame] | 27 | RDEPENDS_libmapper += "libsystemd" | 
| Brad Bishop | ce08674 | 2015-10-27 17:12:45 -0400 | [diff] [blame] | 28 | RDEPENDS_${PN} += " \ | 
| Brad Bishop | f8a7cd1 | 2017-07-09 23:41:49 -0400 | [diff] [blame] | 29 | python-argparse \ | 
| Brad Bishop | ce08674 | 2015-10-27 17:12:45 -0400 | [diff] [blame] | 30 | python-xml \ | 
|  | 31 | python-dbus \ | 
|  | 32 | python-pygobject \ | 
| Patrick Williams | fee2582 | 2017-03-03 12:52:30 -0600 | [diff] [blame] | 33 | pyphosphor-dbus \ | 
| Patrick Venture | be3afaa | 2017-07-31 10:52:27 -0700 | [diff] [blame] | 34 | pyphosphor-utils \ | 
| Matt Spinler | 1b556ae | 2017-06-08 12:35:36 -0500 | [diff] [blame] | 35 | sdbusplus \ | 
|  | 36 | phosphor-logging \ | 
| Brad Bishop | ce08674 | 2015-10-27 17:12:45 -0400 | [diff] [blame] | 37 | " | 
| Chris Austen | 350def1 | 2015-12-02 22:32:06 -0600 | [diff] [blame] | 38 | SRC_URI += "git://github.com/openbmc/phosphor-objmgr" | 
| Brad Bishop | ce08674 | 2015-10-27 17:12:45 -0400 | [diff] [blame] | 39 |  | 
| Andrew Geissler | e5cfdf7 | 2018-10-04 19:40:16 +0000 | [diff] [blame] | 40 | SRCREV = "a493615230bd5e00d8bc5345f556a884448540cb" | 
| Brad Bishop | ce08674 | 2015-10-27 17:12:45 -0400 | [diff] [blame] | 41 |  | 
|  | 42 | S = "${WORKDIR}/git" | 
| Brad Bishop | 9a701b4 | 2016-07-26 15:52:01 -0400 | [diff] [blame] | 43 |  | 
| Brad Bishop | 9a701b4 | 2016-07-26 15:52:01 -0400 | [diff] [blame] | 44 | python populate_packages_prepend () { | 
|  | 45 | mapperlibdir = d.getVar("libdir", True) | 
|  | 46 | do_split_packages(d, mapperlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Phosphor mapper %s library', extra_depends='', allow_links=True) | 
|  | 47 | } | 
|  | 48 | PACKAGES_DYNAMIC += "^libmapper.*" | 
|  | 49 | FILES_${PN}_remove = "${libdir}/lib*.so.* ${libdir}/*" | 
| Brad Bishop | f8a7cd1 | 2017-07-09 23:41:49 -0400 | [diff] [blame] | 50 |  | 
|  | 51 | # Construct a systemd environment file with mapper commandline | 
|  | 52 | # from the native sysroot /usr/share/phosphor-mapper filesystem. | 
|  | 53 | python do_emit_env() { | 
|  | 54 | path = d.getVar('STAGING_DIR_NATIVE', True) + \ | 
|  | 55 | d.getVar('namespace_dir', True) | 
|  | 56 | paths = [] | 
|  | 57 | for p in os.listdir(path): | 
| Brad Bishop | b4eea30 | 2017-08-03 15:56:09 -0400 | [diff] [blame] | 58 | paths.append(os.sep.join(p.split('-'))) | 
| Brad Bishop | f8a7cd1 | 2017-07-09 23:41:49 -0400 | [diff] [blame] | 59 |  | 
|  | 60 | path = d.getVar('STAGING_DIR_NATIVE', True) + \ | 
|  | 61 | d.getVar('interface_dir', True) | 
|  | 62 | interfaces = [] | 
|  | 63 | for i in os.listdir(path): | 
|  | 64 | interfaces.append('.'.join(i.split('-'))) | 
|  | 65 |  | 
|  | 66 | path = d.getVar('STAGING_DIR_NATIVE', True) + \ | 
|  | 67 | d.getVar('blacklist_dir', True) | 
|  | 68 | blacklists = [] | 
|  | 69 | for b in os.listdir(path): | 
|  | 70 | blacklists.append(os.sep + os.sep.join(b.split('-'))) | 
|  | 71 |  | 
|  | 72 | path = d.getVar('STAGING_DIR_NATIVE', True) + \ | 
|  | 73 | d.getVar('interfaceblacklist_dir', True) | 
|  | 74 | interface_blacklists = [] | 
|  | 75 | for ib in os.listdir(path): | 
|  | 76 | interface_blacklists.append('.'.join(ib.split('-'))) | 
|  | 77 |  | 
|  | 78 | path = [d.getVar('D', True) + d.getVar('envfiledir', True)] | 
|  | 79 | path.append('obmc') | 
|  | 80 | path.append('mapper') | 
|  | 81 | parent = os.path.join(*path[:-1]) | 
|  | 82 | path = os.path.join(*path) | 
|  | 83 |  | 
|  | 84 | if not os.path.exists(parent): | 
|  | 85 | os.makedirs(parent) | 
|  | 86 | with open(path, 'w+') as fd: | 
|  | 87 | fd.write('MAPPER_NAMESPACES="{}"'.format(' '.join(paths))) | 
|  | 88 | fd.write('\n') | 
|  | 89 | fd.write('MAPPER_INTERFACES="{}"'.format(' '.join(interfaces))) | 
|  | 90 | fd.write('\n') | 
|  | 91 | fd.write('MAPPER_BLACKLISTS="{}"'.format(' '.join(blacklists))) | 
|  | 92 | fd.write('\n') | 
|  | 93 | fd.write('MAPPER_INTERFACEBLACKLISTS="{}"'.format(' '.join(interface_blacklists))) | 
|  | 94 | fd.write('\n') | 
|  | 95 | } | 
|  | 96 |  | 
|  | 97 | do_install[postfuncs] += "do_emit_env" | 
|  | 98 | do_install[vardeps] += "PHOSPHOR_MAPPER_NAMESPACES" |