summaryrefslogtreecommitdiffstats
path: root/units/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'units/meson.build')
-rw-r--r--units/meson.build37
1 files changed, 21 insertions, 16 deletions
diff --git a/units/meson.build b/units/meson.build
index 221bfa706b..cb1be83599 100644
--- a/units/meson.build
+++ b/units/meson.build
@@ -550,6 +550,11 @@ units = [
'symlinks' : ['timers.target.wants/'],
},
{
+ 'file' : 'systemd-tmpfiles-setup-dev-early.service',
+ 'conditions' : ['ENABLE_TMPFILES'],
+ 'symlinks' : ['sysinit.target.wants/'],
+ },
+ {
'file' : 'systemd-tmpfiles-setup-dev.service',
'conditions' : ['ENABLE_TMPFILES'],
'symlinks' : ['sysinit.target.wants/'],
@@ -639,8 +644,6 @@ units = [
},
]
-add_wants = []
-
foreach unit : units
source = unit.get('file')
@@ -677,13 +680,20 @@ foreach unit : units
if install
foreach target : unit.get('symlinks', [])
- add_wants += [systemunitdir, target, name]
+ if target.endswith('/')
+ install_emptydir(systemunitdir / target)
+ meson.add_install_script(sh, '-c',
+ ln_s.format(systemunitdir / name,
+ systemunitdir / target / name))
+ else
+ meson.add_install_script(sh, '-c',
+ ln_s.format(systemunitdir / name,
+ systemunitdir / target))
+ endif
endforeach
endif
endforeach
-meson.add_install_script('meson-add-wants.sh', add_wants)
-
install_data('user-.slice.d/10-defaults.conf',
install_dir : systemunitdir + '/user-.slice.d')
@@ -694,19 +704,14 @@ install_data('user@0.service.d/10-login-barrier.conf',
############################################################
-if install_sysconfdir
- meson.add_install_script(meson_make_symlink,
- pkgsysconfdir / 'user',
- sysconfdir / 'xdg/systemd/user')
-endif
-meson.add_install_script(meson_make_symlink,
- dbussystemservicedir / 'org.freedesktop.systemd1.service',
- dbussessionservicedir / 'org.freedesktop.systemd1.service')
+install_emptydir(dbussessionservicedir)
+meson.add_install_script(sh, '-c',
+ ln_s.format(dbussystemservicedir / 'org.freedesktop.systemd1.service',
+ dbussessionservicedir / 'org.freedesktop.systemd1.service'))
+
if conf.get('HAVE_SYSV_COMPAT') == 1
foreach i : [1, 2, 3, 4, 5]
- meson.add_install_script(
- 'sh', '-c',
- mkdir_p.format(systemunitdir / 'runlevel@0@.target.wants'.format(i)))
+ install_emptydir(systemunitdir / 'runlevel@0@.target.wants'.format(i))
endforeach
endif