mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-26 07:58:03 -04:00
Allows installation of systemd services without libsystemd installed.
Useful for Alpine Linux where systemd services are allowed to be subpackaged
(e.g. for postmarketOS) but hasn't systemd in it's repos.
The difference in behaviour now is that "systemd-{system,user}-service =
disabled" now actually don't install the units. And that
"systemd-{system,user}-service = enabled" and the explicitly paths set,
install the units
47 lines
1.5 KiB
Meson
47 lines
1.5 KiB
Meson
systemd_user_services_dir = ''
|
|
|
|
systemd = dependency('systemd', required : false)
|
|
if systemd.found()
|
|
systemd_user_services_dir = systemd.get_variable('systemduserunitdir', pkgconfig_define : [ 'prefix', prefix])
|
|
endif
|
|
|
|
if get_option('systemd-user-service').disabled() or (get_option('systemd-user-service').auto() and not systemd.found())
|
|
subdir_done()
|
|
endif
|
|
|
|
if get_option('systemd-user-unit-dir') != ''
|
|
systemd_user_services_dir = get_option('systemd-user-unit-dir')
|
|
endif
|
|
|
|
if systemd_user_services_dir == ''
|
|
subdir_done()
|
|
endif
|
|
|
|
install_data(
|
|
sources : ['pipewire.socket', 'pipewire-pulse.socket'],
|
|
install_dir : systemd_user_services_dir)
|
|
|
|
systemd_config = configuration_data()
|
|
systemd_config.set('PW_BINARY', pipewire_bindir / 'pipewire')
|
|
systemd_config.set('PW_PULSE_BINARY', pipewire_bindir / 'pipewire-pulse')
|
|
|
|
pw_service_reqs = ''
|
|
if get_option('dbus').enabled()
|
|
pw_service_reqs += 'dbus.service '
|
|
endif
|
|
systemd_config.set('PW_SERVICE_REQS', pw_service_reqs)
|
|
|
|
configure_file(input : 'pipewire.service.in',
|
|
output : 'pipewire.service',
|
|
configuration : systemd_config,
|
|
install_dir : systemd_user_services_dir)
|
|
|
|
configure_file(input : 'pipewire-pulse.service.in',
|
|
output : 'pipewire-pulse.service',
|
|
configuration : systemd_config,
|
|
install_dir : systemd_user_services_dir)
|
|
|
|
configure_file(input : 'filter-chain.service.in',
|
|
output : 'filter-chain.service',
|
|
configuration : systemd_config,
|
|
install_dir : systemd_user_services_dir)
|