On 06/12/12 15:44, Marcela Maslanova wrote:
----- Original Message -----
> From: "Andrew Ford" <A.Ford(a)ford-mason.co.uk>
> To: softwarecollections(a)lists.fedorahosted.org
> Sent: Thursday, December 6, 2012 3:29:00 PM
> Subject: Building perl-5.16.1 collection on CentOS 5.8
>
> I am trying to build Marcela Mašláňov's perl516 and perl-5.16.1
> packages
> on CentOS 5.8.
>
> I had a couple of problems getting perl516 to build: firstly rpmbuild
> requires a Group directive - I specified application/development, and
> secondly rpm 4.4.2.3 seems to require BuildRoot. I was wondering
> whether
> it would be possible to detect the RPM version and add those
> directives
> conditionally.
>
That should be easy by adding condition if rpm < 4.8 or what is in EL-6.
I was wondering how to do that as the versions are not floating point
numbers - I was thinking of something like
%define rpm_min_minor_version_reqd 8
%define rpm_minor_version %(rpm --version | sed -e 's/^.* 4[.]//' |
sed -e 's/[.].*//')
(assuming that I am only interested in rpm4!)
and then testing
%if %rpm_minor_version < %rpm_min_minor_version_reqd
or is there a simpler way of doing that?
Andrew