Getting vriable from a properties file in an rpm spec file.
Stuart D. Gathman
stuart at bmsi.com
Mon Feb 21 17:52:09 UTC 2011
On Mon, 21 Feb 2011, Fawad Ali wrote:
> Thanks for the reply but my RPM packaging is a lil bit different so I
> need to know if I am able to get values from a properties file or not.
Here is an example of running programs to define variables.
%define is_rh %(test -e /etc/redhat-release && echo 1 || echo 0)
Write your own program or script to read a "properties file" (whatever
you mean by that) and output a value. I would suggest something like
%define version %(/usr/local/bin/getproperty myconfig.props VERSION)
%define release %(/usr/local/bin/getproperty myconfig.props RELEASE)
--
Stuart D. Gathman <stuart at bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.
More information about the Rpm-list
mailing list