-
Notifications
You must be signed in to change notification settings - Fork 23
/
meson.build
97 lines (86 loc) · 2.11 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
project('gnome-abrt', 'c', meson_version : '>= 0.63.0', license : 'GPL3+', version : '1.4.3')
bindir = get_option('bindir')
datadir = get_option('datadir')
icondir = join_paths(datadir, 'icons')
libexecdir = get_option('libexecdir')
localedir = get_option('localedir')
mandir = get_option('mandir')
pkgdatadir = join_paths(datadir, meson.project_name())
prefix = get_option('prefix')
spec_name = '@[email protected]'.format(meson.project_name())
gnome = import('gnome')
i18n = import('i18n')
python = import('python')
python_modules = []
if get_option('lint')
python_modules += 'pylint'
endif
python_installation = python.find_installation('python3',
modules: python_modules
)
abrt_dep = dependency('abrt')
adwaita_dep = dependency('libadwaita-1')
gio_dep = dependency('gio-2.0')
gtk_dep = dependency('gtk4')
libreport_gtk_dep = dependency('libreport-gtk')
pygobject_dep = dependency('pygobject-3.0', version: '>= 3.29.1')
python_dep = dependency('python3')
asciidoc = find_program('asciidoc',
required: get_option('docs'),
)
if get_option('lint')
pylint = find_program('pylint-3')
else
pylint = disabler()
endif
tito = find_program('tito',
required: false,
disabler: true,
)
xmlto = find_program('xmlto',
required: get_option('docs')
)
subdir('data')
subdir('doc')
subdir('icons')
subdir('po')
subdir('src')
# Copy the spec file to the build directory so that Tito can run inside it to build
# the rpm and srpm targets (below).
configure_file(
copy: true,
input: spec_name,
output: spec_name,
)
# This will, naturally, fail if the build directory is outside the git repo,
# since Tito does not provide a way to specify the working directory or the spec
# file using the CLI.
run_target('rpm',
command: [
tito,
'build',
'--offline',
'--output=@0@/rpm'.format(meson.current_build_dir()),
'--rpm',
'--test'
],
)
run_target('srpm',
command: [
tito,
'build',
'--offline',
'--output=@0@/rpm'.format(meson.current_build_dir()),
'--srpm',
'--test'
],
)
run_target('run',
command: [
gnome_abrt_main,
],
depends: [
gnome_abrt_resources,
gnome_abrt_wrappers_module,
],
)