2017-12-29 17:12:55 +01:00
|
|
|
systemd_user_unit_dir = get_option('systemd_user_unit_dir')
|
2023-04-11 21:06:53 +02:00
|
|
|
if systemd_user_unit_dir == ''
|
|
|
|
systemd = dependency('systemd', required: false)
|
|
|
|
if systemd.found()
|
2023-05-22 22:23:38 +02:00
|
|
|
systemd_user_unit_dir = systemd.get_variable(
|
|
|
|
pkgconfig: 'systemduserunitdir',
|
|
|
|
pkgconfig_define: ['prefix', get_option('prefix')],
|
|
|
|
)
|
2023-04-11 21:06:53 +02:00
|
|
|
endif
|
|
|
|
endif
|
2017-12-29 17:12:55 +01:00
|
|
|
if systemd_user_unit_dir == ''
|
|
|
|
systemd_user_unit_dir = join_paths(get_option('prefix'), 'lib', 'systemd', 'user')
|
|
|
|
endif
|
|
|
|
|
2023-09-15 21:04:38 +02:00
|
|
|
configure_file(
|
|
|
|
input: join_paths('..', 'system', 'mpd.socket.in'),
|
|
|
|
output: 'mpd.socket',
|
|
|
|
configuration: systemd_socket_conf,
|
2019-04-10 16:37:13 +02:00
|
|
|
install_dir: systemd_user_unit_dir,
|
|
|
|
)
|
|
|
|
|
2017-12-29 17:12:55 +01:00
|
|
|
configure_file(
|
|
|
|
input: 'mpd.service.in',
|
|
|
|
output: 'mpd.service',
|
|
|
|
configuration: systemd_unit_conf,
|
|
|
|
install_dir: systemd_user_unit_dir,
|
|
|
|
)
|