Nico Huber submitted this change.

View Change

Approvals: Nico Huber: Verified; Looks good to me, approved Richard Hughes: Looks good to me, but someone else must approve
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>
---
M meson.build
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index ca52ccf..bda6b08 100644
--- a/meson.build
+++ b/meson.build
@@ -349,10 +349,19 @@
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',

To view, visit change 35566. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I25587ed2ad7fbcffdf14eb758c1f0d6ab2aea545
Gerrit-Change-Number: 35566
Gerrit-PatchSet: 7
Gerrit-Owner: Mario Limonciello <superm1@gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: Jacob Garber <jgarber1@ualberta.ca>
Gerrit-Reviewer: Mario Limonciello <superm1@gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: Richard Hughes <richard@hughsie.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged