forked from jfilak/reportd
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmeson.build
81 lines (70 loc) · 1.64 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
project(
'reportd',
'c',
license : 'GPL2+',
version : '0.7.4',
default_options : ['c_std=c99']
)
cc = meson.get_compiler('c')
add_project_arguments(
cc.get_supported_arguments([
'-D_GNU_SOURCE',
'-Wall',
'-Wduplicated-branches',
'-Wduplicated-cond',
'-Wlogical-op',
'-Werror=declaration-after-statement',
'-Werror=empty-body',
'-Werror=format=2',
'-Werror=implicit-function-declaration',
'-Werror=incompatible-pointer-types',
'-Werror=init-self',
'-Werror=missing-include-dirs',
'-Werror=missing-prototypes',
'-Werror=pointer-arith',
'-Werror=sequence-point',
'-Werror=shadow',
'-Werror=strict-prototypes',
# '-Werror=undef',
'-Werror=uninitialized',
'-Wno-error=maybe-uninitialized',
]),
language: 'c',
)
libexecdir = get_option('libexecdir')
prefix = get_option('prefix')
gio = dependency('gio-2.0')
gio_unix = dependency('gio-unix-2.0')
libreport = dependency('libreport', version: '>= 2.13.0')
systemd = dependency('systemd')
gnome = import('gnome')
subdir('dbus')
subdir('src')
subdir('systemd')
tito = find_program('tito',
required: false,
disabler: true,
)
# 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'
],
)