On Tue, 1 Aug 2006 01:59:04 +0200, Axel Liljencrantz wrote: > Thank you. So the following > > %{!?fedora: %define fedora 6} > %if "%fedora" >= "5" > BuildRequires: xorg-x11-proto-devel libX11-devel libXt-devel > %else > BuildRequires: xorg-x11-devel > %endif > > would be considered nicer than the original spec? I guess I'd agree. > The main downside is that it will not work on non-fedora systems which > do not use the same package names as fedora 5, which should be all pre > X.org-7.0 systems. Well, you could craft proper if-conditions for all supported releases of %fedora and cover old systems via %else. Alternatively, you can leave %fedora undefined whenever it is and in that case check whether it's undefined: %if 0%{?fedora} # a non-Fedora system %endif Here, %{?fedora} only expands to something if defined, and because of the prefix 0 the value becomes 0 (=false) if %fedora is undefined. -- fedora-extras-list mailing list fedora-extras-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-extras-list