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() { |
Brad Bishop | f691a18 | 2015-09-21 17:07:52 -0400 | [diff] [blame] | 6 | services = d.getVar('DBUS_SERVICES', True) |
| 7 | if services: |
| 8 | uris = " ".join( [ 'file://' + s + '.conf' for s in services.split() ] ) |
| 9 | d.appendVar('SRC_URI', uris) |
Brad Bishop | 9ee75e1 | 2015-09-17 16:39:49 -0400 | [diff] [blame] | 10 | } |
| 11 | |
| 12 | do_install_append() { |
| 13 | # install the service configuration files |
| 14 | install -d ${D}${sysconfdir}/dbus-1/system.d |
| 15 | for s in ${DBUS_SERVICES}; do |
| 16 | install ${WORKDIR}/$s.conf ${D}${sysconfdir}/dbus-1/system.d/$s.conf |
| 17 | done |
| 18 | } |