%meson \
-Drunstatedir=%{_rundir} \
-Dinitconfdir=%{_sysconfdir}/sysconfig \
+ -Dunitdir=%{_unitdir} \
%{?arg_qemu} \
%{?arg_openvz} \
%{?arg_lxc} \
endif
endif
+unitdir = get_option('unitdir')
+if unitdir == ''
+ unitdir = prefix / 'lib' / 'systemd' / 'system'
+endif
+
bindir = prefix / get_option('bindir')
datadir = prefix / get_option('datadir')
includedir = prefix / get_option('includedir')
option('system', type: 'boolean', value: false, description: 'Set install paths to system ones')
option('runstatedir', type: 'string', value: '', description: 'State directory for temporary sockets, pid files, etc')
option('initconfdir', type: 'string', value: '', description: 'directory for init script configuration files')
+option('unitdir', type: 'string', value: '', description: 'directory for systemd unit files')
# dep:tests
option('expensive_tests', type: 'feature', value: 'auto', description: 'set the default for enabling expensive tests (long timeouts)')
option('test_coverage', type: 'boolean', value: false, description: 'turn on code coverage instrumentation')
if conf.has('WITH_LIBVIRTD')
# Generate systemd service and socket unit files
if init_script == 'systemd'
- systemd_unit_dir = prefix / 'lib' / 'systemd' / 'system'
-
install_data(
guest_unit_files,
- install_dir: systemd_unit_dir,
+ install_dir: unitdir,
)
if conf.has('WITH_POLKIT')
output: service_out,
configuration: unit_conf,
install: true,
- install_dir: systemd_unit_dir,
+ install_dir: unitdir,
)
foreach socket : unit.get('sockets', [ 'main', 'ro', 'admin' ])
output: socket_out,
configuration: unit_conf,
install: true,
- install_dir: systemd_unit_dir,
+ install_dir: unitdir,
)
endforeach
endforeach