File: meson.build

package info (click to toggle)
chatty 0.8.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,448 kB
  • sloc: ansic: 57,146; sql: 5,122; xml: 158; cpp: 39; makefile: 22; sh: 11; lisp: 8; javascript: 6
file content (99 lines) | stat: -rw-r--r-- 2,838 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
config_data = configuration_data()
config_data.set('APP_ID', app_id)

desktop_file = i18n.merge_file(
  input: configure_file(
    input: 'sm.puri.Chatty.desktop.in.in',
    output: '@0@.desktop.in'.format(app_id),
    configuration: config_data,
  ),
  output: '@0@.desktop'.format(app_id),
  type: 'desktop',
  po_dir: '../po',
  install: true,
  install_dir: join_paths(get_option('datadir'), 'applications')
)

desktop_file = i18n.merge_file(
  input: configure_file(
    input: 'sm.puri.Chatty-daemon.desktop.in.in',
    output: '@0@-daemon.desktop.in'.format(app_id),
    configuration: config_data,
  ),
  output: '@0@-daemon.desktop'.format(app_id),
  type: 'desktop',
  po_dir: '../po',
  install: true,
  install_dir: join_paths(get_option('sysconfdir'), 'xdg/autostart')
)

desktop_utils = find_program('desktop-file-validate', required: false)
if desktop_utils.found()
  test('Validate desktop file', desktop_utils,
    args: [desktop_file]
  )
endif

metainfo_file = i18n.merge_file(
  input: configure_file(
    input: 'sm.puri.Chatty.metainfo.xml.in.in',
    output: '@0@.metainfo.xml.in'.format(app_id),
    configuration: config_data,
  ),
  output: '@0@.metainfo.xml'.format(app_id),
  po_dir: '../po',
  install: true,
  install_dir: join_paths(get_option('datadir'), 'metainfo')
)

appstreamcli = find_program('appstreamcli', required: false)
if appstreamcli.found()
  test('Validate metainfo file', appstreamcli,
    args: ['validate', '--no-net', '--explain', metainfo_file]
  )
endif

schema_src = 'sm.puri.Chatty.gschema.xml'
compiled = gnome.compile_schemas(build_by_default: true,
                                 depend_files: files(schema_src))

install_data(schema_src,
  install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
)

compile_schemas = find_program('glib-compile-schemas', required: false)
if compile_schemas.found()
  test('Validate schema file', compile_schemas,
    args: ['--strict', '--dry-run', meson.current_source_dir()]
  )
endif

service_data = configuration_data()
service_data.set('appid', app_id)
service_data.set('bindir', get_option('prefix') / get_option('bindir'))

# DBus service
configure_file(
  input : 'sm.puri.Chatty.service.in',
  output : '@0@.service'.format(app_id),
  configuration : service_data,
  install : true,
  install_dir : get_option('datadir') / 'dbus-1' / 'services'
)

# Systemd user service
systemd_user_unit_dir = join_paths(get_option('prefix'), 'lib/systemd/user/')
systemd_dep = dependency('systemd', required: false)
if systemd_dep.found()
  systemd_user_unit_dir = systemd_dep.get_variable('systemd_user_unit_dir')
endif

configure_file(
  input: 'sm.puri.Chatty-daemon.service.in',
  output : '@0@-daemon.service'.format(app_id),
  configuration : service_data,
  install : true,
  install_dir : systemd_user_unit_dir
)

subdir('icons')