Brad Bishop | 9ee75e1 | 2015-09-17 16:39:49 -0400 | [diff] [blame] | 1 | # Common code for applications providing a D-Bus service. |
| 2 | |
| 3 | # Class users should define DBUS_SERVICES prior to including. |
| 4 | |
| 5 | python() { |
| 6 | services = d.getVar('DBUS_SERVICES', True).split() |
| 7 | uris = " ".join( [ 'file://' + s + '.conf' for s in services ] ) |
| 8 | d.appendVar('SRC_URI', uris) |
| 9 | } |
| 10 | |
| 11 | do_install_append() { |
| 12 | # install the service configuration files |
| 13 | install -d ${D}${sysconfdir}/dbus-1/system.d |
| 14 | for s in ${DBUS_SERVICES}; do |
| 15 | install ${WORKDIR}/$s.conf ${D}${sysconfdir}/dbus-1/system.d/$s.conf |
| 16 | done |
| 17 | } |