-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathmeson.build
107 lines (101 loc) · 2.66 KB
/
meson.build
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
subdir('icons')
subdir('resources')
# Desktop file
desktop_conf = configuration_data()
desktop_conf.set('icon', application_id)
desktop_file = i18n.merge_file(
type: 'desktop',
input: configure_file(
input: '@[email protected]'.format(base_id),
output: '@BASENAME@',
configuration: desktop_conf
),
output: '@[email protected]'.format(application_id),
po_dir: podir,
install: true,
install_dir: datadir / 'applications'
)
# Validate Desktop file
if desktop_file_validate.found()
test(
'validate-desktop',
desktop_file_validate,
args: [
desktop_file.full_path()
],
depends: desktop_file,
)
endif
# Appdata
appdata_conf = configuration_data()
appdata_conf.set('app-id', application_id)
appdata_conf.set('gettext-package', gettext_package)
appdata_file = i18n.merge_file(
input: configure_file(
input: '@[email protected]'.format(base_id),
output: '@BASENAME@',
configuration: appdata_conf
),
output: '@[email protected]'.format(application_id),
po_dir: podir,
install: true,
install_dir: datadir / 'metainfo'
)
# Validate Appdata
if appstreamcli.found()
test(
'validate-appdata', appstreamcli,
args: [
'validate', '--no-net', '--explain', appdata_file.full_path()
],
depends: appdata_file,
)
endif
# GSchema
gschema_conf = configuration_data()
gschema_conf.set('app-id', application_id)
gschema_conf.set('gettext-package', gettext_package)
configure_file(
input: '@[email protected]'.format(base_id),
output: '@[email protected]'.format(application_id),
configuration: gschema_conf,
install: true,
install_dir: datadir / 'glib-2.0' / 'schemas'
)
# Validate GSchema
if glib_compile_schemas.found()
test(
'validate-gschema', glib_compile_schemas,
args: [
'--strict', '--dry-run', meson.current_build_dir()
],
)
endif
# DBus service
# install_data('net.nokyan.Resources.conf', install_dir : datadir / 'dbus-1' / 'system.d')
# systemd Service file
#service_conf = configuration_data()
#service_conf.set('bindir', bindir)
#configure_file(
# input: '@[email protected]'.format(base_id),
# output: '@[email protected]'.format(application_id),
# configuration: service_conf,
# install: true,
# install_dir: prefix / 'lib' / 'systemd' / 'system'
#)
# polkit Policy file
policy_conf = configuration_data()
policy_conf.set('libexecdir', libexecdir)
policy_conf.set('gettext-package', gettext_package)
i18n.merge_file(
input: configure_file(
input: '@[email protected]'.format(base_id),
output: '@BASENAME@',
configuration: policy_conf,
),
output: '@[email protected]'.format(application_id),
po_dir: podir,
data_dirs: podir,
install: true,
install_dir: datadir / 'polkit-1' / 'actions'
)