Brad Bishop | 83254dc | 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" |
Brad Bishop | 83254dc | 2015-10-27 17:12:45 -0400 | [diff] [blame] | 4 | LICENSE = "Apache-2.0" |
| 5 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc" |
Brad Bishop | 5f07751 | 2016-08-07 23:18:32 -0400 | [diff] [blame] | 6 | DEPENDS += "systemd" |
Andrew Geissler | 2a90ad9 | 2018-10-02 20:40:17 +0000 | [diff] [blame] | 7 | DEPENDS += "boost" |
| 8 | DEPENDS += "libtinyxml2" |
Matt Spinler | a469b14 | 2017-06-08 12:35:36 -0500 | [diff] [blame] | 9 | DEPENDS += "sdbusplus" |
| 10 | DEPENDS += "phosphor-logging" |
Brad Bishop | 2ad7ce3 | 2017-07-09 23:41:49 -0400 | [diff] [blame] | 11 | DEPENDS += "${PN}-config-native" |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame^] | 12 | SRCREV = "1e94e60b4fb6f6e1ebe42eeeeaf52a070ae11c30" |
| 13 | PV = "1.0+git${SRCPV}" |
| 14 | PR = "r1" |
Rick Altherr | 68aa140 | 2016-08-01 14:20:50 -0700 | [diff] [blame] | 15 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame^] | 16 | SRC_URI += "git://github.com/openbmc/phosphor-objmgr;branch=master;protocol=https" |
| 17 | |
Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -0500 | [diff] [blame] | 18 | SYSTEMD_SERVICE:${PN} += " \ |
Adriana Kobylak | fcaf72e | 2017-04-11 11:06:59 -0500 | [diff] [blame] | 19 | mapper-wait@.service \ |
| 20 | mapper-subtree-remove@.service \ |
| 21 | " |
Brad Bishop | 83254dc | 2015-10-27 17:12:45 -0400 | [diff] [blame] | 22 | S = "${WORKDIR}/git" |
Brad Bishop | ea4022a | 2016-07-26 15:52:01 -0400 | [diff] [blame] | 23 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame^] | 24 | inherit meson pkgconfig |
| 25 | inherit obmc-phosphor-dbus-service |
| 26 | inherit obmc-phosphor-systemd |
| 27 | inherit phosphor-mapperdir |
| 28 | |
Andrew Geissler | 3a829bb | 2021-08-26 15:50:49 +0000 | [diff] [blame] | 29 | EXTRA_OEMESON += "-Dtests=disabled" |
William A. Kennington III | 46225fa | 2021-06-04 17:50:09 -0700 | [diff] [blame] | 30 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame^] | 31 | do_install[postfuncs] += "do_emit_env" |
| 32 | |
| 33 | PACKAGES_DYNAMIC += "^libmapper.*" |
| 34 | |
| 35 | FILES:${PN}:remove = "${libdir}/lib*.so.* ${libdir}/*" |
| 36 | |
Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -0500 | [diff] [blame] | 37 | python populate_packages:prepend () { |
Brad Bishop | ea4022a | 2016-07-26 15:52:01 -0400 | [diff] [blame] | 38 | mapperlibdir = d.getVar("libdir", True) |
| 39 | do_split_packages(d, mapperlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Phosphor mapper %s library', extra_depends='', allow_links=True) |
| 40 | } |
Brad Bishop | 2ad7ce3 | 2017-07-09 23:41:49 -0400 | [diff] [blame] | 41 | # Construct a systemd environment file with mapper commandline |
| 42 | # from the native sysroot /usr/share/phosphor-mapper filesystem. |
| 43 | python do_emit_env() { |
| 44 | path = d.getVar('STAGING_DIR_NATIVE', True) + \ |
Brad Bishop | 4f045d0 | 2018-10-22 20:48:49 -0400 | [diff] [blame] | 45 | d.getVar('service_dir', True) |
| 46 | services = [] |
| 47 | for s in os.listdir(path): |
| 48 | services.append('.'.join(s.split('-'))) |
Brad Bishop | 4f045d0 | 2018-10-22 20:48:49 -0400 | [diff] [blame] | 49 | path = d.getVar('STAGING_DIR_NATIVE', True) + \ |
Brad Bishop | 2ad7ce3 | 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('-'))) |
Brad Bishop | 4f045d0 | 2018-10-22 20:48:49 -0400 | [diff] [blame] | 54 | path = d.getVar('STAGING_DIR_NATIVE', True) + \ |
| 55 | d.getVar('serviceblacklist_dir', True) |
| 56 | service_blacklists = [] |
| 57 | for x in os.listdir(path): |
| 58 | service_blacklists.append('.'.join(x.split('-'))) |
Brad Bishop | 2ad7ce3 | 2017-07-09 23:41:49 -0400 | [diff] [blame] | 59 | path = [d.getVar('D', True) + d.getVar('envfiledir', True)] |
| 60 | path.append('obmc') |
| 61 | path.append('mapper') |
| 62 | parent = os.path.join(*path[:-1]) |
| 63 | path = os.path.join(*path) |
Brad Bishop | 2ad7ce3 | 2017-07-09 23:41:49 -0400 | [diff] [blame] | 64 | if not os.path.exists(parent): |
| 65 | os.makedirs(parent) |
| 66 | with open(path, 'w+') as fd: |
Brad Bishop | 4f045d0 | 2018-10-22 20:48:49 -0400 | [diff] [blame] | 67 | fd.write('MAPPER_SERVICES="{}"'.format(' '.join(services))) |
| 68 | fd.write('\n') |
Brad Bishop | 2ad7ce3 | 2017-07-09 23:41:49 -0400 | [diff] [blame] | 69 | fd.write('MAPPER_INTERFACES="{}"'.format(' '.join(interfaces))) |
| 70 | fd.write('\n') |
Brad Bishop | 4f045d0 | 2018-10-22 20:48:49 -0400 | [diff] [blame] | 71 | fd.write('MAPPER_SERVICEBLACKLISTS="{}"'.format(' '.join(service_blacklists))) |
| 72 | fd.write('\n') |
Brad Bishop | 2ad7ce3 | 2017-07-09 23:41:49 -0400 | [diff] [blame] | 73 | } |
| 74 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame^] | 75 | DBUS_SERVICE:${PN} += "xyz.openbmc_project.ObjectMapper.service" |