[Guidelines Change] DistTag changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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"
        a
%endif

%if "%rhel" == "4"
        b
%endif

%if "%rhel" == "3"
        c
%endif

%if "%rhel" == "2"
        d
%endif

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".

~spot

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux