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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
subdir('applications')
subdir('autostart')
subdir('dconf')
# XPath configs
foreach file : [ 'Init', 'PreSession', 'PostSession' ]
generated_file = configure_file(
input: '@0@.in'.format(file),
output: file,
configuration: { 'X_PATH': x_path },
)
install_data(generated_file,
install_dir: gdmconfdir / file,
install_mode: 'rwxr-xr-x',
rename: 'Default'
)
endforeach
install_data('PostLogin',
rename: 'Default.sample',
install_mode: 'rwxr-xr-x',
install_dir: gdmconfdir / 'PostLogin',
)
# gdm.conf
configure_file(
input: 'gdm.conf.in',
output: '@BASENAME@',
configuration: {
'GDM_USERNAME': get_option('user')
},
install_dir: dbus_sys_dir,
)
configure_file(
input: 'gdm.conf-custom.in',
output: gdm_custom_conf.split('/')[-1],
copy: true,
install_mode: 'rw-r--r--',
install_dir: run_command(find_program('dirname'), gdm_custom_conf).stdout().strip(),
)
# GSettings schema
install_data('org.gnome.login-screen.gschema.xml',
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas',
)
compiled_gschema = gnome.compile_schemas()
# gdm.schema
gdm_schema = configure_file(
input: 'gdm.schemas.in',
output: '@BASENAME@',
configuration: {
'GDM_USERNAME': get_option('user'),
'GDM_GROUPNAME': get_option('group'),
'gdmconfdir': gdmconfdir,
},
install_dir: get_option('datadir') / 'gdm',
)
install_data('locale.alias',
install_dir: get_option('datadir') / 'gdm',
)
gdm_gnome_shell_component = 'org.gnome.Shell'
gdm_gnome_session_required_components = [
'org.gnome.SettingsDaemon.A11ySettings',
'org.gnome.SettingsDaemon.Color',
'org.gnome.SettingsDaemon.Datetime',
'org.gnome.SettingsDaemon.Housekeeping',
'org.gnome.SettingsDaemon.Keyboard',
'org.gnome.SettingsDaemon.MediaKeys',
'org.gnome.SettingsDaemon.Power',
'org.gnome.SettingsDaemon.PrintNotifications',
'org.gnome.SettingsDaemon.Rfkill',
'org.gnome.SettingsDaemon.ScreensaverProxy',
'org.gnome.SettingsDaemon.Sharing',
'org.gnome.SettingsDaemon.Smartcard',
'org.gnome.SettingsDaemon.Sound',
'org.gnome.SettingsDaemon.Wacom',
]
gdm_gnome_user_session_wanted_components = gdm_gnome_session_required_components
gdm_gnome_user_session_wanted_components += [
'org.gnome.SettingsDaemon.XSettings',
]
configure_file(
input: 'gnome-login.session.in',
output: '@BASENAME@',
configuration: {
'libexecdir': gdm_prefix / get_option('libexecdir'),
'check_accelerated_dir': check_accelerated_dir,
'gnome_required_components': ';'.join(
[ gdm_gnome_shell_component ] + gdm_gnome_session_required_components),
},
install_dir: get_option('datadir') / 'gnome-session' / 'sessions',
)
# PAM
pam_data_files_map = {
'redhat': [
'gdm-autologin',
'gdm-launch-environment',
'gdm-fingerprint',
'gdm-smartcard',
'gdm-password',
'gdm-pin',
],
'openembedded': [
'gdm-autologin',
'gdm-launch-environment',
'gdm-password',
'gdm-pin',
],
'exherbo': [
'gdm-autologin',
'gdm-launch-environment',
'gdm-fingerprint',
'gdm-smartcard',
'gdm-password',
'gdm-pin',
],
'lfs': [
'gdm-autologin',
'gdm-launch-environment',
'gdm-fingerprint',
'gdm-smartcard',
'gdm-password',
'gdm-pin',
],
'arch': [
'gdm-autologin',
'gdm-launch-environment',
'gdm-fingerprint',
'gdm-smartcard',
'gdm-password',
'gdm-pin',
],
'none': [],
# We should no longer have 'autodetect' at this point
}
pam_data_files = pam_data_files_map[default_pam_config]
pam_prefix = (get_option('pam-prefix') != '')? get_option('pam-prefix') : get_option('sysconfdir')
foreach _pam_filename : pam_data_files
install_data('pam-@0@/@1@.pam'.format(default_pam_config, _pam_filename),
rename: _pam_filename,
install_dir: pam_prefix / 'pam.d',
)
endforeach
gdm_rules = configure_file(
input: '61-gdm.rules.in',
output: '@BASENAME@',
configuration: {
'libexecdir': gdm_prefix / get_option('libexecdir'),
},
install_dir: udev_dir,
)
# DBus service files
service_config = configuration_data()
service_config.set('sbindir', gdm_prefix / get_option('sbindir'))
service_config.set('GDM_INITIAL_VT', get_option('initial-vt'))
service_config.set('LANG_CONFIG_FILE', lang_config_file)
if plymouth_dep.found()
service_config.set('PLYMOUTH_QUIT_SERVICE', 'plymouth-quit.service')
else
service_config.set('PLYMOUTH_QUIT_SERVICE', '')
endif
if get_option('systemdsystemunitdir') != ''
systemd_systemunitdir = get_option('systemdsystemunitdir')
else
systemd_systemunitdir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
endif
if get_option('systemduserunitdir') != ''
systemd_userunitdir = get_option('systemduserunitdir')
else
systemd_userunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir',
define_variable: ['prefix', get_option('prefix')])
endif
configure_file(
input: 'gdm.service.in',
output: '@BASENAME@',
configuration: service_config,
install_dir: systemd_systemunitdir,
format: 'cmake'
)
gdm_gnome_session_wanted_targets = []
foreach component: gdm_gnome_user_session_wanted_components
gdm_gnome_session_wanted_targets += 'Wants=@0@.target'.format(component)
endforeach
configure_file(
input: 'session.conf.in',
output: 'session.conf',
configuration: {
'requires_component': gdm_gnome_shell_component,
'wants_required_components': '\n'.join(gdm_gnome_session_wanted_targets),
},
install_dir: systemd_userunitdir / 'gnome-session@gnome-login.target.d',
)
# XSession
if get_option('gdm-xsession')
configure_file(
input: 'Xsession.in',
output: '@BASENAME@',
configuration: {
'libexecdir': gdm_prefix / get_option('libexecdir'),
'XSESSION_SHELL': get_option('solaris')? '/bin/ksh' : '/bin/sh',
},
install_dir: gdmconfdir,
)
endif
|