[Guidelines Change] DistTag changes

Tom "spot" Callaway tcallawa at redhat.com
Mon May 21 21:01:09 UTC 2007

The DistTag guidelines (found here:
http://fedoraproject.org/wiki/Packaging/DistTag) have had some changes

There are some additional macros for DistTag that make it much easier to
conditionalize inside of spec files. 

Two helper macros were added:

%{fc#} and %{el#} (where # is the value of %{fedora} or %{rhel}, respectively).

This means that if %{fedora} is set to 7, the following macro is set: 

%define fc7 1

This permits easier conditionalization in spec files. For example, with
these defines, you can do: 

%{?el5: a}
%{?el4: b}

%{?fc7: Requires: foo}
%{?fc6: Requires: bar}

Without these macros, you have to resort to: 

%if "%rhel" == "5"

%if "%rhel" == "4"

%if "%rhel" == "3"

%if "%rhel" == "2"

Keep in mind the words of wise old Uncle Ben: With great power comes great responsibility. 
Use these conditional helper macros sparingly.

Also, all references to "Fedora Core" or "Fedora Extras" were replaced by ninjas to "Fedora".


More information about the fedora-devel-list mailing list