]> git.ipfire.org Git - thirdparty/systemd.git/blame - units/meson.build
Merge pull request #30284 from YHNdnzj/fstab-wantedby-defaultdeps
[thirdparty/systemd.git] / units / meson.build
CommitLineData
db9ecf05 1# SPDX-License-Identifier: LGPL-2.1-or-later
3a726fcd 2
6589a569
NL
3with_runlevels = conf.get('HAVE_SYSV_COMPAT') == 1
4
5c23128d 5units = [
742aebc5
YW
6 { 'file' : 'basic.target' },
7 { 'file' : 'blockdev@.target' },
8 { 'file' : 'bluetooth.target' },
9 { 'file' : 'boot-complete.target' },
10 { 'file' : 'console-getty.service.in' },
11 { 'file' : 'container-getty@.service.in' },
12 {
13 'file' : 'cryptsetup-pre.target',
14 'conditions' : ['HAVE_LIBCRYPTSETUP'],
15 },
16 {
17 'file' : 'cryptsetup.target',
18 'conditions' : ['HAVE_LIBCRYPTSETUP'],
19 'symlinks' : ['sysinit.target.wants/'],
20 },
21 { 'file' : 'debug-shell.service.in' },
22 {
23 'file' : 'dev-hugepages.mount',
24 'symlinks' : ['sysinit.target.wants/'],
25 },
26 {
27 'file' : 'dev-mqueue.mount',
28 'symlinks' : ['sysinit.target.wants/'],
29 },
30 { 'file' : 'emergency.service.in' },
31 { 'file' : 'emergency.target' },
32 { 'file' : 'exit.target' },
33 { 'file' : 'factory-reset.target' },
34 { 'file' : 'final.target' },
35 { 'file' : 'first-boot-complete.target' },
36 { 'file' : 'getty-pre.target' },
37 {
38 'file' : 'getty.target',
39 'symlinks' : ['multi-user.target.wants/'],
40 },
41 {
42 'file' : 'getty@.service.in',
43 'symlinks' : ['autovt@.service'],
44 },
45 {
46 'file' : 'graphical.target',
47 'symlinks' : ['default.target'] + (with_runlevels ? ['runlevel5.target'] : []),
48 },
49 { 'file' : 'halt.target' },
50 {
51 'file' : 'hibernate.target',
52 'conditions' : ['ENABLE_HIBERNATE'],
53 },
54 {
55 'file' : 'hybrid-sleep.target',
56 'conditions' : ['ENABLE_HIBERNATE'],
57 },
e3d4148d 58 {
95dafd30 59 'file' : 'systemd-battery-check.service.in',
e3d4148d 60 'conditions' : ['ENABLE_INITRD'],
95dafd30 61 'symlinks' : ['initrd.target.wants/'],
e3d4148d 62 },
77d0917e
OJ
63 {
64 'file' : 'systemd-bsod.service.in',
c3c885a7 65 'conditions' : ['HAVE_QRENCODE', 'ENABLE_INITRD'],
77d0917e
OJ
66 'symlinks' : ['initrd.target.wants/'],
67 },
742aebc5
YW
68 {
69 'file' : 'initrd-cleanup.service',
70 'conditions' : ['ENABLE_INITRD'],
71 },
72 {
73 'file' : 'initrd-fs.target',
74 'conditions' : ['ENABLE_INITRD'],
75 },
76 {
77 'file' : 'initrd-parse-etc.service.in',
78 'conditions' : ['ENABLE_INITRD'],
79 },
80 {
81 'file' : 'initrd-root-device.target',
82 'conditions' : ['ENABLE_INITRD'],
83 },
84 {
85 'file' : 'initrd-root-fs.target',
86 'conditions' : ['ENABLE_INITRD'],
87 },
88 {
89 'file' : 'initrd-switch-root.service',
90 'conditions' : ['ENABLE_INITRD'],
91 },
92 {
93 'file' : 'initrd-switch-root.target',
94 'conditions' : ['ENABLE_INITRD'],
95 },
96 {
97 'file' : 'initrd-udevadm-cleanup-db.service',
98 'conditions' : ['ENABLE_INITRD'],
99 },
100 {
101 'file' : 'initrd-usr-fs.target',
102 'conditions' : ['ENABLE_INITRD'],
103 },
104 {
105 'file' : 'initrd.target',
106 'conditions' : ['ENABLE_INITRD'],
107 },
108 {
109 'file' : 'integritysetup-pre.target',
110 'conditions' : ['HAVE_LIBCRYPTSETUP'],
111 },
112 {
113 'file' : 'integritysetup.target',
114 'conditions' : ['HAVE_LIBCRYPTSETUP'],
115 'symlinks' : ['sysinit.target.wants/'],
116 },
117 { 'file' : 'kexec.target' },
118 {
119 'file' : 'kmod-static-nodes.service.in',
120 'conditions' : ['HAVE_KMOD', 'ENABLE_TMPFILES'],
121 'symlinks' : ['sysinit.target.wants/'],
122 },
123 {
124 'file' : 'ldconfig.service',
125 'conditions' : ['ENABLE_LDCONFIG'],
126 'symlinks' : ['sysinit.target.wants/'],
127 },
128 { 'file' : 'local-fs-pre.target' },
129 { 'file' : 'local-fs.target' },
130 {
131 'file' : 'machine.slice',
132 'conditions' : ['ENABLE_MACHINED'],
133 },
134 {
135 'file' : 'machines.target',
136 'conditions' : ['ENABLE_MACHINED'],
137 },
138 { 'file' : 'modprobe@.service' },
139 {
140 'file' : 'multi-user.target',
141 'symlinks' : with_runlevels ? ['runlevel2.target', 'runlevel3.target', 'runlevel4.target'] : [],
142 },
143 { 'file' : 'network-online.target' },
144 { 'file' : 'network-pre.target' },
145 { 'file' : 'network.target' },
146 { 'file' : 'nss-lookup.target' },
147 { 'file' : 'nss-user-lookup.target' },
148 { 'file' : 'paths.target' },
149 {
150 'file' : 'poweroff.target',
151 'symlinks' : with_runlevels ? ['runlevel0.target'] : [],
152 },
153 { 'file' : 'printer.target' },
154 {
155 'file' : 'proc-sys-fs-binfmt_misc.automount',
156 'conditions' : ['ENABLE_BINFMT'],
157 'symlinks' : ['sysinit.target.wants/'],
158 },
159 {
160 'file' : 'proc-sys-fs-binfmt_misc.mount',
161 'conditions' : ['ENABLE_BINFMT'],
162 },
163 {
164 'file' : 'quotaon.service.in',
165 'conditions' : ['ENABLE_QUOTACHECK'],
166 },
167 {
168 'file' : 'rc-local.service.in',
169 'conditions' : ['HAVE_SYSV_COMPAT'],
170 },
171 {
172 'file' : 'reboot.target',
173 'symlinks' : ['ctrl-alt-del.target'] + (with_runlevels ? ['runlevel6.target'] : []),
174 },
175 {
176 'file' : 'remote-cryptsetup.target',
177 'conditions' : ['HAVE_LIBCRYPTSETUP'],
178 'symlinks' : ['initrd-root-device.target.wants/'],
179 },
180 { 'file' : 'remote-fs-pre.target' },
181 { 'file' : 'remote-fs.target' },
182 {
183 'file' : 'remote-veritysetup.target',
184 'conditions' : ['HAVE_LIBCRYPTSETUP'],
185 'symlinks' : ['initrd-root-device.target.wants/'],
186 },
187 { 'file' : 'rescue.service.in' },
188 {
189 'file' : 'rescue.target',
190 'symlinks' : with_runlevels ? ['runlevel1.target'] : [],
191 },
192 { 'file' : 'rpcbind.target' },
193 { 'file' : 'serial-getty@.service.in' },
194 { 'file' : 'shutdown.target' },
195 { 'file' : 'sigpwr.target' },
196 { 'file' : 'sleep.target' },
197 { 'file' : 'slices.target' },
198 { 'file' : 'smartcard.target' },
199 { 'file' : 'sockets.target' },
200 { 'file' : 'soft-reboot.target' },
201 { 'file' : 'sound.target' },
202 {
203 'file' : 'suspend-then-hibernate.target',
204 'conditions' : ['ENABLE_HIBERNATE'],
205 },
206 { 'file' : 'suspend.target' },
207 { 'file' : 'swap.target' },
208 {
209 'file' : 'sys-fs-fuse-connections.mount',
210 'symlinks' : ['sysinit.target.wants/'],
211 },
212 {
213 'file' : 'sys-kernel-config.mount',
214 'symlinks' : ['sysinit.target.wants/'],
215 },
216 {
217 'file' : 'sys-kernel-debug.mount',
218 'symlinks' : ['sysinit.target.wants/'],
219 },
220 {
221 'file' : 'sys-kernel-tracing.mount',
222 'symlinks' : ['sysinit.target.wants/'],
223 },
224 { 'file' : 'sysinit.target' },
225 { 'file' : 'syslog.socket' },
226 {
227 'file' : 'system-systemd\\x2dcryptsetup.slice',
228 'conditions' : ['HAVE_LIBCRYPTSETUP'],
229 },
230 {
231 'file' : 'system-systemd\\x2dveritysetup.slice',
232 'conditions' : ['HAVE_LIBCRYPTSETUP'],
233 },
234 { 'file' : 'system-update-cleanup.service' },
235 { 'file' : 'system-update-pre.target' },
236 { 'file' : 'system-update.target' },
237 {
238 'file' : 'systemd-ask-password-console.path',
239 'symlinks' : ['sysinit.target.wants/'],
240 },
241 { 'file' : 'systemd-ask-password-console.service' },
242 {
243 'file' : 'systemd-ask-password-wall.path',
244 'symlinks' : ['multi-user.target.wants/'],
245 },
246 { 'file' : 'systemd-ask-password-wall.service' },
247 {
248 'file' : 'systemd-backlight@.service.in',
249 'conditions' : ['ENABLE_BACKLIGHT'],
250 },
251 {
252 'file' : 'systemd-binfmt.service.in',
253 'conditions' : ['ENABLE_BINFMT'],
254 'symlinks' : ['sysinit.target.wants/'],
255 },
256 {
257 'file' : 'systemd-bless-boot.service.in',
258 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_BLKID'],
259 },
260 { 'file' : 'systemd-boot-check-no-failures.service.in' },
261 {
262 'file' : 'systemd-boot-random-seed.service',
263 'conditions' : ['ENABLE_BOOTLOADER'],
264 'symlinks' : ['sysinit.target.wants/'],
265 },
266 {
267 'file' : 'systemd-boot-update.service',
268 'conditions' : ['ENABLE_BOOTLOADER'],
269 },
270 {
271 'file' : 'systemd-confext.service',
272 'conditions' : ['ENABLE_SYSEXT'],
273 },
274 {
275 'file' : 'systemd-coredump.socket',
276 'conditions' : ['ENABLE_COREDUMP'],
277 'symlinks' : ['sockets.target.wants/'],
278 },
279 {
280 'file' : 'systemd-coredump@.service.in',
281 'conditions' : ['ENABLE_COREDUMP'],
282 },
644f19c7
LP
283 {
284 'file' : 'systemd-creds.socket',
285 'symlinks' : ['sockets.target.wants/'],
286 },
287 { 'file' : 'systemd-creds@.service' },
742aebc5
YW
288 { 'file' : 'systemd-exit.service' },
289 {
290 'file' : 'systemd-firstboot.service',
291 'conditions' : ['ENABLE_FIRSTBOOT'],
292 'symlinks' : ['sysinit.target.wants/'],
293 },
294 { 'file' : 'systemd-fsck-root.service.in' },
295 { 'file' : 'systemd-fsck@.service.in' },
296 { 'file' : 'systemd-growfs-root.service.in' },
297 { 'file' : 'systemd-growfs@.service.in' },
298 { 'file' : 'systemd-halt.service' },
a628d933
MY
299 {
300 'file' : 'systemd-hibernate-resume.service.in',
301 'conditions' : ['ENABLE_HIBERNATE'],
302 },
742aebc5
YW
303 {
304 'file' : 'systemd-hibernate.service.in',
305 'conditions' : ['ENABLE_HIBERNATE'],
306 },
307 {
308 'file' : 'systemd-homed-activate.service',
309 'conditions' : ['ENABLE_HOMED'],
310 },
3ccadbce
LP
311 {
312 'file' : 'systemd-homed-firstboot.service',
313 'conditions' : ['ENABLE_HOMED'],
314 },
742aebc5
YW
315 {
316 'file' : 'systemd-homed.service.in',
317 'conditions' : ['ENABLE_HOMED'],
318 },
319 {
320 'file' : 'systemd-hostnamed.service.in',
321 'conditions' : ['ENABLE_HOSTNAMED'],
322 'symlinks' : ['dbus-org.freedesktop.hostname1.service'],
323 },
324 {
325 'file' : 'systemd-hwdb-update.service.in',
326 'conditions' : ['ENABLE_HWDB'],
327 'symlinks' : ['sysinit.target.wants/'],
328 },
329 {
330 'file' : 'systemd-hybrid-sleep.service.in',
331 'conditions' : ['ENABLE_HIBERNATE'],
332 },
333 {
334 'file' : 'systemd-importd.service.in',
335 'conditions' : ['ENABLE_IMPORTD'],
336 'symlinks' : ['dbus-org.freedesktop.import1.service'],
337 },
338 {
339 'file' : 'systemd-initctl.service.in',
340 'conditions' : ['HAVE_SYSV_COMPAT'],
341 },
342 {
343 'file' : 'systemd-initctl.socket',
344 'conditions' : ['HAVE_SYSV_COMPAT'],
345 'symlinks' : ['sockets.target.wants/'],
346 },
347 {
348 'file' : 'systemd-journal-catalog-update.service',
349 'symlinks' : ['sysinit.target.wants/'],
350 },
351 {
352 'file' : 'systemd-journal-flush.service',
353 'symlinks' : ['sysinit.target.wants/'],
354 },
355 {
356 'file' : 'systemd-journal-gatewayd.service.in',
357 'conditions' : ['ENABLE_REMOTE', 'HAVE_MICROHTTPD'],
358 },
359 {
360 'file' : 'systemd-journal-gatewayd.socket',
361 'conditions' : ['ENABLE_REMOTE', 'HAVE_MICROHTTPD'],
362 },
363 {
364 'file' : 'systemd-journal-remote.service.in',
365 'conditions' : ['ENABLE_REMOTE', 'HAVE_MICROHTTPD'],
366 },
367 {
368 'file' : 'systemd-journal-remote.socket',
369 'conditions' : ['ENABLE_REMOTE', 'HAVE_MICROHTTPD'],
370 },
371 {
372 'file' : 'systemd-journal-upload.service.in',
373 'conditions' : ['ENABLE_REMOTE', 'HAVE_LIBCURL'],
374 },
375 { 'file' : 'systemd-journald-audit.socket' },
376 {
377 'file' : 'systemd-journald-dev-log.socket',
378 'symlinks' : ['sockets.target.wants/'],
379 },
380 { 'file' : 'systemd-journald-varlink@.socket' },
381 {
382 'file' : 'systemd-journald.service.in',
383 'symlinks' : ['sysinit.target.wants/'],
384 },
385 {
386 'file' : 'systemd-journald.socket',
387 'symlinks' : ['sockets.target.wants/'],
388 },
389 { 'file' : 'systemd-journald@.service.in' },
390 { 'file' : 'systemd-journald@.socket' },
391 { 'file' : 'systemd-kexec.service' },
392 {
393 'file' : 'systemd-localed.service.in',
394 'conditions' : ['ENABLE_LOCALED'],
395 'symlinks' : ['dbus-org.freedesktop.locale1.service'],
396 },
397 {
398 'file' : 'systemd-logind.service.in',
399 'conditions' : ['ENABLE_LOGIND'],
400 'symlinks' : ['multi-user.target.wants/', 'dbus-org.freedesktop.login1.service'],
401 },
402 {
403 'file' : 'systemd-machine-id-commit.service',
404 'symlinks' : ['sysinit.target.wants/'],
405 },
406 {
407 'file' : 'systemd-machined.service.in',
408 'conditions' : ['ENABLE_MACHINED'],
409 'symlinks' : ['dbus-org.freedesktop.machine1.service'],
410 },
411 {
412 'file' : 'systemd-modules-load.service.in',
413 'conditions' : ['HAVE_KMOD'],
414 'symlinks' : ['sysinit.target.wants/'],
415 },
416 { 'file' : 'systemd-network-generator.service.in' },
417 {
418 'file' : 'systemd-networkd-wait-online.service.in',
419 'conditions' : ['ENABLE_NETWORKD'],
420 },
421 {
422 'file' : 'systemd-networkd-wait-online@.service.in',
423 'conditions' : ['ENABLE_NETWORKD'],
424 },
425 {
426 'file' : 'systemd-networkd.service.in',
427 'conditions' : ['ENABLE_NETWORKD'],
428 },
429 {
430 'file' : 'systemd-networkd.socket',
431 'conditions' : ['ENABLE_NETWORKD'],
432 },
433 { 'file' : 'systemd-nspawn@.service.in' },
434 {
435 'file' : 'systemd-oomd.service.in',
436 'conditions' : ['ENABLE_OOMD'],
437 },
438 {
439 'file' : 'systemd-oomd.socket',
440 'conditions' : ['ENABLE_OOMD'],
441 },
4e16d5c6
LP
442 {
443 'file' : 'systemd-pcrextend@.service.in',
444 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
445 },
446 {
447 'file' : 'systemd-pcrextend.socket',
448 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
449 'symlinks' : ['sockets.target.wants/'],
450 },
742aebc5
YW
451 {
452 'file' : 'systemd-pcrfs-root.service.in',
453 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
454 },
455 {
456 'file' : 'systemd-pcrfs@.service.in',
457 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
458 },
459 {
460 'file' : 'systemd-pcrmachine.service.in',
461 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
462 'symlinks' : ['sysinit.target.wants/'],
463 },
464 {
465 'file' : 'systemd-pcrphase-initrd.service.in',
466 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2', 'ENABLE_INITRD'],
467 'symlinks' : ['initrd.target.wants/'],
468 },
469 {
470 'file' : 'systemd-pcrphase-sysinit.service.in',
471 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
472 'symlinks' : ['sysinit.target.wants/'],
473 },
474 {
475 'file' : 'systemd-pcrphase.service.in',
476 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
477 'symlinks' : ['sysinit.target.wants/'],
478 },
2e64cb71
LP
479 {
480 'file' : 'systemd-tpm2-setup.service.in',
481 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
482 'symlinks' : ['sysinit.target.wants/'],
483 },
484 {
485 'file' : 'systemd-tpm2-setup-early.service.in',
486 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
487 'symlinks' : ['sysinit.target.wants/'],
488 },
809def19
LP
489 {
490 'file' : 'systemd-pcrlock-make-policy.service.in',
491 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
492 },
493 {
494 'file' : 'systemd-pcrlock-secureboot-policy.service.in',
495 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
496 },
497 {
498 'file' : 'systemd-pcrlock-secureboot-authority.service.in',
499 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
500 },
501 {
502 'file' : 'systemd-pcrlock-file-system.service.in',
503 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
504 },
505 {
506 'file' : 'systemd-pcrlock-machine-id.service.in',
507 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
508 },
509 {
510 'file' : 'systemd-pcrlock-firmware-code.service.in',
511 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
512 },
513 {
514 'file' : 'systemd-pcrlock-firmware-config.service.in',
515 'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
516 },
742aebc5
YW
517 {
518 'file' : 'systemd-portabled.service.in',
519 'conditions' : ['ENABLE_PORTABLED'],
520 'symlinks' : ['dbus-org.freedesktop.portable1.service'],
521 },
522 { 'file' : 'systemd-poweroff.service' },
523 {
524 'file' : 'systemd-pstore.service.in',
525 'conditions' : ['ENABLE_PSTORE'],
526 },
527 {
528 'file' : 'systemd-quotacheck.service.in',
529 'conditions' : ['ENABLE_QUOTACHECK'],
530 },
531 {
532 'file' : 'systemd-random-seed.service.in',
533 'conditions' : ['ENABLE_RANDOMSEED'],
534 'symlinks' : ['sysinit.target.wants/'],
535 },
536 { 'file' : 'systemd-reboot.service' },
537 { 'file' : 'systemd-remount-fs.service.in' },
538 {
539 'file' : 'systemd-repart.service.in',
540 'conditions' : ['ENABLE_REPART'],
541 'symlinks' : ['sysinit.target.wants/', 'initrd-root-fs.target.wants/'],
542 },
543 {
544 'file' : 'systemd-resolved.service.in',
545 'conditions' : ['ENABLE_RESOLVE'],
546 },
547 {
548 'file' : 'systemd-rfkill.service.in',
549 'conditions' : ['ENABLE_RFKILL'],
550 },
551 {
552 'file' : 'systemd-rfkill.socket',
553 'conditions' : ['ENABLE_RFKILL'],
554 },
555 { 'file' : 'systemd-soft-reboot.service' },
556 {
557 'file' : 'systemd-suspend-then-hibernate.service.in',
558 'conditions' : ['ENABLE_HIBERNATE'],
559 },
560 { 'file' : 'systemd-suspend.service.in' },
561 {
562 'file' : 'systemd-sysctl.service.in',
563 'symlinks' : ['sysinit.target.wants/'],
564 },
565 {
566 'file' : 'systemd-sysext.service',
567 'conditions' : ['ENABLE_SYSEXT'],
568 },
f5151fb4
LP
569 {
570 'file' : 'systemd-sysext.socket',
571 'conditions' : ['ENABLE_SYSEXT'],
572 'symlinks' : ['sockets.target.wants/'],
573 },
574 {
575 'file' : 'systemd-sysext@.service',
576 'conditions' : ['ENABLE_SYSEXT'],
577 },
742aebc5
YW
578 {
579 'file' : 'systemd-sysupdate-reboot.service.in',
580 'conditions' : ['ENABLE_SYSUPDATE'],
581 },
582 {
583 'file' : 'systemd-sysupdate-reboot.timer',
584 'conditions' : ['ENABLE_SYSUPDATE'],
585 },
586 {
587 'file' : 'systemd-sysupdate.service.in',
588 'conditions' : ['ENABLE_SYSUPDATE'],
589 },
590 {
591 'file' : 'systemd-sysupdate.timer',
592 'conditions' : ['ENABLE_SYSUPDATE'],
593 },
594 {
595 'file' : 'systemd-sysusers.service',
596 'conditions' : ['ENABLE_SYSUSERS'],
597 'symlinks' : ['sysinit.target.wants/'],
598 },
1761066b
LP
599 {
600 'file' : 'systemd-storagetm.service.in',
601 'conditions' : ['ENABLE_STORAGETM'],
602 },
603 {
604 'file' : 'storage-target-mode.target',
605 'conditions' : ['ENABLE_STORAGETM'],
606 },
742aebc5
YW
607 {
608 'file' : 'systemd-time-wait-sync.service.in',
609 'conditions' : ['ENABLE_TIMESYNCD'],
610 },
611 {
612 'file' : 'systemd-timedated.service.in',
613 'conditions' : ['ENABLE_TIMEDATED'],
614 'symlinks' : ['dbus-org.freedesktop.timedate1.service'],
615 },
616 {
617 'file' : 'systemd-timesyncd.service.in',
618 'conditions' : ['ENABLE_TIMESYNCD'],
619 },
620 {
621 'file' : 'systemd-tmpfiles-clean.service',
622 'conditions' : ['ENABLE_TMPFILES'],
623 },
624 {
625 'file' : 'systemd-tmpfiles-clean.timer',
626 'conditions' : ['ENABLE_TMPFILES'],
627 'symlinks' : ['timers.target.wants/'],
628 },
bb7f485f
YW
629 {
630 'file' : 'systemd-tmpfiles-setup-dev-early.service',
631 'conditions' : ['ENABLE_TMPFILES'],
632 'symlinks' : ['sysinit.target.wants/'],
633 },
742aebc5
YW
634 {
635 'file' : 'systemd-tmpfiles-setup-dev.service',
636 'conditions' : ['ENABLE_TMPFILES'],
637 'symlinks' : ['sysinit.target.wants/'],
638 },
639 {
640 'file' : 'systemd-tmpfiles-setup.service',
641 'conditions' : ['ENABLE_TMPFILES'],
642 'symlinks' : ['sysinit.target.wants/'],
643 },
644 { 'file' : 'systemd-udev-settle.service' },
645 {
646 'file' : 'systemd-udev-trigger.service',
647 'symlinks' : ['sysinit.target.wants/'],
648 },
649 {
650 'file' : 'systemd-udevd-control.socket',
651 'symlinks' : ['sockets.target.wants/'],
652 },
653 {
654 'file' : 'systemd-udevd-kernel.socket',
655 'symlinks' : ['sockets.target.wants/'],
656 },
657 {
658 'file' : 'systemd-udevd.service.in',
659 'symlinks' : ['sysinit.target.wants/'],
660 },
661 {
662 'file' : 'systemd-update-done.service.in',
663 'symlinks' : ['sysinit.target.wants/'],
664 },
665 {
666 'file' : 'systemd-update-utmp-runlevel.service.in',
667 'conditions' : ['ENABLE_UTMP', 'HAVE_SYSV_COMPAT'],
668 'symlinks' : ['multi-user.target.wants/', 'graphical.target.wants/', 'rescue.target.wants/'],
669 },
670 {
671 'file' : 'systemd-update-utmp.service.in',
672 'conditions' : ['ENABLE_UTMP'],
673 'symlinks' : ['sysinit.target.wants/'],
674 },
675 {
676 'file' : 'systemd-user-sessions.service.in',
677 'conditions' : ['HAVE_PAM'],
678 'symlinks' : ['multi-user.target.wants/'],
679 },
680 {
681 'file' : 'systemd-userdbd.service.in',
682 'conditions' : ['ENABLE_USERDB'],
683 },
684 {
685 'file' : 'systemd-userdbd.socket',
686 'conditions' : ['ENABLE_USERDB'],
687 },
688 {
689 'file' : 'systemd-vconsole-setup.service.in',
690 'conditions' : ['ENABLE_VCONSOLE'],
691 },
692 {
693 'file' : 'systemd-volatile-root.service.in',
694 'conditions' : ['ENABLE_INITRD'],
695 },
696 { 'file' : 'time-set.target' },
697 { 'file' : 'time-sync.target' },
698 { 'file' : 'timers.target' },
699 {
700 'file' : 'tmp.mount',
701 'symlinks' : ['local-fs.target.wants/'],
702 },
703 { 'file' : 'umount.target' },
704 { 'file' : 'usb-gadget.target' },
705 { 'file' : 'user-runtime-dir@.service.in' },
706 { 'file' : 'user.slice' },
707 { 'file' : 'user@.service.in' },
708 {
709 'file' : 'var-lib-machines.mount',
710 'conditions' : ['ENABLE_MACHINED'],
711 'symlinks' : ['remote-fs.target.wants/', 'machines.target.wants/'],
712 },
713 {
714 'file' : 'veritysetup-pre.target',
715 'conditions' : ['HAVE_LIBCRYPTSETUP'],
716 },
717 {
718 'file' : 'veritysetup.target',
719 'conditions' : ['HAVE_LIBCRYPTSETUP'],
720 'symlinks' : ['sysinit.target.wants/'],
721 },
082ef2ad
ZJS
722]
723
742aebc5
YW
724foreach unit : units
725 source = unit.get('file')
2d9f0c68 726
742aebc5
YW
727 if source.endswith('.in')
728 needs_jinja = true
729 name = source.substring(0, -3)
730 assert(name + '.in' == source)
731 else
732 needs_jinja = false
733 name = source
37efbbd8 734 endif
742aebc5 735 source = files(source)
5c23128d 736
742aebc5
YW
737 install = true
738 foreach cond : unit.get('conditions', [])
739 if conf.get(cond) != 1
740 install = false
741 break
742 endif
743 endforeach
5c23128d 744
742aebc5
YW
745 if needs_jinja
746 custom_target(
747 name,
748 input : source,
749 output : name,
750 command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
751 install : install,
752 install_dir : systemunitdir)
753 elif install
754 install_data(source,
37efbbd8 755 install_dir : systemunitdir)
742aebc5 756 endif
2d9f0c68 757
742aebc5
YW
758 if install
759 foreach target : unit.get('symlinks', [])
9289e093
YW
760 if target.endswith('/')
761 install_emptydir(systemunitdir / target)
762 meson.add_install_script(sh, '-c',
763 ln_s.format(systemunitdir / name,
764 systemunitdir / target / name))
765 else
766 meson.add_install_script(sh, '-c',
767 ln_s.format(systemunitdir / name,
768 systemunitdir / target))
769 endif
742aebc5 770 endforeach
37efbbd8 771 endif
5c23128d
ZJS
772endforeach
773
28414939
ZJS
774install_data('user-.slice.d/10-defaults.conf',
775 install_dir : systemunitdir + '/user-.slice.d')
776
278e815b
FB
777install_data('user@.service.d/10-login-barrier.conf',
778 install_dir : systemunitdir + '/user@.service.d')
779install_data('user@0.service.d/10-login-barrier.conf',
780 install_dir : systemunitdir + '/user@0.service.d')
781
082ef2ad
ZJS
782############################################################
783
9289e093
YW
784install_emptydir(dbussessionservicedir)
785meson.add_install_script(sh, '-c',
786 ln_s.format(dbussystemservicedir / 'org.freedesktop.systemd1.service',
787 dbussessionservicedir / 'org.freedesktop.systemd1.service'))
788
349cc4a5 789if conf.get('HAVE_SYSV_COMPAT') == 1
37efbbd8 790 foreach i : [1, 2, 3, 4, 5]
9289e093 791 install_emptydir(systemunitdir / 'runlevel@0@.target.wants'.format(i))
37efbbd8 792 endforeach
94e75a54
ZJS
793endif
794
5c23128d 795subdir('user')