1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
#
# Desktop files
#
desktop_output = []
desktop_conf = configuration_data()
desktop_conf.set('appid', geary_id)
desktop_file = i18n.merge_file(
input: configure_file(
input: 'org.gnome.Geary.desktop.in.in',
output: 'org.gnome.Geary.desktop.in',
configuration: desktop_conf
),
output: '@0@.desktop'.format(geary_id),
type: 'desktop',
po_dir: po_dir,
install: true,
install_dir: join_paths(data_dir, 'applications')
)
desktop_output += desktop_file
autostart_file = i18n.merge_file(
input: configure_file(
input: 'geary-autostart.desktop.in.in',
output: 'geary-autostart.desktop.in',
configuration: desktop_conf
),
output: 'geary-autostart.desktop',
type: 'desktop',
po_dir: po_dir,
install: true,
install_dir: join_paths(data_dir, 'applications')
)
desktop_output += autostart_file
foreach desktop_file: desktop_output
if desktop_file_validate.found()
test(
'desktop-file-validate',
desktop_file_validate,
args: [ desktop_file.full_path() ],
depends: [
desktop_file,
]
)
endif
endforeach
#
# Appdata file
#
appdata_file = 'org.gnome.Geary.appdata.xml'
appdata_merged = i18n.merge_file(
input: configure_file(
input: appdata_file + '.in.in',
output: appdata_file + '.in',
configuration: desktop_conf
),
output: '@0@.appdata.xml'.format(geary_id),
type: 'xml',
po_dir: po_dir,
install: true,
install_dir: join_paths(data_dir, 'metainfo')
)
if appstreamcli.found()
test(
appdata_file + '-validate',
appstreamcli,
args: [
'validate', '--no-net', '--explain', appdata_merged.full_path()
],
depends: [
appdata_merged,
]
)
endif
#
# Contractor file (Elementary OS)
#
if get_option('contractor').enabled()
# Call msgfmt manually since gettext won't otherwise translate the
# Description field. See merge req !50.
msgfmt = find_program('msgfmt')
custom_target('geary-attach-contract',
input: 'geary-attach.contract.desktop.in',
output: 'geary-attach.contract',
command: [msgfmt, '--desktop', '--keyword=Description', '--template', '@INPUT@', '-d', po_dir, '-o', '@OUTPUT@'],
install: true,
install_dir: join_paths(data_dir, 'contractor')
)
install_data('geary-attach',
install_dir: bin_dir,
)
endif
# GSettings schemas.
#
# Compile since it makes sure the schema is valid and is used for both
# running the client locally and for tests.
#
# Note the use of depend_files here is a kludge to ensure that the
# schema is re-compiled if the source changes. This is not supported
# by Meson but it works, so request for official support has been
# added, see: https://github.com/mesonbuild/meson/issues/2770
geary_compiled_schema = gnome.compile_schemas(
depend_files: files('org.gnome.Geary.gschema.xml'),
)
install_data('org.gnome.Geary.gschema.xml',
install_dir: join_paths(data_dir, 'glib-2.0', 'schemas'),
)
#
# DBus services
#
service_conf = configuration_data()
service_conf.set('bindir', bin_dir)
service_conf.set('appid', geary_id)
configure_file(
input: 'org.gnome.Geary.service.in',
output: '@0@.service'.format(geary_id),
configuration: service_conf,
install: true,
install_dir: dbus_services_dir
)
|