0

The RPM spec file is supposed to include a Version: keyword, e.g Version: 1.0.8. This version is used to name the RPM file that is generated when the RPM is built.

Is there a "canonical" way to use this to embed this bit of information into a file that either is or will make its way into the RPM. This bit of information could then be read in by the running application and be logged/diplayed, etc.

I can think of many ways to "hack" this but is there a "right" way, an "official" way?

yizzlez
  • 8,757
  • 4
  • 29
  • 44
Steve Cohen
  • 4,679
  • 9
  • 51
  • 89

1 Answers1

0

Use :

Version:  %(sed/grep/awk commands to parse your file)

If you prefer to load the value to a variable, use:

%define myversion %(sed/grep/awk commands to parse your file)
Version:  %{myversion}
Bruno9779
  • 1,551
  • 2
  • 14
  • 31