meson: generate and distribute spec files and AUTHORS

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
Pavel Hrdina
2020-07-28 17:51:53 +02:00
parent c3669c8675
commit 932a5b5499
7 changed files with 74 additions and 22 deletions

View File

@@ -2263,6 +2263,54 @@ foreach file : pkgconfig_files
)
endforeach
# generate dist files
if git
spec_files = [
'libvirt.spec.in',
'mingw-libvirt.spec.in',
]
spec_conf = configuration_data()
spec_conf.set('VERSION', meson.project_version())
foreach file : spec_files
configure_file(
input: file,
output: '@BASENAME@',
configuration: spec_conf,
)
endforeach
authors = run_command(python3_prog, meson_gen_authors_prog.path(), env: runutf8)
authors_file = 'AUTHORS.in'
authors_conf = configuration_data()
authors_conf.set('contributorslist', authors.stdout())
configure_file(
input: authors_file,
output: '@BASENAME@',
configuration: authors_conf,
)
# Using return values from configure_file in add_dist_script is possible since 0.55.0
dist_files = [
'libvirt.spec',
'mingw-libvirt.spec',
'AUTHORS',
]
foreach file : dist_files
meson.add_dist_script(
meson_python_prog.path(), python3_prog.path(), meson_dist_prog.path(),
meson.build_root(), file
)
endforeach
endif
# generate meson-config.h file
configure_file(output: 'meson-config.h', configuration: conf)