summaryrefslogtreecommitdiffstats
path: root/systemd/meson.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:26:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:26:00 +0000
commit830407e88f9d40d954356c3754f2647f91d5c06a (patch)
treed6a0ece6feea91f3c656166dbaa884ef8a29740e /systemd/meson.build
parentInitial commit. (diff)
downloadknot-resolver-upstream.tar.xz
knot-resolver-upstream.zip
Adding upstream version 5.6.0.upstream/5.6.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'systemd/meson.build')
-rw-r--r--systemd/meson.build66
1 files changed, 66 insertions, 0 deletions
diff --git a/systemd/meson.build b/systemd/meson.build
new file mode 100644
index 0000000..6ca0bac
--- /dev/null
+++ b/systemd/meson.build
@@ -0,0 +1,66 @@
+# systemd
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+## configuration
+systemd_config = configuration_data()
+systemd_config.set('user', user)
+systemd_config.set('group', group)
+systemd_config.set('systemd_work_dir', systemd_work_dir)
+systemd_config.set('systemd_cache_dir', systemd_cache_dir)
+systemd_config.set('sbin_dir', sbin_dir)
+systemd_config.set('etc_dir', etc_dir)
+systemd_config.set('run_dir', run_dir)
+systemd_config.set('lib_dir', lib_dir)
+
+if systemd_files == 'enabled'
+ ## unit files
+ kresd_service = configure_file(
+ input: 'kresd@.service.in',
+ output: 'kresd@.service',
+ configuration: systemd_config,
+ install_dir: systemd_unit_dir,
+ )
+ kres_cache_gc_service = configure_file(
+ input: 'kres-cache-gc.service.in',
+ output: 'kres-cache-gc.service',
+ configuration: systemd_config,
+ install_dir: systemd_unit_dir,
+ )
+ install_data(
+ sources: 'kresd.target',
+ install_dir: systemd_unit_dir,
+ )
+
+ ## man page
+ kresd_systemd_man = configure_file(
+ input: 'kresd.systemd.7.in',
+ output: 'kresd.systemd.7',
+ configuration: man_config,
+ )
+ install_man(kresd_systemd_man)
+
+ ## tmpfiles
+ tmpfiles = configure_file(
+ input: 'tmpfiles.d/knot-resolver.conf.in',
+ output: 'knot-resolver.tmpfiles',
+ configuration: systemd_config,
+ )
+ install_data(
+ tmpfiles,
+ rename: ['knot-resolver.conf'],
+ install_dir: systemd_tmpfiles_dir,
+ )
+
+ ## sysusers
+ sysusers = configure_file(
+ input: 'sysusers.d/knot-resolver.conf.in',
+ output: 'knot-resolver.sysusers',
+ configuration: systemd_config,
+ )
+ install_data(
+ sysusers,
+ rename: ['knot-resolver.conf'],
+ install_dir: systemd_sysusers_dir,
+ )
+
+endif