meson: rename option sytemd_unit_files to systemd_files

parent be33b6dd
...@@ -40,7 +40,7 @@ build() { ...@@ -40,7 +40,7 @@ build() {
--prefix=/usr \ --prefix=/usr \
--sbindir=bin \ --sbindir=bin \
-Dkeyfile_default=/etc/trusted-key.key \ -Dkeyfile_default=/etc/trusted-key.key \
-Dsystemd_unit_files=enabled \ -Dsystemd_files=enabled \
-Dclient=enabled \ -Dclient=enabled \
-Dinstall_kresd_conf=enabled \ -Dinstall_kresd_conf=enabled \
-Dunit_tests=enabled -Dunit_tests=enabled
......
...@@ -24,7 +24,7 @@ override_dh_auto_build: ...@@ -24,7 +24,7 @@ override_dh_auto_build:
--prefix=/usr \ --prefix=/usr \
--libdir=lib \ --libdir=lib \
-Ddoc=enabled \ -Ddoc=enabled \
-Dsystemd_unit_files=enabled \ -Dsystemd_files=enabled \
-Dclient=enabled \ -Dclient=enabled \
-Dkeyfile_default=/usr/share/dns/root.key \ -Dkeyfile_default=/usr/share/dns/root.key \
-Droot_hints=/usr/share/dns/root.hints \ -Droot_hints=/usr/share/dns/root.hints \
......
...@@ -122,9 +122,9 @@ gpg2 --verify %{SOURCE1} %{SOURCE0} ...@@ -122,9 +122,9 @@ gpg2 --verify %{SOURCE1} %{SOURCE0}
CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" meson build_rpm \ CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" meson build_rpm \
%if "x%{?rhel}" == "x" %if "x%{?rhel}" == "x"
-Ddoc=enabled \ -Ddoc=enabled \
-Dsystemd_unit_files=enabled \ -Dsystemd_files=enabled \
%else %else
-Dsystemd_unit_files=nosocket \ -Dsystemd_files=nosocket \
%endif %endif
-Dclient=enabled \ -Dclient=enabled \
-Dunit_tests=enabled \ -Dunit_tests=enabled \
......
...@@ -260,9 +260,9 @@ unit files themselves. ...@@ -260,9 +260,9 @@ unit files themselves.
Depending on your systemd version, choose the appropriate build option: Depending on your systemd version, choose the appropriate build option:
* ``-Dsystemd_unit_files=enabled`` (recommended) installs unit files with * ``-Dsystemd_files=enabled`` (recommended) installs unit files with
systemd socket activation support. Requires systemd >=227. systemd socket activation support. Requires systemd >=227.
* ``-Dsystemd_unit_files=nosocket`` for systemd <227. Unit files won't use * ``-Dsystemd_files=nosocket`` for systemd <227. Unit files won't use
socket activation. socket activation.
To support enabling services after boot, you must also link ``kresd.target`` to To support enabling services after boot, you must also link ``kresd.target`` to
......
...@@ -7,9 +7,9 @@ man_config.set('date', run_command('../scripts/get-date.sh').stdout()) ...@@ -7,9 +7,9 @@ man_config.set('date', run_command('../scripts/get-date.sh').stdout())
man_config.set('keyfile_default', keyfile_default) man_config.set('keyfile_default', keyfile_default)
man_config.set('man_seealso_systemd', '') man_config.set('man_seealso_systemd', '')
if systemd_unit_files == 'enabled' if systemd_files == 'enabled'
man_config.set('man_seealso_systemd', '\\fIkresd.systemd(7)\\fR, ') man_config.set('man_seealso_systemd', '\\fIkresd.systemd(7)\\fR, ')
elif systemd_unit_files == 'nosocket' elif systemd_files == 'nosocket'
man_config.set('man_seealso_systemd', '\\fIkresd.systemd.nosocket(7)\\fR, ') man_config.set('man_seealso_systemd', '\\fIkresd.systemd.nosocket(7)\\fR, ')
endif endif
......
# etc: config examples # etc: config examples
# Config snippets (build-dependant) # Config snippets (build-dependant)
if systemd_unit_files == 'enabled' if systemd_files == 'enabled'
config_defaults = ''' config_defaults = '''
-- Network interface configuration: see kresd.systemd(7)''' -- Network interface configuration: see kresd.systemd(7)'''
else else
......
...@@ -77,9 +77,9 @@ group = get_option('group') ...@@ -77,9 +77,9 @@ group = get_option('group')
## Systemd ## Systemd
message('--- systemd socket activation ---') message('--- systemd socket activation ---')
libsystemd = dependency('libsystemd', version: '>=227', required: false) libsystemd = dependency('libsystemd', version: '>=227', required: false)
systemd_unit_files = get_option('systemd_unit_files') systemd_files = get_option('systemd_files')
if systemd_unit_files == 'enabled' and not libsystemd.found() if systemd_files == 'enabled' and not libsystemd.found()
error('systemd_unit_files=enabled requires libsystemd >= 227') error('systemd_files=enabled requires libsystemd >= 227')
endif endif
message('---------------------------') message('---------------------------')
...@@ -162,7 +162,7 @@ subdir('etc') ...@@ -162,7 +162,7 @@ subdir('etc')
# Systemd unit files # Systemd unit files
if systemd_unit_files != 'disabled' if systemd_files != 'disabled'
subdir('systemd') subdir('systemd')
endif endif
...@@ -253,7 +253,7 @@ message(''' ...@@ -253,7 +253,7 @@ message('''
systemd: systemd:
socket activation: @0@'''.format(s_systemd_socket) + ''' socket activation: @0@'''.format(s_systemd_socket) + '''
unit_files: @0@'''.format(systemd_unit_files) + ''' files: @0@'''.format(systemd_files) + '''
work_dir: @0@'''.format(systemd_work_dir) + ''' work_dir: @0@'''.format(systemd_work_dir) + '''
optional components optional components
......
...@@ -65,7 +65,7 @@ option( ...@@ -65,7 +65,7 @@ option(
## Systemd ## Systemd
option( option(
'systemd_unit_files', 'systemd_files',
type: 'combo', type: 'combo',
choices: [ choices: [
'disabled', 'disabled',
...@@ -73,7 +73,7 @@ option( ...@@ -73,7 +73,7 @@ option(
'nosocket', 'nosocket',
], ],
value: 'disabled', value: 'disabled',
description: 'installs systemd unit files', description: 'installs systemd-related files',
) )
......
...@@ -16,7 +16,7 @@ systemd_config.set('sbin_dir', sbin_dir) ...@@ -16,7 +16,7 @@ systemd_config.set('sbin_dir', sbin_dir)
systemd_config.set('etc_dir', etc_dir) systemd_config.set('etc_dir', etc_dir)
systemd_config.set('run_dir', run_dir) systemd_config.set('run_dir', run_dir)
if systemd_unit_files == 'enabled' if systemd_files == 'enabled'
## unit files ## unit files
kresd_service = configure_file( kresd_service = configure_file(
input: 'kresd@.service.in', input: 'kresd@.service.in',
...@@ -70,6 +70,6 @@ if systemd_unit_files == 'enabled' ...@@ -70,6 +70,6 @@ if systemd_unit_files == 'enabled'
], ],
install_dir: join_paths(examples_dir, 'kresd-tls.socket.d'), install_dir: join_paths(examples_dir, 'kresd-tls.socket.d'),
) )
elif systemd_unit_files == 'nosocket' elif systemd_files == 'nosocket'
subdir('nosocket') subdir('nosocket')
endif endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment