Hello, On Nov 8 09:40 Stefan Seyfried wrote (excerpt):
Am 07.11.2015 um 16:31 schrieb Ilya Chernykh:
Is there a way to make a check if the distro is leap or Thumbleweed in the spec file?
%if 0%{?suse_version} == 1315 %if 0%{?is_opensuse} echo this is LEAP %else echo this is SLES12 %fi %if 0%{?suse_version} >= 1320 echo this is tumbleweed %fi
I think because Leap is based on SLE12 the desirable way how to build a package for Leap should be to build it gerically for SLE12 and not specially only for Leap: %if 0%{?suse_version} == 1315 # this is for SLE12 and usually also for Leap # e.g. "configure --without-foo" # when SLE12 does not provide libfoo %fi versus %if 0%{?suse_version} == 1315 && 0%{?is_opensuse} # this is specially only for Leap but not for SLE12 # e.g. "BuildRequires foo1-devel" and "configure --with-foo" # when Leap provides libfoo version 1 # %fi versus %if 0%{?suse_version} >= 1320 # this is for Tumbleweed # e.g. "BuildRequires foo2-devel" and "configure --with-foo" # when Tumbleweed provides libfoo version 2 %fi But I do not know how far this is possible in practice for those packages in Leap that are based on Tumbleweed. Kind Regards Johannes Meixner -- SUSE LINUX GmbH - GF: Felix Imendoerffer, Jane Smithard, Graham Norton - HRB 21284 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org