[Remote]
# Seal=false
# SplitMode=host
-# ServerKeyFile=@CERTIFICATEROOT@/private/journal-remote.pem
-# ServerCertificateFile=@CERTIFICATEROOT@/certs/journal-remote.pem
-# TrustedCertificateFile=@CERTIFICATEROOT@/ca/trusted.pem
+# ServerKeyFile={{CERTIFICATE_ROOT}}/private/journal-remote.pem
+# ServerCertificateFile={{CERTIFICATE_ROOT}}/certs/journal-remote.pem
+# TrustedCertificateFile={{CERTIFICATE_ROOT}}/ca/trusted.pem
[Upload]
# URL=
-# ServerKeyFile=@CERTIFICATEROOT@/private/journal-upload.pem
-# ServerCertificateFile=@CERTIFICATEROOT@/certs/journal-upload.pem
-# TrustedCertificateFile=@CERTIFICATEROOT@/ca/trusted.pem
+# ServerKeyFile={{CERTIFICATE_ROOT}}/private/journal-upload.pem
+# ServerCertificateFile={{CERTIFICATE_ROOT}}/certs/journal-upload.pem
+# TrustedCertificateFile={{CERTIFICATE_ROOT}}/ca/trusted.pem
microhttpd-util.c
'''.split())
-if conf.get('ENABLE_REMOTE') ==1 and conf.get('HAVE_LIBCURL') == 1
- journal_upload_conf = configure_file(
- input : 'journal-upload.conf.in',
- output : 'journal-upload.conf',
- configuration : substs)
- if install_sysconfdir
- install_data(journal_upload_conf,
- install_dir : pkgsysconfdir)
- endif
-endif
+in_files = [
+ ['journal-upload.conf',
+ conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_LIBCURL') == 1 and install_sysconfdir_samples],
+ ['journal-remote.conf',
+ conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1 and install_sysconfdir_samples]]
-if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
- journal_remote_conf = configure_file(
- input : 'journal-remote.conf.in',
- output : 'journal-remote.conf',
- configuration : substs)
- if install_sysconfdir_samples
- install_data(journal_remote_conf,
- install_dir : pkgsysconfdir)
- endif
+foreach tuple : in_files
+ file = tuple[0]
+ custom_target(
+ file,
+ input : file + '.in',
+ output: file,
+ command : [meson_render_jinja2, config_h, '@INPUT@'],
+ capture : true,
+ install : tuple[1],
+ install_dir : pkgsysconfdir)
+endforeach
+if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
install_data('browse.html',
install_dir : join_paths(pkgdatadir, 'gatewayd'))