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