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
|
gnome = import('gnome')
desktop_file = i18n.merge_file(
type: 'desktop',
input: 'org.gnome.Screenshot.desktop.in',
output: 'org.gnome.Screenshot.desktop',
po_dir: join_paths(meson.current_source_dir(), '../po'),
install: true,
install_dir: gnome_screenshot_appsdir
)
# Validate Desktop file
desktop_file_validate = find_program('desktop-file-validate', required: false)
if desktop_file_validate.found()
test(
'validate-desktop',
desktop_file_validate,
args: [
desktop_file.full_path()
]
)
endif
metainfo_file = i18n.merge_file(
input: 'org.gnome.Screenshot.metainfo.xml.in',
output: 'org.gnome.Screenshot.metainfo.xml',
po_dir: join_paths(meson.current_source_dir(), '../po'),
install: true,
install_dir: gnome_screenshot_appdatadir
)
# Validate metainfo
appstream_util = find_program('appstream-util', required: false)
if appstream_util.found()
test(
'validate-metainfo',
appstream_util,
args: [
'validate',
'--nonet',
metainfo_file.full_path()
]
)
endif
service_conf = configuration_data()
service_conf.set('bindir', gnome_screenshot_bindir)
configure_file(
input: 'org.gnome.Screenshot.service.in',
output: 'org.gnome.Screenshot.service',
configuration: service_conf,
install: true,
install_dir: gnome_screenshot_servicesdir
)
install_data(
'org.gnome.gnome-screenshot.gschema.xml',
install_dir: gnome_screenshot_schemadir
)
glib_compile_schemas = find_program('glib-compile-schemas', required: false)
# Validata GSchema
if glib_compile_schemas.found()
test(
'validate-gschema',
glib_compile_schemas,
args: [
'--strict',
'--dry-run',
meson.current_source_dir()
]
)
endif
resources = gnome.compile_resources(
'screenshot-resources',
'org.gnome.Screenshot.gresource.xml',
source_dir: '.',
c_name: 'screenshot'
)
install_data(
'gnome-screenshot.1',
install_dir: join_paths(get_option('mandir'), 'man1')
)
subdir('icons')
|