Skip to content

Commit

Permalink
Change back to system unit dir
Browse files Browse the repository at this point in the history
  • Loading branch information
leolost2605 committed Jan 23, 2024
1 parent 8a5c0bf commit 4f1a487
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ i18n.merge_file(
)

busctl_path = get_option('busctlpath')
systemd_user_unit_dir = get_option('systemduserunitdir')
systemd_system_unit_dir = get_option('systemdsystemunitdir')

if systemd_user_unit_dir != 'no'
if systemd_system_unit_dir != 'no'
systemd = dependency('systemd')
if systemd_user_unit_dir == ''
systemd_user_unit_dir = systemd.get_variable('systemduserunitdir', pkgconfig_define: ['rootprefix', prefix])
if systemd_system_unit_dir == ''
systemd_system_unit_dir = systemd.get_variable('systemdsystemunitdir', pkgconfig_define: ['rootprefix', prefix])
endif
if busctl_path == ''
busctl_path = systemd.get_variable('prefix') / 'bin' / 'busctl'
Expand All @@ -61,24 +61,24 @@ if systemd_user_unit_dir != 'no'
input: meson.project_name() + '.check-for-firmware-updates.service.in',
output: meson.project_name() + '.check-for-firmware-updates.service',
configuration: service_config,
install_dir: systemd_user_unit_dir
install_dir: systemd_system_unit_dir
)

install_data(
meson.project_name() + '.check-for-firmware-updates.timer',
install_dir: systemd_user_unit_dir
install_dir: systemd_system_unit_dir
)

configure_file(
input: meson.project_name() + '.check-for-system-updates.service.in',
output: meson.project_name() + '.check-for-system-updates.service',
configuration: service_config,
install_dir: systemd_user_unit_dir
install_dir: systemd_system_unit_dir
)

install_data(
meson.project_name() + '.check-for-system-updates.timer',
install_dir: systemd_user_unit_dir
install_dir: systemd_system_unit_dir
)
endif

Expand Down
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
option('busctlpath', type: 'string', value: '', description: 'custom path to busctl executable')
option('systemdsystemunitdir', type: 'string', value: '', description: 'custom directory for systemd user units, or \'no\' to disable')
option('systemduserunitdir', type: 'string', value: '', description: 'custom directory for systemd user units, or \'no\' to disable')

0 comments on commit 4f1a487

Please sign in to comment.