On Wed, Apr 17, 2013 at 02:54:14PM +0400, Eugene Pivnev wrote:
> Sorry for newbee question, but I can't find how to control packaging
> depending on distro.
> Something like this:
>
> %if 0%{?centos_version} || 0%{?rhel_version}
> %define have_polkit 0
> %define have_lightdm 0
> %else
There exits %fedora and %rhel macros with the major version number,
but only on the corresponding distros. So use something like:
%if 0%{?rhel} > 6 || 0{?fedora>} > 12
%define have_polkit 1
%define have_lightdm 1
%else
...
Note that 0{?rhel} < 7 is TRUE on Fedora release (as %rhel is undefined),
so you should be extremely careful with this lind of expressions.
You then may want to use something like
%if 0%{?rhel} && 0{?rhel} < 7
Note that CentOS also has %rhel defined so there is no need (and it
is not recommended either) to use %centos (although it exists too).
--
-- Jos Vos <[email protected]>
-- X/OS Experts in Open Systems BV | Phone: +31 20 6938364
-- Amsterdam, The Netherlands | Fax: +31 20 6948204
--
devel mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/devel