File: meson.build

package info (click to toggle)
gnome-logs 49.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,764 kB
  • sloc: ansic: 6,418; xml: 79; makefile: 7
file content (126 lines) | stat: -rw-r--r-- 3,229 bytes parent folder | download
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
subdir('icons')

add_global_arguments('-DGL_BINDIR="@0@"'.format(gl_bindir), language : 'c')

gettext_package = gl_name

desktop_file = i18n.merge_file(
    input : 'org.gnome.Logs.desktop.in',
    output : 'org.gnome.Logs.desktop',
    type : 'desktop',
    po_dir : po_dir,
    install : true,
    install_dir : join_paths(gl_datadir, 'applications')
)
desktop_file_validate = find_program('desktop-file-validate', required: false)
if desktop_file_validate.found()
  test(
    'validate-desktop',
    desktop_file_validate,
    args: [
      desktop_file,
    ],
    depends: desktop_file,
  )
endif

appdata_file = i18n.merge_file(
    input : 'org.gnome.Logs.appdata.xml.in',
    output : 'org.gnome.Logs.appdata.xml',
    po_dir : po_dir,
    install : true,
    install_dir : join_paths(gl_datadir, 'metainfo')
)
appstreamcli = find_program('appstreamcli', required: false)
if appstreamcli.found()
  test(
    'appstreamcli-validate', appstreamcli,
    args: [
      'validate', '--no-net', '--explain', appdata_file,
    ],
    depends: appdata_file,
  )
endif

service_conf = configuration_data()
service_conf.set('bindir', gl_bindir)

service = 'org.gnome.Logs.service'

configure_file(
  input: service + '.in',
  output: service,
  install: true,
  install_dir: join_paths(gl_datadir, 'dbus-1', 'services'),
  configuration: service_conf
)

resource_data = files(
    'gl-categorylist.ui',
    'gl-eventviewlist.ui',
    'gl-eventtoolbar.ui',
    'gl-eventviewdetail.ui',
    'gl-searchpopover.ui',
    'gl-window.ui',
    'help-overlay.ui'
)

gresource = files('org.gnome.Logs.gresource.xml')

# GSettings schemas
# https://github.com/mesonbuild/meson/issues/1687
custom_target('gsettings-enums',
  input: '../src/gl-application.h',
  output: 'org.gnome.Logs.enums.xml',
  install: true,
  install_dir: join_paths(gl_datadir, 'glib-2.0', 'schemas'),
  capture: true,
  command: ['glib-mkenums',
    '--comments', '<!-- @comment@ -->',
    '--fhead', '<schemalist>',
    '--vhead', '  <@type@ id="org.gnome.Logs.@EnumName@">',
    '--vprod', '    <value nick="@valuenick@" value="@valuenum@"/>',
    '--vtail', '  </@type@>',
    '--ftail', '</schemalist>',
    '@INPUT@'
  ]
)
install_data(
    'org.gnome.Logs.gschema.xml',
    install_dir : join_paths(gl_datadir, 'glib-2.0', 'schemas')
)
glib_compile_schemas = find_program('glib-compile-schemas', required: true)
if glib_compile_schemas.found()
  test(
    'validate-gschema', glib_compile_schemas,
    args: [
      '--strict', '--dry-run', meson.current_build_dir()
    ],
  )
endif

version_conf = configuration_data()
version_conf.set('PACKAGE_VERSION', gl_version)

configure_file(
    input : 'version.xml.in',
    output : 'version.xml',
    configuration: version_conf,
)

if logs_enable_man
    custom_target('gl-manfile',
        input : 'gnome-logs.xml',
        output : 'gnome-logs.1',
        install : true,
        install_dir : gl_mandir,
        command : [
            xsltproc,
            '--nonet',
            '--path', join_paths(meson.source_root(), 'data') + ':' + 'data',
            '--output', 'data/',
            'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
            '@INPUT@'
        ]
    )
endif