]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
meson: fix sysusers/tmpfiles installation
authorTomas Krizek <tomas.krizek@nic.cz>
Mon, 12 Oct 2020 12:10:20 +0000 (14:10 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Mon, 12 Oct 2020 12:57:01 +0000 (14:57 +0200)
Target name must be unique in meson, but the installed files share
the same name. To get around this, use a temporary target name and
rename it when installing the file to its proper location.

systemd/meson.build

index dbc31a94b9b4fbc69059a6acb4bf7f0f9bbebf62..6ca0bac1309623dbddd1fbd3d6213a3aa76fb040 100644 (file)
@@ -42,16 +42,25 @@ if systemd_files == 'enabled'
   ## tmpfiles
   tmpfiles = configure_file(
     input: 'tmpfiles.d/knot-resolver.conf.in',
-    output: 'knot-resolver.conf',
+    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.conf',
+    output: 'knot-resolver.sysusers',
     configuration: systemd_config,
+  )
+  install_data(
+    sysusers,
+    rename: ['knot-resolver.conf'],
     install_dir: systemd_sysusers_dir,
   )
+
 endif