-
Notifications
You must be signed in to change notification settings - Fork 12
/
meson.build
54 lines (46 loc) · 1.42 KB
/
meson.build
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
project('sway-systemd', [],
meson_version: '>= 0.51',
license: 'MIT',
)
enabled = get_option('autoload-configs')
configs = {
'config.d/10-systemd-session.conf.in': true,
'config.d/10-systemd-cgroups.conf.in': enabled.contains('all') or enabled.contains('cgroups'),
'config.d/95-system-keyboard-config.conf.in': enabled.contains('all') or enabled.contains('locale1'),
'config.d/95-xdg-desktop-autostart.conf.in': enabled.contains('all') or enabled.contains('autostart'),
}
scripts = [
'src/session.sh',
'src/assign-cgroups.py',
'src/wait-sni-ready',
'src/locale1-xkb-config',
]
unit_files = [
'units/sway-session.target',
'units/sway-session-shutdown.target',
'units/sway-xdg-autostart.target',
]
systemd = dependency('systemd')
conf_dir = get_option('sysconfdir') / 'sway' / 'config.d'
data_dir = get_option('datadir') / meson.project_name()
# must be absolute path for configuration_data
exec_dir = get_option('prefix') / get_option('libexecdir') / meson.project_name()
install_data(
scripts,
install_dir: exec_dir,
install_mode: 'rwxr-xr-x',
)
install_data(
unit_files,
install_dir: systemd.get_variable(pkgconfig: 'systemduserunitdir'),
)
conf_data = configuration_data()
conf_data.set('execdir', exec_dir)
foreach config, enabled : configs
configure_file(
configuration: conf_data,
input: config,
output: '@BASENAME@',
install_dir: enabled ? conf_dir : data_dir,
)
endforeach