This repository has been archived by the owner on Feb 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
/
meson.build
94 lines (85 loc) · 1.96 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
project('retrace-server', license : 'GPL2+', meson_version : '>= 0.49.0', version : '1.24.2')
bindir = get_option('bindir')
datadir = get_option('datadir')
mandir = get_option('mandir')
sysconfdir = get_option('sysconfdir')
spec_name = '@[email protected]'.format(meson.project_name())
i18n = import('i18n')
python = import('python')
python_installation = python.find_installation('python3')
asciidoc = find_program('asciidoc',
required: get_option('docs'),
disabler: true,
)
createrepo = find_program('createrepo')
date = find_program('date',
required: get_option('docs'),
disabler: true,
)
df = find_program('df')
gzip = find_program('gzip')
lsof = find_program('lsof')
makeinfo = find_program('makeinfo',
required: get_option('docs'),
disabler: true,
)
podman = find_program('podman',
required: false,
disabler: true,
)
pytest = find_program('pytest-3')
ps = find_program('ps')
tar = find_program('tar')
tito = find_program('tito',
required: false,
disabler: true,
)
unar = find_program('unar',
required: false,
disabler: true,
)
xmlto = find_program('xmlto',
required: get_option('docs'),
disabler: true,
)
xz = find_program('xz')
subdir('doc')
subdir('man')
subdir('po')
subdir('src')
subdir('test')
# 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,
)
configure_file(
copy: true,
input: 'pylintrc',
output: 'pylintrc',
)
# 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'
],
)