]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: add packager build options
authorPavel Hrdina <phrdina@redhat.com>
Tue, 28 Jul 2020 15:22:42 +0000 (17:22 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:26:50 +0000 (09:26 +0200)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
configure.ac
meson.build
meson_options.txt

index 34b9b258f80710622c8a7afe9036b1d4203222e7..a533610c6cf081a33bcc4f4628460909007faad9 100644 (file)
@@ -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"
 
index 9eada3dc3237f25ba785e29a7f05ee7769dd708b..61546f38afdb5a9dc8d7f2464cb3c98804d0b12a 100644 (file)
@@ -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('.')
index 7c9034d454f9c14060d88d798bed03d2e045b97c..7bb283177cf503109110d9fa0525e0e5ae0e4126 100644 (file)
@@ -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')