File: meson.build

package info (click to toggle)
diffuse 0.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,168 kB
  • sloc: python: 7,689; xml: 5,993; sh: 63; makefile: 9
file content (62 lines) | stat: -rw-r--r-- 1,787 bytes parent folder | download | duplicates (2)
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
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
gnome = import('gnome')

gnome.compile_resources(meson.project_name(),
  meson.project_name() + '.gresource.xml',
  gresource_bundle: true,
  install: true,
  install_dir: pkgdatadir,
)

if build_machine.system() == 'linux'
  desktop_file = i18n.merge_file(
    input: 'io.github.mightycreak.Diffuse.desktop.in',
    output: 'io.github.mightycreak.Diffuse.desktop',
    type: 'desktop',
    po_dir: '../po',
    install: true,
    install_dir: join_paths(get_option('datadir'), 'applications')
  )

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

  appstream_file = i18n.merge_file(
    input: 'io.github.mightycreak.Diffuse.appdata.xml.in',
    output: 'io.github.mightycreak.Diffuse.appdata.xml',
    po_dir: '../po',
    install: true,
    install_dir: join_paths(get_option('datadir'), 'appdata')
  )

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

# Diffuse config file
conf = configuration_data()
conf.set('LOG_PRINT_OUTPUT', get_option('log_print_output'))
conf.set('LOG_PRINT_STACK', get_option('log_print_stack'))
conf.set('USE_FLATPAK', get_option('use_flatpak'))
conf.set('PKGDATADIR', pkgdatadir)

configure_file(
  input: 'diffuserc.in',
  output: 'diffuserc',
  configuration: conf,
  install: true,
  install_dir: get_option('sysconfdir')
)

# Data files
install_subdir('usr/share', install_dir: get_option('datadir'), strip_directory: true)

subdir('icons')