Author Topic: Where is set 0%{?value} ?  (Read 367 times)

Offline Zou

  • Jr. Member
  • **
  • Posts: 17
Where is set 0%{?value} ?
« on: April 02, 2012, 01:48:01 PM »
Hi all,

I have just downloaded GarminPlugin and libgarmintools rpm sources for Mandriva on opensuse site http://download.opensuse.org/repositories/home:/garminplugin/Mandriva_2011/src/

When I decompile the GarminPlugin-0.3.9-7.1.src.rpm, I can see lines below in the SPEC file

Code: [Select]
%if 0%{?fedora} > 13
Group:          Other
%endif

%if 0%{?suse_version} >= 1020
Group:          Productivity/Networking/Web/Browsers
%endif

%if 0%{?mandriva_version}
Group:          Networking/WWW
%endif

I understand what does that mean but I don't know where it is set. If I would like to add pclos how do I proceed ?

Thanks,

Zou

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Where is set 0%{?value} ?
« Reply #1 on: April 02, 2012, 01:51:12 PM »
Read it as:

Quote
%if 0
%{?suse_version} >= 1020
Group:          Productivity/Networking/Web/Browsers
%endif

thus the above code is disabled / commented out

AS

Offline Zou

  • Jr. Member
  • **
  • Posts: 17
Re: Where is set 0%{?value} ?
« Reply #2 on: April 02, 2012, 02:04:04 PM »
Well AS, I am not sure to understand about the comment or disabled. Is it due to the 0 ?

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Where is set 0%{?value} ?
« Reply #3 on: April 02, 2012, 02:09:48 PM »
Well AS, I am not sure to understand about the comment or disabled. Is it due to the 0 ?

yes, it is a technique often used to disable some code leaving it inside the source, you may notice that there are several one, and you want to enable only those one that match your system.

i.e.: a test about suse version is only meaningful on a suse system ...

AS