Files
systemd/units/user/meson.build
T
Zbigniew Jędrzejewski-Szmek 29832663dc meson: drop remaining target names
Most of those were dropped in 7d247d3cb8. I left
behind the few cases where the 'output' name was different from the target name.
But we actually don't need those either, so get rid of those. (And one case
where I missed the name argument.)

No functional change, except that e.g. 'ninja -C build update-man-rules-impl'
doesn't work, but I hope nobody was using that.
2025-10-04 18:13:27 +02:00

111 lines
3.7 KiB
Meson

# SPDX-License-Identifier: LGPL-2.1-or-later
units = [
{ 'file' : 'app.slice' },
{ 'file' : 'background.slice' },
{ 'file' : 'basic.target' },
{ 'file' : 'bluetooth.target' },
{ 'file' : 'capsule@.target' },
{ 'file' : 'default.target' },
{ 'file' : 'exit.target' },
{ 'file' : 'graphical-session-pre.target' },
{ 'file' : 'graphical-session.target' },
{
'file' : 'machine.slice',
'conditions' : ['ENABLE_MACHINED'],
},
{
'file' : 'machines.target',
'conditions' : ['ENABLE_MACHINED'],
},
{
'file' : 'systemd-machined.service.in',
'conditions' : ['ENABLE_MACHINED'],
'symlinks' : ['dbus-org.freedesktop.machine1.service'],
},
{
'file' : 'systemd-machined.socket',
'conditions' : ['ENABLE_MACHINED'],
'symlinks' : ['sockets.target.wants/'],
},
{ 'file' : 'paths.target' },
{ 'file' : 'printer.target' },
{ 'file' : 'session.slice' },
{ 'file' : 'shutdown.target' },
{ 'file' : 'smartcard.target' },
{ 'file' : 'sockets.target' },
{ 'file' : 'sound.target' },
{
'file' : 'systemd-ask-password.socket',
'symlinks' : ['sockets.target.wants/']
},
{ 'file' : 'systemd-ask-password@.service' },
{ 'file' : 'systemd-exit.service' },
{ 'file' : 'systemd-tmpfiles-clean.service' },
{ 'file' : 'systemd-tmpfiles-clean.timer' },
{ 'file' : 'systemd-tmpfiles-setup.service' },
{
'file' : 'systemd-nspawn@.service.in',
'conditions' : ['ENABLE_NSPAWN'],
},
{
'file' : 'systemd-vmspawn@.service.in',
'conditions' : ['ENABLE_VMSPAWN'],
},
{ 'file' : 'timers.target' },
{
'file' : 'xdg-desktop-autostart.target',
'conditions': ['ENABLE_XDG_AUTOSTART'],
}
]
foreach unit : units
source = unit.get('file')
if source.endswith('.in')
needs_jinja = true
name = source.substring(0, -3)
assert(name + '.in' == source)
else
needs_jinja = false
name = source
endif
source = files(source)
install = true
foreach cond : unit.get('conditions', [])
if conf.get(cond) != 1
install = false
break
endif
endforeach
if needs_jinja
t = custom_target(
input : source,
output : name,
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : install,
install_dir : userunitdir)
elif install
install_data(source,
install_dir : userunitdir)
endif
if install
foreach target : unit.get('symlinks', [])
if target.endswith('/')
# '/' is only allowed at the end of the target
assert(target.replace('/', '') + '/' == target)
install_symlink(name,
pointing_to : '..' / name,
install_dir : userunitdir / target)
else
install_symlink(target,
pointing_to : name,
install_dir : userunitdir)
endif
endforeach
endif
endforeach