meson_version : '>= 0.60.0',
)
+project_major_version = meson.project_version().split('.')[0].split('~')[0]
+if meson.project_version().contains('.')
+ project_minor_version = meson.project_version().split('.')[-1].split('~')[0]
+else
+ project_minor_version = '0'
+endif
+
libsystemd_version = '0.39.0'
libudev_version = '1.7.9'
conf = configuration_data()
conf.set_quoted('PROJECT_URL', 'https://systemd.io/')
-conf.set('PROJECT_VERSION', meson.project_version().split('~')[0],
+conf.set('PROJECT_VERSION', project_major_version,
description : 'Numerical project version (used where a simple number is expected)')
conf.set_quoted('PROJECT_VERSION_FULL', meson.project_version(), description : 'Full project version')
shared_lib_tag = get_option('shared-lib-tag')
if shared_lib_tag == ''
- shared_lib_tag = meson.project_version().split('~')[0]
+ shared_lib_tag = project_major_version
endif
#####################################################################
args : exec.full_path(),
depends: exec)
- version = meson.project_version()
- if name == 'udevadm'
- # For compatibility reasons we can't use the full version in udevadm.
- version = version.split('~')[0]
- endif
-
test('check-version-' + name,
check_version,
suite : 'dist',
args : [exec.full_path(),
- version],
+ project_major_version],
depends: exec)
endif
endforeach
if (colors_enabled())
b = systemd_features_with_color();
- printf("%ssystemd " PROJECT_VERSION_FULL "%s (" GIT_VERSION ")\n%s\n",
- ansi_highlight(), ansi_normal(),
+ printf("%ssystemd %i%s (" GIT_VERSION ")\n%s\n",
+ ansi_highlight(), PROJECT_VERSION, ansi_normal(),
b ?: systemd_features);
return 0;
}
'EFI_' + c[1].strip().underscorify().to_upper()))
endforeach
-efi_conf.set_quoted('PROJECT_VERSION', meson.project_version().split('~')[0])
+efi_conf.set_quoted('PROJECT_VERSION', project_major_version)
efi_conf.set_quoted('VERSION_TAG', version_tag)
efi_conf.set('PROJECT_URL', conf.get('PROJECT_URL'))
install_tag : 'systemd-boot',
command : [
elf2efi_py,
- '--version-major=' + meson.project_version().split('.')[0].split('~')[0],
- '--version-minor=' + meson.project_version().split('.')[-1].split('~')[0],
+ '--version-major=' + project_major_version,
+ '--version-minor=' + project_minor_version,
'--efi-major=1',
'--efi-minor=1',
'--subsystem=10',