else
SOURCE_OF_INSTALLATION = 'tarball'
endif
-conf_data.set(
- 'EXTENDED_VERSION',
- f'"@PROJECT_VERSION@ (@SOURCE_OF_INSTALLATION@)"',
-)
+conf_data.set('EXTENDED_VERSION', f'"@SOURCE_OF_INSTALLATION@"')
if PROJECT_VERSION.split('.')[1].to_int() % 2 == 0
package_version_type = 'stable'
fi
if test "${command}" = "-V"; then
- echo "${EXTENDED_VERSION}"
+ echo "${PACKAGE_VERSION} (${EXTENDED_VERSION})"
exit 0
fi
kea_admin_conf_data.set('PACKAGE', 'kea')
kea_admin_conf_data.set('PACKAGE_NAME', 'kea')
kea_admin_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
-kea_admin_conf_data.set(
- 'EXTENDED_VERSION',
- PROJECT_VERSION + f' (@SOURCE_OF_INSTALLATION@)',
-)
+kea_admin_conf_data.set('EXTENDED_VERSION', SOURCE_OF_INSTALLATION)
if TESTS_OPT.enabled()
kea_admin_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
else
fi
if test "${command}" = "-V"; then
- echo "${EXTENDED_VERSION}"
+ echo "${PACKAGE_VERSION} (${EXTENDED_VERSION})"
exit 0
fi
else
keactrl_conf_data.set('HAVE_NETCONF', 'no')
endif
-keactrl_conf_data.set(
- 'EXTENDED_VERSION',
- PROJECT_VERSION + f' (@SOURCE_OF_INSTALLATION@)',
-)
+keactrl_conf_data.set('EXTENDED_VERSION', SOURCE_OF_INSTALLATION)
keactrl_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
keactrl_conf_data.set('runstatedir', '${prefix}/' + LOCALSTATEDIR + '/run')
keactrl_conf_data.set('localstatedir', '${prefix}/' + LOCALSTATEDIR)
sys.exit(0)
if cmd_args.V:
- print(EXTENDED_VERSION)
+ print(f'{VERSION} ({EXTENDED_VERSION})')
sys.exit(0)
# Ok, now it's time to put the parameters parsed into the structure to be
kea_shell_conf_data = configuration_data()
kea_shell_conf_data.set('PYTHON', PYTHON.full_path())
kea_shell_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
-kea_shell_conf_data.set(
- 'EXTENDED_VERSION',
- PROJECT_VERSION + f' (@SOURCE_OF_INSTALLATION@)',
-)
+kea_shell_conf_data.set('EXTENDED_VERSION', SOURCE_OF_INSTALLATION)
kea_shell_conf_data.set('PKGPYTHONDIR', PKGPYTHONDIR)
configure_file(
-// Copyright (C) 2011-2024 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011-2025 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
+#include <kea_version.h>
#include <cctype>
#include <cstddef>
cout << VERSION << "\n";
}
+void
+extended_version() {
+ cout << VERSION << " (" << EXTENDED_VERSION << ")\n";
+}
+
/// \brief Print Usage
///
/// Prints program usage to stdout.
int
main(int argc, char* argv[]) {
- const char* soptions = "hvpd:"; // Short options
+ const char* soptions = "hvVpd:"; // Short options
optind = 1; // Ensure we start a new scan
int opt; // Value of the option
version();
return (0);
+ case 'V':
+ extended_version();
+ return (0);
+
default:
// A message will have already been output about the error.
return (1);