This is certainly functional, but I think that the version strings spit out don't make sense for libflashrom. They include letters and are not monotonically increasing, even at tagged releases. So I think some sed magic is going to be needed to make it useful.

Here was what I got out of a test run in pkg-config: "Version: v1.1-rc1-85-ge094fb4"

Quoting https://people.freedesktop.org/~dbn/pkg-config-guide.html:
> The Name, Description and URL fields are purely informational and should be easy to fill in.
> The Version field is a bit trickier to ensure that it is usable by consumers of the data.
> pkg-config uses the algorithm from RPM for version comparisons. This works best with a
> dotted decimal number such as 1.2.3 since letters can cause unexpected results. The number
> should be monotonically increasing and be as specific as possible in describing the library. > Usually it's sufficient to use the package's version number here since it's easy for
> consumers to track.

View Change

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

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I401e5638509c4a573bc0cb17ebc5fa76df9700b5
Gerrit-Change-Number: 35561
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Jacob Garber <jgarber1@ualberta.ca>
Gerrit-Reviewer: Mario Limonciello <superm1@gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Comment-Date: Tue, 24 Sep 2019 19:21:44 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment