From d69bc20d5f2a16e21d093e22927248771f2dd3eb Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Tue, 28 Jul 2020 17:22:42 +0200 Subject: [PATCH] meson: add packager build options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pavel Hrdina Reviewed-by: Ján Tomko Reviewed-by: Peter Krempa Reviewed-by: Neal Gompa --- configure.ac | 13 ------------- meson.build | 14 ++++++++++++++ meson_options.txt | 2 ++ 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index 34b9b258f8..a533610c6c 100644 --- a/configure.ac +++ b/configure.ac @@ -40,19 +40,6 @@ m4_ifndef([AM_SILENT_RULES], AC_CANONICAL_HOST -LIBVIRT_ARG_WITH([PACKAGER], [Extra packager name], [no]) -LIBVIRT_ARG_WITH([PACKAGER_VERSION], [Extra packager version], [no]) -if test "x$with_packager" != "xno" -then - AC_DEFINE_UNQUOTED([PACKAGER], ["$with_packager"], - [Extra package name]) -fi -if test "x$with_packager_version" != "xno" -then - AC_DEFINE_UNQUOTED([PACKAGER_VERSION], ["$with_packager_version"], - [Extra package version]) -fi - dnl Where we look for daemons and admin binaries during configure LIBVIRT_SBIN_PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin" diff --git a/meson.build b/meson.build index 9eada3dc32..61546f38af 100644 --- a/meson.build +++ b/meson.build @@ -115,6 +115,20 @@ configure_file( ) +# packager options + +packager = get_option('packager') +packager_version = get_option('packager_version') + +if packager != '' + conf.set_quoted('PACKAGER', packager) +endif + +if packager_version != '' + conf.set_quoted('PACKAGER_VERSION', packager_version) +endif + + # figure out libvirt version strings arr_version = meson.project_version().split('.') diff --git a/meson_options.txt b/meson_options.txt index 7c9034d454..7bb283177c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,4 +1,6 @@ option('force_incomplete_build', type: 'boolean', value: false, description: 'Meson setup fails by default until the rewrite to meson is done, set this to "true" to force the build.') option('no_git', type: 'boolean', value: false, description: 'Disable git submodule update') +option('packager', type: 'string', value: '', description: 'Extra packager name') +option('packager_version', type: 'string', value: '', description: 'Extra packager version') option('system', type: 'boolean', value: false, description: 'Set install paths to system ones') option('runstatedir', type: 'string', value: '', description: 'State directory for temporary sockets, pid files, etc')