| 1 |
desktop_conf = configuration_data() |
| 2 |
desktop_conf.set('icon', application_id) |
| 3 |
desktop_file = i18n.merge_file( |
| 4 |
input: configure_file( |
| 5 |
input: files('org.gnome.Connections.desktop.in'), |
| 6 |
output: 'org.gnome.Connections.desktop.in', |
| 7 |
configuration: desktop_conf |
| 8 |
), |
| 9 |
output: '@[email protected]'.format(application_id), |
| 10 |
type: 'desktop', |
| 11 |
po_dir: '../po', |
| 12 |
install: true, |
| 13 |
install_dir: join_paths(get_option('datadir'), 'applications') |
| 14 |
) |
| 15 |
|
| 16 |
desktop_utils = find_program('desktop-file-validate', required: false) |
| 17 |
if desktop_utils.found() |
| 18 |
test('Validate desktop file', desktop_utils, |
| 19 |
args: [desktop_file] |
| 20 |
) |
| 21 |
endif |
| 22 |
|
| 23 |
appstream_conf = configuration_data() |
| 24 |
appstream_conf.set('app-id', application_id) |
| 25 |
appstream_file = i18n.merge_file( |
| 26 |
input: configure_file( |
| 27 |
input: 'org.gnome.Connections.metainfo.xml.in', |
| 28 |
output: 'org.gnome.Connections.metainfo.xml.in', |
| 29 |
configuration: appstream_conf |
| 30 |
), |
| 31 |
output: '@[email protected]'.format(application_id), |
| 32 |
po_dir: '../po', |
| 33 |
install: true, |
| 34 |
install_dir: join_paths(get_option('datadir'), 'metainfo') |
| 35 |
) |
| 36 |
|
| 37 |
appstreamcli = find_program('appstreamcli', required: false) |
| 38 |
if appstreamcli.found() |
| 39 |
test('Validate appstream file', appstreamcli, |
| 40 |
args: ['validate', '--no-net', '--explain', appstream_file] |
| 41 |
) |
| 42 |
endif |
| 43 |
|
| 44 |
dbus_conf = configuration_data() |
| 45 |
dbus_conf.set('bindir', join_paths (get_option ('prefix'), get_option ('bindir'))) |
| 46 |
dbus_conf.set('appid', application_id) |
| 47 |
configure_file( |
| 48 |
input: 'org.gnome.Connections.service.in', |
| 49 |
output: '@[email protected]'.format(application_id), |
| 50 |
configuration: dbus_conf, |
| 51 |
install: true, |
| 52 |
install_dir: join_paths (get_option('datadir'), 'dbus-1', 'services') |
| 53 |
) |
| 54 |
|
| 55 |
# Icons |
| 56 |
icon_dir = join_paths('icons', 'hicolor', 'scalable', 'apps') |
| 57 |
install_data( |
| 58 |
join_paths(icon_dir, '@[email protected]'.format(application_id)), |
| 59 |
install_dir: join_paths(get_option('datadir'), icon_dir), |
| 60 |
rename: '@[email protected]'.format(application_id) |
| 61 |
) |
| 62 |
|
| 63 |
icon_dir = join_paths('icons', 'hicolor', 'symbolic', 'apps') |
| 64 |
install_data( |
| 65 |
join_paths(icon_dir, 'org.gnome.Connections-symbolic.svg'), |
| 66 |
install_dir: join_paths(get_option('datadir'), icon_dir), |
| 67 |
rename: '@[email protected]'.format(application_id) |
| 68 |
) |
| 69 |
|
| 70 |
install_data('org.gnome.Connections.gschema.xml', |
| 71 |
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas') |
| 72 |
) |
| 73 |
|
| 74 |
compile_schemas = find_program('glib-compile-schemas', required: false) |
| 75 |
if compile_schemas.found() |
| 76 |
test('Validate schema file', compile_schemas, |
| 77 |
args: ['--strict', '--dry-run', meson.current_source_dir()] |
| 78 |
) |
| 79 |
endif |
| 80 |
|
| 81 |
install_data('org.gnome.Connections.xml', |
| 82 |
install_dir: join_paths(get_option('datadir'), 'mime', 'packages') |
| 83 |
) |