@@ -47,12 +47,16 @@ i18n.merge_file(
4747
4848busctl_path = get_option (' busctlpath' )
4949systemd_system_unit_dir = get_option (' systemdsystemunitdir' )
50+ systemd_user_unit_dir = get_option (' systemduserunitdir' )
5051
51- if systemd_system_unit_dir != ' no'
52+ if systemd_system_unit_dir != ' no' and systemd_user_unit_dir != ' no '
5253 systemd = dependency (' systemd' )
5354 if systemd_system_unit_dir == ''
5455 systemd_system_unit_dir = systemd.get_variable (' systemdsystemunitdir' , pkgconfig_define : [' rootprefix' , prefix])
5556 endif
57+ if systemd_user_unit_dir == ''
58+ systemd_user_unit_dir = systemd.get_variable (' systemduserunitdir' , pkgconfig_define : [' prefix' , prefix])
59+ endif
5660 if busctl_path == ''
5761 busctl_path = systemd.get_variable (' prefix' ) / ' bin' / ' busctl'
5862 endif
@@ -71,4 +75,16 @@ if systemd_system_unit_dir != 'no'
7175 meson .project_name() + ' .check-for-firmware-updates.timer' ,
7276 install_dir : systemd_system_unit_dir
7377 )
78+
79+ configure_file (
80+ input : meson .project_name() + ' .system-update.service.in' ,
81+ output : meson .project_name() + ' .system-update.service' ,
82+ configuration : service_config,
83+ install_dir : systemd_user_unit_dir
84+ )
85+
86+ install_data (
87+ meson .project_name() + ' .system-update.timer' ,
88+ install_dir : systemd_user_unit_dir
89+ )
7490endif
0 commit comments