Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ After=network.target network-online.target systemd-networkd.service NetworkManag

[Service]
Type=oneshot
ExecStart=/usr/bin/busctl --user call io.elementary.settings-daemon /io/elementary/settings_daemon org.freedesktop.Application ActivateAction sava{sv} "check-firmware-updates" 0 0
ExecStart=@busctl_path@ --user call io.elementary.settings-daemon /io/elementary/settings_daemon org.freedesktop.Application ActivateAction sava{sv} "check-firmware-updates" 0 0
35 changes: 25 additions & 10 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,33 @@ i18n.merge_file(
install_dir: get_option('datadir') / 'metainfo',
)

systemd = dependency('systemd')
systemd_system_unit_dir = systemd.get_variable('systemdsystemunitdir')
busctl_path = get_option('busctlpath')
systemd_system_unit_dir = get_option('systemdsystemunitdir')

install_data(
meson.project_name() + '.check-for-firmware-updates.service',
install_dir: systemd_system_unit_dir
)
if systemd_system_unit_dir != 'no'
systemd = dependency('systemd')
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'
endif

install_data(
meson.project_name() + '.check-for-firmware-updates.timer',
install_dir: systemd_system_unit_dir
)
service_config = configuration_data()
service_config.set('busctl_path', busctl_path)

configure_file(
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_system_unit_dir
)

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

icon_sizes = ['24', '32', '48', '64', '128']

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