[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-maintainers mailing list
Fedora-maintainers@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers

--
Fedora-maintainers-readonly mailing list
Fedora-maintainers-readonly@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers-readonly

[Index of Archives]     [Fedora Users]     [Fedora Development]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux