summaryrefslogtreecommitdiff
path: root/data/meson.build
blob: ddfbf47409665b2478be008178509e4d5512743c (plain)
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
subdir('icons')

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

gettext_package = gl_name

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')
)

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')
)

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')
)

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