-
-
Notifications
You must be signed in to change notification settings - Fork 303
/
Copy pathmeson.build
141 lines (129 loc) · 3.27 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
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
135
136
137
138
139
140
141
# Resources
resource_conf = configuration_data()
resource_conf.set('APP_IDPATH', app_idpath)
resource_conf.set('APP_NAME', app_name)
configure_file(
input: 'resources.gresource.xml.in',
output: 'resources.gresource.xml',
configuration: resource_conf,
)
resources = gnome.compile_resources(
'resources',
meson.current_build_dir() + '/' + 'resources.gresource.xml',
gresource_bundle: true,
source_dir: meson.current_build_dir(),
install: true,
install_dir: pkgdatadir,
)
# # D-Bus service file
# dbus_conf = configuration_data()
# dbus_conf.set('APP_ID', app_id)
# dbus_conf.set('APP_NAME', app_name)
# configure_file(
# input: 'app.service.in',
# output: app_id + '.service',
# configuration: dbus_conf,
# install: true,
# install_dir: datadir / 'dbus-1' / 'services',
# )
# Desktop file
desktop_conf = configuration_data()
desktop_conf.set('APP_ID', app_id)
desktop_conf.set('APP_NAME', app_name)
desktop_conf.set('APP_NAME_CAPITALIZED', app_name_capitalized)
desktop_file_in = configure_file(
input: 'app.desktop.in.in',
output: '@BASENAME@',
configuration: desktop_conf,
)
desktop_file = i18n.merge_file(
input: desktop_file_in,
output: app_id + '.desktop',
type: 'desktop',
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
],
)
endif
# Gschema
gschema_conf = configuration_data()
gschema_conf.set('APP_ID', app_id)
gschema_conf.set('APP_IDPATH', app_idpath)
gschema_conf.set('APP_NAME', app_name)
gschema_file = configure_file(
input: 'app.gschema.xml.in',
output: app_id + '.gschema.xml',
configuration: gschema_conf,
install: true,
install_dir: datadir / 'glib-2.0' / 'schemas',
)
# Validata GSchema
if glib_compile_schemas.found()
test(
'validate-gschema', glib_compile_schemas,
args: [
'--strict', '--dry-run', datadir / 'glib-2.0' / 'schemas',
],
)
endif
# Appdata
appdata_conf = configuration_data()
appdata_conf.set('APP_ID', app_id)
appdata_conf.set('APP_NAME', app_name)
appdata_conf.set('APP_NAME_CAPITALIZED', app_name_capitalized)
appdata_file_in = configure_file(
input: 'app.metainfo.xml.in.in',
output: '@BASENAME@',
configuration: appdata_conf,
)
appdata_file = i18n.merge_file(
input: appdata_file_in,
output: app_id + '.metainfo.xml',
po_dir: podir,
install: true,
install_dir: datadir / 'metainfo',
)
# Validate Appdata
if appstream_util.found()
test(
'validate-appdata', appstream_util,
args: [
'validate', '--nonet', appdata_file
],
)
endif
# App-Icon
if profile == 'devel'
install_data(
'icons/scalable/apps/' + app_name + '-devel.svg',
install_dir: iconsdir / 'hicolor' / 'scalable' / 'apps',
rename: app_id + '.svg',
)
else
install_data(
'icons/scalable/apps/' + app_name + '.svg',
install_dir: iconsdir / 'hicolor' / 'scalable' / 'apps',
rename: app_id + '.svg',
)
endif
# Symbolic App-Icon
install_data(
'icons/symbolic/apps/' + app_name + '-symbolic.svg',
install_dir: iconsdir / 'hicolor' / 'symbolic' / 'apps',
rename: app_id + '-symbolic.svg',
)
# MIME-Type
install_data(
'app.mimetype.xml.in',
install_dir: datadir / 'mime' / 'packages',
rename: app_id + '.xml',
)