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 |
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 | " |
Chris Austen | 350def1 | 2015-12-02 22:32:06 -0600 | [diff] [blame] | 27 | SRC_URI += "git://github.com/openbmc/phosphor-objmgr" |
Brad Bishop | ce08674 | 2015-10-27 17:12:45 -0400 | [diff] [blame] | 28 | |
Andrew Geissler | 6da3b93 | 2020-05-14 13:51:16 +0000 | [diff] [blame^] | 29 | SRCREV = "2bb2d6bad2e72675f0ab39f230cadfb9dc5eed14" |
Brad Bishop | ce08674 | 2015-10-27 17:12:45 -0400 | [diff] [blame] | 30 | |
| 31 | S = "${WORKDIR}/git" |
Brad Bishop | 9a701b4 | 2016-07-26 15:52:01 -0400 | [diff] [blame] | 32 | |
Brad Bishop | 9a701b4 | 2016-07-26 15:52:01 -0400 | [diff] [blame] | 33 | python 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 | } |
| 37 | PACKAGES_DYNAMIC += "^libmapper.*" |
| 38 | FILES_${PN}_remove = "${libdir}/lib*.so.* ${libdir}/*" |
Brad Bishop | f8a7cd1 | 2017-07-09 23:41:49 -0400 | [diff] [blame] | 39 | |
| 40 | # Construct a systemd environment file with mapper commandline |
| 41 | # from the native sysroot /usr/share/phosphor-mapper filesystem. |
| 42 | python do_emit_env() { |
| 43 | path = d.getVar('STAGING_DIR_NATIVE', True) + \ |
Brad Bishop | 385c63f | 2018-10-22 20:48:49 -0400 | [diff] [blame] | 44 | 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 Bishop | f8a7cd1 | 2017-07-09 23:41:49 -0400 | [diff] [blame] | 50 | d.getVar('interface_dir', True) |
| 51 | interfaces = [] |
| 52 | for i in os.listdir(path): |
| 53 | interfaces.append('.'.join(i.split('-'))) |
| 54 | |
Brad Bishop | 385c63f | 2018-10-22 20:48:49 -0400 | [diff] [blame] | 55 | 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 Bishop | f8a7cd1 | 2017-07-09 23:41:49 -0400 | [diff] [blame] | 61 | 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 Bishop | 385c63f | 2018-10-22 20:48:49 -0400 | [diff] [blame] | 70 | fd.write('MAPPER_SERVICES="{}"'.format(' '.join(services))) |
| 71 | fd.write('\n') |
Brad Bishop | f8a7cd1 | 2017-07-09 23:41:49 -0400 | [diff] [blame] | 72 | fd.write('MAPPER_INTERFACES="{}"'.format(' '.join(interfaces))) |
| 73 | fd.write('\n') |
Brad Bishop | 385c63f | 2018-10-22 20:48:49 -0400 | [diff] [blame] | 74 | fd.write('MAPPER_SERVICEBLACKLISTS="{}"'.format(' '.join(service_blacklists))) |
| 75 | fd.write('\n') |
Brad Bishop | f8a7cd1 | 2017-07-09 23:41:49 -0400 | [diff] [blame] | 76 | } |
| 77 | |
| 78 | do_install[postfuncs] += "do_emit_env" |