2017-12-29 17:12:55 +01:00
|
|
|
systemd_system_unit_dir = get_option('systemd_system_unit_dir')
|
2023-04-11 21:06:53 +02:00
|
|
|
if systemd_system_unit_dir == ''
|
|
|
|
systemd = dependency('systemd', required: false)
|
|
|
|
if systemd.found()
|
2023-05-22 22:23:38 +02:00
|
|
|
systemd_system_unit_dir = systemd.get_variable(
|
|
|
|
pkgconfig: 'systemdsystemunitdir',
|
2023-05-27 21:58:00 +02:00
|
|
|
pkgconfig_define: ['rootprefix', get_option('prefix')],
|
2023-05-22 22:23:38 +02:00
|
|
|
)
|
2023-04-11 21:06:53 +02:00
|
|
|
endif
|
|
|
|
endif
|
2017-12-29 17:12:55 +01:00
|
|
|
if systemd_system_unit_dir == ''
|
|
|
|
systemd_system_unit_dir = join_paths(get_option('prefix'), 'lib', 'systemd', 'system')
|
|
|
|
endif
|
|
|
|
|
|
|
|
install_data(
|
|
|
|
'mpd.socket',
|
|
|
|
install_dir: systemd_system_unit_dir,
|
|
|
|
)
|
|
|
|
|
|
|
|
configure_file(
|
|
|
|
input: 'mpd.service.in',
|
|
|
|
output: 'mpd.service',
|
|
|
|
configuration: systemd_unit_conf,
|
|
|
|
install_dir: systemd_system_unit_dir,
|
|
|
|
)
|