forked from yousseb/meld
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
109 lines (97 loc) · 2.62 KB
/
Copy pathmeson.build
File metadata and controls
109 lines (97 loc) · 2.62 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Install man page
install_man('meld.1')
# Install schema file
install_data(
'@0@.gschema.xml'.format(resource_base_id),
install_dir: gio_schemasdir,
)
# Install desktop file
desktop_file = i18n.merge_file(
input: configure_file(
input: '@0@.desktop.in.in'.format(resource_base_id),
output: '@0@.desktop.in'.format(application_id),
configuration: {'icon': application_id},
),
output: '@0@.desktop'.format(application_id),
po_dir: podir,
type: 'desktop',
install: true,
install_dir: datadir / 'applications',
)
# Validate Desktop file
desktop_file_validate = find_program('desktop-file-validate', required: false)
if desktop_file_validate.found()
test (
'Validate desktop file',
desktop_file_validate,
args: desktop_file.full_path(),
)
endif
appdata_file = i18n.merge_file(
input: configure_file(
input: files('org.gnome.meld.appdata.xml.in.in'),
output: 'org.gnome.meld.appdata.xml.in',
configuration: {'appid': application_id},
),
output: '@0@.appdata.xml'.format(application_id),
po_dir: podir,
install: true,
install_dir: datadir / 'metainfo',
)
# Validate AppData file
appstreamcli = find_program('appstream-util', required: false)
if appstreamcli.found()
test(
'Validate appdata file',
appstreamcli,
args: ['validate-relax', '--nonet', appdata_file.full_path()],
)
endif
# Install mimetypes
mimetype_file = i18n.merge_file(
input: 'mime' / '@0@.xml.in'.format(resource_base_id),
output: '@0@.xml'.format(application_id),
po_dir: podir,
data_dirs: itsdir,
install: true,
install_dir: datadir / 'mime/packages',
)
# Check GSettings schema
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 GtkSourceview style files
styles = [
'meld-base.style-scheme.xml',
'meld-dark.style-scheme.xml',
]
foreach style: styles
i18n.merge_file(
input: 'styles' / style + '.in',
output: style,
po_dir: podir,
data_dirs: itsdir,
install: true,
install_dir: pkgdatadir / 'styles',
)
endforeach
# Install icons
icon_sizes = ['scalable']
foreach i: icon_sizes
install_data(
'icons/hicolor' / i / 'apps' / application_id + '.svg',
install_dir: icondir / 'hicolor' / i / 'apps',
rename: '@0@.svg'.format(application_id),
)
endforeach
# Install the symbolic icon
install_data(
'icons/hicolor/symbolic/apps' / application_id_no_profile + '-symbolic.svg',
install_dir: icondir / 'hicolor/symbolic/apps',
rename: '@0@-symbolic.svg'.format(application_id),
)