package/ntp: add CPE ID variables
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Tue, 12 Jan 2021 07:12:13 +0000 (08:12 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 14 Jan 2021 22:19:49 +0000 (23:19 +0100)
commita9c830c0d5fc4c8581823e4aff957494881f4272
tree2c2a8c25d127355b29b044eae50060211ed8c097
parent0f100d333b9d7bb01440bb34a36c31c54b7cb254
package/ntp: add CPE ID variables

cpe:2.3:a:ntp:ntp is a valid CPE identifier for this package:

  https://nvd.nist.gov/products/cpe/search/results?namingFormat=2.3&keyword=cpe%3A2.3%3Aa%3Antp%3Antp

The specification of the version needs to be reworked a little
bit. Indeed, versions look like 4.2.8p15. For the download, we need to
extract 4.2 as the folder is named ntp-4.2. However, for the CPE ID we
need to extract 4.2.8 and p15 into two separate fields.

So, we set:

NTP_VERSION_MAJOR = 4.8
NTP_VERSION_MINOR = 2
NTP_VERSION_POINT = 15

and construct the version:

NTP_VERSION = $(NTP_VERSION_MAJOR).$(NTP_VERSION_MINOR)p$(NTP_VERSION_POINT)

Note that the choice of "point" comes from
http://support.ntp.org/bin/view/Main/ReleaseNumberingScheme, which
states "The letter p followed by an increasing number indicates a
Point (i.e. incremental) Release.".

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/ntp/ntp.mk