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

-- 
John Allen,                          Email:  mailto:[EMAIL PROTECTED]
MandrakeClub Silver Member.


Reply via email to