summaryrefslogtreecommitdiff
path: root/data/meson.build
blob: 1c2b952a271e35b985fe6453d3d8e5293cb1ddc2 (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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
desktop_files = [
  'org.gnome.Shell.desktop',
  'gnome-shell-extension-prefs.desktop'
]
service_files = []

if have_networkmanager
  desktop_files += 'org.gnome.Shell.PortalHelper.desktop'
  service_files += 'org.gnome.Shell.PortalHelper.service'
endif

desktopconf = configuration_data()
# We substitute in bindir so it works as an autostart
# file when built in a non-system prefix
desktopconf.set('bindir', bindir)
desktopconf.set('VERSION', meson.project_version())
foreach desktop_file : desktop_files
  i18n.merge_file('desktop',
    input: configure_file(
      input: desktop_file + '.in.in',
      output: desktop_file + '.in',
      configuration: desktopconf
    ),
    output: desktop_file,
    po_dir: '../po',
    install: true,
    install_dir: desktopdir,
    type: 'desktop'
  )
endforeach

serviceconf = configuration_data()
serviceconf.set('libexecdir', libexecdir)
foreach service_file : service_files
  configure_file(
    input: service_file + '.in',
    output: service_file,
    configuration: serviceconf,
    install_dir: servicedir
  )
endforeach


dbus_interfaces = [
  'org.gnome.Shell.PadOsd.xml',
  'org.gnome.Shell.Screencast.xml',
  'org.gnome.Shell.Screenshot.xml',
  'org.gnome.ShellSearchProvider.xml',
  'org.gnome.ShellSearchProvider2.xml'
]
install_data(dbus_interfaces, install_dir: ifacedir)


subdir('theme')

theme_resources = gnome.compile_resources(
  'gnome-shell-theme', 'gnome-shell-theme.gresource.xml',
  source_dir: 'theme',
  dependencies: theme_deps,
  gresource_bundle: true,
  install: true,
  install_dir: pkgdatadir
)

osk_layout_resources = gnome.compile_resources(
  'gnome-shell-osk-layouts', 'gnome-shell-osk-layouts.gresource.xml',
  source_dir: 'osk-layouts',
  gresource_bundle: true,
  install: true,
  install_dir: pkgdatadir
)

perfconf = configuration_data()
perfconf.set('datadir', datadir)
configure_file(
  input: 'perf-background.xml.in',
  output: 'perf-background.xml',
  configuration: perfconf,
  install_dir: pkgdatadir
)


install_data('gnome-shell.portal', install_dir: portaldir)
install_data('50-gnome-shell-system.xml', install_dir: keysdir)


schemaconf = configuration_data()
schemaconf.set('GETTEXT_PACKAGE', meson.project_name())
schema = configure_file(
  input: 'org.gnome.shell.gschema.xml.in',
  output: 'org.gnome.shell.gschema.xml',
  configuration: schemaconf,
  install_dir: schemadir
)

if have_systemd
  unitconf = configuration_data()
  unitconf.set('bindir', bindir)

  unit = configure_file(
    input: 'gnome-shell.service.in',
    output: 'gnome-shell.service',
    configuration: unitconf,
    install_dir: systemduserunitdir
  )

  units = files('gnome-shell-wayland.target',
                'gnome-shell-x11.target')

  install_data(units, install_dir: systemduserunitdir)
endif

# for unit tests - gnome.compile_schemas() only looks in srcdir
custom_target('compile-schemas',
  input: schema,
  output: 'gschemas.compiled',
  command: [find_program('glib-compile-schemas'), meson.current_build_dir()],
  build_by_default: true)

install_data('gnome-shell-overrides.convert', install_dir: convertdir)