On Wed, 3 Sep 2003, John Allen wrote:

> On Wednesday 03 September 2003 14:29, Götz Waschk wrote:
> > Am Mittwoch,  3. September 2003, 14:25:18 Uhr MET, schrieb John Allen:
> > > > Check some .spec files for the line like this:
> > > > %define buildfor_mdk90  %(awk '{print ($4 == "9.0")}'
> > > > %{_sysconfdir}/mandrake-release)
> > >
> > > This is really crap; I thought that is what the GNU guys developed
> > > autoconf for. Try to figure out what the system supports by testing the
> > > system, bot checking some freaking version number.
> >
> > Feel free to replace this mechanism in my spec files by a better
> > solution, I'll gladly accept patches.
> 
> 
> How about
> %define buildfor_mdk90  %(cat /etc/mandrake-release | sed 's|.*release \([0-9\.]\+\) 
> .*|\1|g' | grep "^9.2")
> 
> where /etc/mandrake/release contains
> Mandrake Linux release 9.2.1 (Cooker) for i586

You have missed the point, IMHO Götz wants sollution without 
{awk|sed|grep} where is possible to build all .rpm files on the 
various MDK releases from the same .spec file.


R.V.


Reply via email to