mirror of
https://github.com/linux-speakup/espeakup.git
synced 2026-08-09 09:19:09 +02:00
Allows building the service files without a systemd dependency by defining a default systemd user unit directory. Relevant in Alpine, where we can package the service files in a subpackage without having systemd in Alpine. Addresses feedback of https://github.com/linux-speakup/espeakup/pull/64, therefore superseeds it.
20 lines
507 B
Meson
20 lines
507 B
Meson
if systemd.found()
|
|
unitdir = systemd.get_variable(pkgconfig: 'systemdsystemunitdir')
|
|
else
|
|
unitdir = join_paths(prefixdir, get_option('libdir'), 'systemd', 'system')
|
|
endif
|
|
prefixdir = get_option('prefix')
|
|
bindir = join_paths(prefixdir, get_option('bindir'))
|
|
|
|
unit_conf = configuration_data()
|
|
unit_conf.set('bindir', bindir)
|
|
|
|
service_file = configure_file(
|
|
input : 'espeakup.service.in',
|
|
output : 'espeakup.service',
|
|
configuration : unit_conf
|
|
)
|
|
|
|
install_data(service_file,
|
|
install_dir : unitdir
|
|
)
|