udev: String substitutions can be done in ENV, too
[systemd_ALT.git] / units / meson.build
blobdc7966a77229281be0c0f66c55956508f28804ba
1 # SPDX-License-Identifier: LGPL-2.1-or-later
3 with_runlevels = conf.get('HAVE_SYSV_COMPAT') == 1
5 units = [
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         },
58         {
59           'file' : 'systemd-battery-check.service.in',
60           'conditions' : ['ENABLE_INITRD'],
61           'symlinks' : ['initrd.target.wants/'],
62         },
63         {
64           'file' : 'initrd-cleanup.service',
65           'conditions' : ['ENABLE_INITRD'],
66         },
67         {
68           'file' : 'initrd-fs.target',
69           'conditions' : ['ENABLE_INITRD'],
70         },
71         {
72           'file' : 'initrd-parse-etc.service.in',
73           'conditions' : ['ENABLE_INITRD'],
74         },
75         {
76           'file' : 'initrd-root-device.target',
77           'conditions' : ['ENABLE_INITRD'],
78         },
79         {
80           'file' : 'initrd-root-fs.target',
81           'conditions' : ['ENABLE_INITRD'],
82         },
83         {
84           'file' : 'initrd-switch-root.service',
85           'conditions' : ['ENABLE_INITRD'],
86         },
87         {
88           'file' : 'initrd-switch-root.target',
89           'conditions' : ['ENABLE_INITRD'],
90         },
91         {
92           'file' : 'initrd-udevadm-cleanup-db.service',
93           'conditions' : ['ENABLE_INITRD'],
94         },
95         {
96           'file' : 'initrd-usr-fs.target',
97           'conditions' : ['ENABLE_INITRD'],
98         },
99         {
100           'file' : 'initrd.target',
101           'conditions' : ['ENABLE_INITRD'],
102         },
103         {
104           'file' : 'integritysetup-pre.target',
105           'conditions' : ['HAVE_LIBCRYPTSETUP'],
106         },
107         {
108           'file' : 'integritysetup.target',
109           'conditions' : ['HAVE_LIBCRYPTSETUP'],
110           'symlinks' : ['sysinit.target.wants/'],
111         },
112         { 'file' : 'kexec.target' },
113         {
114           'file' : 'kmod-static-nodes.service.in',
115           'conditions' : ['HAVE_KMOD', 'ENABLE_TMPFILES'],
116           'symlinks' : ['sysinit.target.wants/'],
117         },
118         {
119           'file' : 'ldconfig.service',
120           'conditions' : ['ENABLE_LDCONFIG'],
121           'symlinks' : ['sysinit.target.wants/'],
122         },
123         { 'file' : 'local-fs-pre.target' },
124         { 'file' : 'local-fs.target' },
125         {
126           'file' : 'machine.slice',
127           'conditions' : ['ENABLE_MACHINED'],
128         },
129         {
130           'file' : 'machines.target',
131           'conditions' : ['ENABLE_MACHINED'],
132         },
133         { 'file' : 'modprobe@.service' },
134         {
135           'file' : 'multi-user.target',
136           'symlinks' : with_runlevels ? ['runlevel2.target', 'runlevel3.target', 'runlevel4.target'] : [],
137         },
138         { 'file' : 'network-online.target' },
139         { 'file' : 'network-pre.target' },
140         { 'file' : 'network.target' },
141         { 'file' : 'nss-lookup.target' },
142         { 'file' : 'nss-user-lookup.target' },
143         { 'file' : 'paths.target' },
144         {
145           'file' : 'poweroff.target',
146           'symlinks' : with_runlevels ? ['runlevel0.target'] : [],
147         },
148         { 'file' : 'printer.target' },
149         {
150           'file' : 'proc-sys-fs-binfmt_misc.automount',
151           'conditions' : ['ENABLE_BINFMT'],
152           'symlinks' : ['sysinit.target.wants/'],
153         },
154         {
155           'file' : 'proc-sys-fs-binfmt_misc.mount',
156           'conditions' : ['ENABLE_BINFMT'],
157         },
158         {
159           'file' : 'quotaon.service.in',
160           'conditions' : ['ENABLE_QUOTACHECK'],
161         },
162         {
163           'file' : 'rc-local.service.in',
164           'conditions' : ['HAVE_SYSV_COMPAT'],
165         },
166         {
167           'file' : 'reboot.target',
168           'symlinks' : ['ctrl-alt-del.target'] + (with_runlevels ? ['runlevel6.target'] : []),
169         },
170         {
171           'file' : 'remote-cryptsetup.target',
172           'conditions' : ['HAVE_LIBCRYPTSETUP'],
173           'symlinks' : ['initrd-root-device.target.wants/'],
174         },
175         { 'file' : 'remote-fs-pre.target' },
176         { 'file' : 'remote-fs.target' },
177         {
178           'file' : 'remote-veritysetup.target',
179           'conditions' : ['HAVE_LIBCRYPTSETUP'],
180           'symlinks' : ['initrd-root-device.target.wants/'],
181         },
182         { 'file' : 'rescue.service.in' },
183         {
184           'file' : 'rescue.target',
185           'symlinks' : with_runlevels ? ['runlevel1.target'] : [],
186         },
187         { 'file' : 'rpcbind.target' },
188         { 'file' : 'serial-getty@.service.in' },
189         { 'file' : 'shutdown.target' },
190         { 'file' : 'sigpwr.target' },
191         { 'file' : 'sleep.target' },
192         { 'file' : 'slices.target' },
193         { 'file' : 'smartcard.target' },
194         { 'file' : 'sockets.target' },
195         { 'file' : 'soft-reboot.target' },
196         { 'file' : 'sound.target' },
197         {
198           'file' : 'suspend-then-hibernate.target',
199           'conditions' : ['ENABLE_HIBERNATE'],
200         },
201         { 'file' : 'suspend.target' },
202         { 'file' : 'swap.target' },
203         {
204           'file' : 'sys-fs-fuse-connections.mount',
205           'symlinks' : ['sysinit.target.wants/'],
206         },
207         {
208           'file' : 'sys-kernel-config.mount',
209           'symlinks' : ['sysinit.target.wants/'],
210         },
211         {
212           'file' : 'sys-kernel-debug.mount',
213           'symlinks' : ['sysinit.target.wants/'],
214         },
215         {
216           'file' : 'sys-kernel-tracing.mount',
217           'symlinks' : ['sysinit.target.wants/'],
218         },
219         { 'file' : 'sysinit.target' },
220         { 'file' : 'syslog.socket' },
221         {
222           'file' : 'system-systemd\\x2dcryptsetup.slice',
223           'conditions' : ['HAVE_LIBCRYPTSETUP'],
224         },
225         {
226           'file' : 'system-systemd\\x2dveritysetup.slice',
227           'conditions' : ['HAVE_LIBCRYPTSETUP'],
228         },
229         { 'file' : 'system-update-cleanup.service' },
230         { 'file' : 'system-update-pre.target' },
231         { 'file' : 'system-update.target' },
232         {
233           'file' : 'systemd-ask-password-console.path',
234           'symlinks' : ['sysinit.target.wants/'],
235         },
236         { 'file' : 'systemd-ask-password-console.service' },
237         {
238           'file' : 'systemd-ask-password-wall.path',
239           'symlinks' : ['multi-user.target.wants/'],
240         },
241         { 'file' : 'systemd-ask-password-wall.service' },
242         {
243           'file' : 'systemd-backlight@.service.in',
244           'conditions' : ['ENABLE_BACKLIGHT'],
245         },
246         {
247           'file' : 'systemd-binfmt.service.in',
248           'conditions' : ['ENABLE_BINFMT'],
249           'symlinks' : ['sysinit.target.wants/'],
250         },
251         {
252           'file' : 'systemd-bless-boot.service.in',
253           'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_BLKID'],
254         },
255         { 'file' : 'systemd-boot-check-no-failures.service.in' },
256         {
257           'file' : 'systemd-boot-random-seed.service',
258           'conditions' : ['ENABLE_BOOTLOADER'],
259           'symlinks' : ['sysinit.target.wants/'],
260         },
261         {
262           'file' : 'systemd-boot-update.service',
263           'conditions' : ['ENABLE_BOOTLOADER'],
264         },
265         {
266           'file' : 'systemd-confext.service',
267           'conditions' : ['ENABLE_SYSEXT'],
268         },
269         {
270           'file' : 'systemd-coredump.socket',
271           'conditions' : ['ENABLE_COREDUMP'],
272           'symlinks' : ['sockets.target.wants/'],
273         },
274         {
275           'file' : 'systemd-coredump@.service.in',
276           'conditions' : ['ENABLE_COREDUMP'],
277         },
278         { 'file' : 'systemd-exit.service' },
279         {
280           'file' : 'systemd-firstboot.service',
281           'conditions' : ['ENABLE_FIRSTBOOT'],
282           'symlinks' : ['sysinit.target.wants/'],
283         },
284         { 'file' : 'systemd-fsck-root.service.in' },
285         { 'file' : 'systemd-fsck@.service.in' },
286         { 'file' : 'systemd-growfs-root.service.in' },
287         { 'file' : 'systemd-growfs@.service.in' },
288         { 'file' : 'systemd-halt.service' },
289         {
290           'file' : 'systemd-hibernate.service.in',
291           'conditions' : ['ENABLE_HIBERNATE'],
292         },
293         {
294           'file' : 'systemd-homed-activate.service',
295           'conditions' : ['ENABLE_HOMED'],
296         },
297         {
298           'file' : 'systemd-homed.service.in',
299           'conditions' : ['ENABLE_HOMED'],
300         },
301         {
302           'file' : 'systemd-hostnamed.service.in',
303           'conditions' : ['ENABLE_HOSTNAMED'],
304           'symlinks' : ['dbus-org.freedesktop.hostname1.service'],
305         },
306         {
307           'file' : 'systemd-hwdb-update.service.in',
308           'conditions' : ['ENABLE_HWDB'],
309           'symlinks' : ['sysinit.target.wants/'],
310         },
311         {
312           'file' : 'systemd-hybrid-sleep.service.in',
313           'conditions' : ['ENABLE_HIBERNATE'],
314         },
315         {
316           'file' : 'systemd-importd.service.in',
317           'conditions' : ['ENABLE_IMPORTD'],
318           'symlinks' : ['dbus-org.freedesktop.import1.service'],
319         },
320         {
321           'file' : 'systemd-initctl.service.in',
322           'conditions' : ['HAVE_SYSV_COMPAT'],
323         },
324         {
325           'file' : 'systemd-initctl.socket',
326           'conditions' : ['HAVE_SYSV_COMPAT'],
327           'symlinks' : ['sockets.target.wants/'],
328         },
329         {
330           'file' : 'systemd-journal-catalog-update.service',
331           'symlinks' : ['sysinit.target.wants/'],
332         },
333         {
334           'file' : 'systemd-journal-flush.service',
335           'symlinks' : ['sysinit.target.wants/'],
336         },
337         {
338           'file' : 'systemd-journal-gatewayd.service.in',
339           'conditions' : ['ENABLE_REMOTE', 'HAVE_MICROHTTPD'],
340         },
341         {
342           'file' : 'systemd-journal-gatewayd.socket',
343           'conditions' : ['ENABLE_REMOTE', 'HAVE_MICROHTTPD'],
344         },
345         {
346           'file' : 'systemd-journal-remote.service.in',
347           'conditions' : ['ENABLE_REMOTE', 'HAVE_MICROHTTPD'],
348         },
349         {
350           'file' : 'systemd-journal-remote.socket',
351           'conditions' : ['ENABLE_REMOTE', 'HAVE_MICROHTTPD'],
352         },
353         {
354           'file' : 'systemd-journal-upload.service.in',
355           'conditions' : ['ENABLE_REMOTE', 'HAVE_LIBCURL'],
356         },
357         { 'file' : 'systemd-journald-audit.socket' },
358         {
359           'file' : 'systemd-journald-dev-log.socket',
360           'symlinks' : ['sockets.target.wants/'],
361         },
362         { 'file' : 'systemd-journald-varlink@.socket' },
363         {
364           'file' : 'systemd-journald.service.in',
365           'symlinks' : ['sysinit.target.wants/'],
366         },
367         {
368           'file' : 'systemd-journald.socket',
369           'symlinks' : ['sockets.target.wants/'],
370         },
371         { 'file' : 'systemd-journald@.service.in' },
372         { 'file' : 'systemd-journald@.socket' },
373         { 'file' : 'systemd-kexec.service' },
374         {
375           'file' : 'systemd-localed.service.in',
376           'conditions' : ['ENABLE_LOCALED'],
377           'symlinks' : ['dbus-org.freedesktop.locale1.service'],
378         },
379         {
380           'file' : 'systemd-logind.service.in',
381           'conditions' : ['ENABLE_LOGIND'],
382           'symlinks' : ['multi-user.target.wants/', 'dbus-org.freedesktop.login1.service'],
383         },
384         {
385           'file' : 'systemd-machine-id-commit.service',
386           'symlinks' : ['sysinit.target.wants/'],
387         },
388         {
389           'file' : 'systemd-machined.service.in',
390           'conditions' : ['ENABLE_MACHINED'],
391           'symlinks' : ['dbus-org.freedesktop.machine1.service'],
392         },
393         {
394           'file' : 'systemd-modules-load.service.in',
395           'conditions' : ['HAVE_KMOD'],
396           'symlinks' : ['sysinit.target.wants/'],
397         },
398         { 'file' : 'systemd-network-generator.service.in' },
399         {
400           'file' : 'systemd-networkd-wait-online.service.in',
401           'conditions' : ['ENABLE_NETWORKD'],
402         },
403         {
404           'file' : 'systemd-networkd-wait-online@.service.in',
405           'conditions' : ['ENABLE_NETWORKD'],
406         },
407         {
408           'file' : 'systemd-networkd.service.in',
409           'conditions' : ['ENABLE_NETWORKD'],
410         },
411         {
412           'file' : 'systemd-networkd.socket',
413           'conditions' : ['ENABLE_NETWORKD'],
414         },
415         { 'file' : 'systemd-nspawn@.service.in' },
416         {
417           'file' : 'systemd-oomd.service.in',
418           'conditions' : ['ENABLE_OOMD'],
419         },
420         {
421           'file' : 'systemd-oomd.socket',
422           'conditions' : ['ENABLE_OOMD'],
423         },
424         {
425           'file' : 'systemd-pcrfs-root.service.in',
426           'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
427         },
428         {
429           'file' : 'systemd-pcrfs@.service.in',
430           'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
431         },
432         {
433           'file' : 'systemd-pcrmachine.service.in',
434           'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
435           'symlinks' : ['sysinit.target.wants/'],
436         },
437         {
438           'file' : 'systemd-pcrphase-initrd.service.in',
439           'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2', 'ENABLE_INITRD'],
440           'symlinks' : ['initrd.target.wants/'],
441         },
442         {
443           'file' : 'systemd-pcrphase-sysinit.service.in',
444           'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
445           'symlinks' : ['sysinit.target.wants/'],
446         },
447         {
448           'file' : 'systemd-pcrphase.service.in',
449           'conditions' : ['ENABLE_BOOTLOADER', 'HAVE_OPENSSL', 'HAVE_TPM2'],
450           'symlinks' : ['sysinit.target.wants/'],
451         },
452         {
453           'file' : 'systemd-portabled.service.in',
454           'conditions' : ['ENABLE_PORTABLED'],
455           'symlinks' : ['dbus-org.freedesktop.portable1.service'],
456         },
457         { 'file' : 'systemd-poweroff.service' },
458         {
459           'file' : 'systemd-pstore.service.in',
460           'conditions' : ['ENABLE_PSTORE'],
461         },
462         {
463           'file' : 'systemd-quotacheck.service.in',
464           'conditions' : ['ENABLE_QUOTACHECK'],
465         },
466         {
467           'file' : 'systemd-random-seed.service.in',
468           'conditions' : ['ENABLE_RANDOMSEED'],
469           'symlinks' : ['sysinit.target.wants/'],
470         },
471         { 'file' : 'systemd-reboot.service' },
472         { 'file' : 'systemd-remount-fs.service.in' },
473         {
474           'file' : 'systemd-repart.service.in',
475           'conditions' : ['ENABLE_REPART'],
476           'symlinks' : ['sysinit.target.wants/', 'initrd-root-fs.target.wants/'],
477         },
478         {
479           'file' : 'systemd-resolved.service.in',
480           'conditions' : ['ENABLE_RESOLVE'],
481         },
482         {
483           'file' : 'systemd-rfkill.service.in',
484           'conditions' : ['ENABLE_RFKILL'],
485         },
486         {
487           'file' : 'systemd-rfkill.socket',
488           'conditions' : ['ENABLE_RFKILL'],
489         },
490         { 'file' : 'systemd-soft-reboot.service' },
491         {
492           'file' : 'systemd-suspend-then-hibernate.service.in',
493           'conditions' : ['ENABLE_HIBERNATE'],
494         },
495         { 'file' : 'systemd-suspend.service.in' },
496         {
497           'file' : 'systemd-sysctl.service.in',
498           'symlinks' : ['sysinit.target.wants/'],
499         },
500         {
501           'file' : 'systemd-sysext.service',
502           'conditions' : ['ENABLE_SYSEXT'],
503         },
504         {
505           'file' : 'systemd-sysupdate-reboot.service.in',
506           'conditions' : ['ENABLE_SYSUPDATE'],
507         },
508         {
509           'file' : 'systemd-sysupdate-reboot.timer',
510           'conditions' : ['ENABLE_SYSUPDATE'],
511         },
512         {
513           'file' : 'systemd-sysupdate.service.in',
514           'conditions' : ['ENABLE_SYSUPDATE'],
515         },
516         {
517           'file' : 'systemd-sysupdate.timer',
518           'conditions' : ['ENABLE_SYSUPDATE'],
519         },
520         {
521           'file' : 'systemd-sysusers.service',
522           'conditions' : ['ENABLE_SYSUSERS'],
523           'symlinks' : ['sysinit.target.wants/'],
524         },
525         {
526           'file' : 'systemd-time-wait-sync.service.in',
527           'conditions' : ['ENABLE_TIMESYNCD'],
528         },
529         {
530           'file' : 'systemd-timedated.service.in',
531           'conditions' : ['ENABLE_TIMEDATED'],
532           'symlinks' : ['dbus-org.freedesktop.timedate1.service'],
533         },
534         {
535           'file' : 'systemd-timesyncd.service.in',
536           'conditions' : ['ENABLE_TIMESYNCD'],
537         },
538         {
539           'file' : 'systemd-tmpfiles-clean.service',
540           'conditions' : ['ENABLE_TMPFILES'],
541         },
542         {
543           'file' : 'systemd-tmpfiles-clean.timer',
544           'conditions' : ['ENABLE_TMPFILES'],
545           'symlinks' : ['timers.target.wants/'],
546         },
547         {
548           'file' : 'systemd-tmpfiles-setup-dev-early.service',
549           'conditions' : ['ENABLE_TMPFILES'],
550           'symlinks' : ['sysinit.target.wants/'],
551         },
552         {
553           'file' : 'systemd-tmpfiles-setup-dev.service',
554           'conditions' : ['ENABLE_TMPFILES'],
555           'symlinks' : ['sysinit.target.wants/'],
556         },
557         {
558           'file' : 'systemd-tmpfiles-setup.service',
559           'conditions' : ['ENABLE_TMPFILES'],
560           'symlinks' : ['sysinit.target.wants/'],
561         },
562         { 'file' : 'systemd-udev-settle.service' },
563         {
564           'file' : 'systemd-udev-trigger.service',
565           'symlinks' : ['sysinit.target.wants/'],
566         },
567         {
568           'file' : 'systemd-udevd-control.socket',
569           'symlinks' : ['sockets.target.wants/'],
570         },
571         {
572           'file' : 'systemd-udevd-kernel.socket',
573           'symlinks' : ['sockets.target.wants/'],
574         },
575         {
576           'file' : 'systemd-udevd.service.in',
577           'symlinks' : ['sysinit.target.wants/'],
578         },
579         {
580           'file' : 'systemd-update-done.service.in',
581           'symlinks' : ['sysinit.target.wants/'],
582         },
583         {
584           'file' : 'systemd-update-utmp-runlevel.service.in',
585           'conditions' : ['ENABLE_UTMP', 'HAVE_SYSV_COMPAT'],
586           'symlinks' : ['multi-user.target.wants/', 'graphical.target.wants/', 'rescue.target.wants/'],
587         },
588         {
589           'file' : 'systemd-update-utmp.service.in',
590           'conditions' : ['ENABLE_UTMP'],
591           'symlinks' : ['sysinit.target.wants/'],
592         },
593         {
594           'file' : 'systemd-user-sessions.service.in',
595           'conditions' : ['HAVE_PAM'],
596           'symlinks' : ['multi-user.target.wants/'],
597         },
598         {
599           'file' : 'systemd-userdbd.service.in',
600           'conditions' : ['ENABLE_USERDB'],
601         },
602         {
603           'file' : 'systemd-userdbd.socket',
604           'conditions' : ['ENABLE_USERDB'],
605         },
606         {
607           'file' : 'systemd-vconsole-setup.service.in',
608           'conditions' : ['ENABLE_VCONSOLE'],
609         },
610         {
611           'file' : 'systemd-volatile-root.service.in',
612           'conditions' : ['ENABLE_INITRD'],
613         },
614         { 'file' : 'time-set.target' },
615         { 'file' : 'time-sync.target' },
616         { 'file' : 'timers.target' },
617         {
618           'file' : 'tmp.mount',
619           'symlinks' : ['local-fs.target.wants/'],
620         },
621         { 'file' : 'umount.target' },
622         { 'file' : 'usb-gadget.target' },
623         { 'file' : 'user-runtime-dir@.service.in' },
624         { 'file' : 'user.slice' },
625         { 'file' : 'user@.service.in' },
626         {
627           'file' : 'var-lib-machines.mount',
628           'conditions' : ['ENABLE_MACHINED'],
629           'symlinks' : ['remote-fs.target.wants/', 'machines.target.wants/'],
630         },
631         {
632           'file' : 'veritysetup-pre.target',
633           'conditions' : ['HAVE_LIBCRYPTSETUP'],
634         },
635         {
636           'file' : 'veritysetup.target',
637           'conditions' : ['HAVE_LIBCRYPTSETUP'],
638           'symlinks' : ['sysinit.target.wants/'],
639         },
642 add_wants = []
644 foreach unit : units
645         source = unit.get('file')
647         if source.endswith('.in')
648                 needs_jinja = true
649                 name = source.substring(0, -3)
650                 assert(name + '.in' == source)
651         else
652                 needs_jinja = false
653                 name = source
654         endif
655         source = files(source)
657         install = true
658         foreach cond : unit.get('conditions', [])
659                 if conf.get(cond) != 1
660                         install = false
661                         break
662                 endif
663         endforeach
665         if needs_jinja
666                 custom_target(
667                         name,
668                         input : source,
669                         output : name,
670                         command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
671                         install : install,
672                         install_dir : systemunitdir)
673         elif install
674                 install_data(source,
675                              install_dir : systemunitdir)
676         endif
678         if install
679                 foreach target : unit.get('symlinks', [])
680                         add_wants += [systemunitdir, target, name]
681                 endforeach
682         endif
683 endforeach
685 meson.add_install_script('meson-add-wants.sh', add_wants)
687 install_data('user-.slice.d/10-defaults.conf',
688              install_dir : systemunitdir + '/user-.slice.d')
690 install_data('user@.service.d/10-login-barrier.conf',
691              install_dir : systemunitdir + '/user@.service.d')
692 install_data('user@0.service.d/10-login-barrier.conf',
693              install_dir : systemunitdir + '/user@0.service.d')
695 ############################################################
697 if install_sysconfdir
698         meson.add_install_script(meson_make_symlink,
699                                  pkgsysconfdir / 'user',
700                                  sysconfdir / 'xdg/systemd/user')
701 endif
702 meson.add_install_script(meson_make_symlink,
703                          dbussystemservicedir / 'org.freedesktop.systemd1.service',
704                          dbussessionservicedir / 'org.freedesktop.systemd1.service')
705 if conf.get('HAVE_SYSV_COMPAT') == 1
706         foreach i : [1, 2, 3, 4, 5]
707                 meson.add_install_script(
708                         'sh', '-c',
709                         mkdir_p.format(systemunitdir / 'runlevel@0@.target.wants'.format(i)))
710         endforeach
711 endif
713 subdir('user')