summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@dell.com>2019-09-24 16:06:57 -0500
committerNico Huber <nico.h@gmx.de>2019-10-16 21:47:13 +0000
commitd954d5d700d7aa2ff144e7f8a5a2b6df08b07590 (patch)
tree6babb137bb091429368d23f745f75713295f0dde
parente0ceedf76d48757a05f22860e7ddd03e430c2252 (diff)
downloadflashrom-d954d5d700d7aa2ff144e7f8a5a2b6df08b07590.tar.gz
flashrom-d954d5d700d7aa2ff144e7f8a5a2b6df08b07590.tar.bz2
flashrom-d954d5d700d7aa2ff144e7f8a5a2b6df08b07590.zip
meson.build: Sanitize the version string
Match strictly the library version, and remove all starting letters. Change-Id: I25587ed2ad7fbcffdf14eb758c1f0d6ab2aea545 Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/35566 Tested-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Richard Hughes <richard@hughsie.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
-rw-r--r--meson.build11
1 files changed, 10 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index ca52ccf99..bda6b0813 100644
--- a/meson.build
+++ b/meson.build
@@ -349,10 +349,19 @@ flashrom = shared_library(
link_depends : mapfile,
)
+version = meson.project_version()
+#strip leading characters
+if version.startswith('v')
+ version = version.split('v')[1]
+endif
+if version.startswith('p')
+ version = version.split('p')[1]
+endif
+
pkgg = import('pkgconfig')
pkgg.generate(
libraries : flashrom,
- version : meson.project_version(),
+ version : version,
name : 'libflashrom',
filebase : 'libflashrom',
description : 'libflashrom',