forked from dialect-app/dialect
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
86 lines (79 loc) · 2.56 KB
/
meson.build
File metadata and controls
86 lines (79 loc) · 2.56 KB
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
# Install desktop
desktop_conf = configuration_data()
desktop_conf.set('icon', application_id)
desktop_file = i18n.merge_file(
input: configure_file(
input: '@0@.desktop.in.in'.format(base_id),
output: '@BASENAME@',
configuration: desktop_conf
),
output: '@0@.desktop'.format(application_id),
type: 'desktop',
po_dir: '../po/ui',
install: true,
install_dir: join_paths(get_option('datadir'), 'applications')
)
desktop_utils = find_program('desktop-file-validate', required: false)
if desktop_utils.found()
test('Validate desktop file', desktop_utils,
args: [desktop_file.full_path()]
)
endif
# Install metainfo
appdata_conf = configuration_data()
appdata_conf.set('app-id', application_id)
appstream_file = i18n.merge_file(
input: configure_file(
input: '@0@.metainfo.xml.in.in'.format(base_id),
output: '@BASENAME@',
configuration: appdata_conf
),
output: '@0@.metainfo.xml'.format(application_id),
po_dir: '../po/ui',
install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo')
)
appstreamcli = find_program('appstreamcli', required: false)
if appstreamcli.found()
test('Validate appstream file', appstreamcli,
args: ['validate', '--no-net', '--explain', appstream_file.full_path()]
)
endif
# Install gsettings schema
gschema_conf = configuration_data()
gschema_conf.set('app-id', application_id)
configure_file(
input: '@0@.gschema.xml.in'.format(base_id),
output: '@0@.gschema.xml'.format(application_id),
configuration: gschema_conf,
install: true,
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
)
compile_schemas = find_program('glib-compile-schemas', required: false)
if compile_schemas.found()
test('Validate schema file', compile_schemas,
args: ['--strict', '--dry-run', meson.current_source_dir()]
)
endif
# Install D-Bus service file
service_conf = configuration_data()
service_conf.set('app-id', application_id)
service_conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
configure_file(
input: '@0@.service.in'.format(base_id),
output: '@0@.service'.format(application_id),
configuration: service_conf,
install: true,
install_dir: join_paths(get_option('datadir'), 'dbus-1/services')
)
# Install colored icon
install_data(
'@0@.svg'.format(application_id),
install_dir: join_paths(get_option('datadir'), 'icons/hicolor/scalable/apps')
)
# Install symbolic icon
install_data(
'@0@-symbolic.svg'.format(base_id),
install_dir: join_paths(get_option('datadir'), 'icons/hicolor/symbolic/apps'),
rename: '@0@-symbolic.svg'.format(application_id)
)