Hello, list!
After having couple of tests on [0] https://build.opensuse.org, let me
introduce a way (workable patch) how to have normal %license <-> %doc
RPM-macros backward compability for wide row of various versions of
different RPM-based distros
(RedHat/CentOS/Fedora/SUSE/openSUSE/Mageia/Mandriva).
Patch is based on:
[1] https://lists.opensuse.org/opensuse-factory/2016-02/msg00167.html
[2] https://lists.opensuse.org/opensuse-packaging/2018-11/msg00015.html
Patch code:
==========
#
# Copy LICENSE(-s) stuff to %%doc for:
#
# - RedHat Enterprise Linux 6 and lower
# - CentOS 6 and lower
# - Fedora 18 and lower
#
# - Scientific Linux 6 and lower
#
# - SUSE Linux Enterprise 12 SP2 and lower
# - openSUSE Leap 42.2 and lower
#
# - Mageia 4 and lower and all Mandriva line
#
# Copy LICENSE(-s) stuff to %%license for:
#
# - RedHat Enterprise Linux 7 and higher
# - CentOS 7 and higher
# - Fedora 19 and higher
#
# - Scientific Linux 7 and higher
#
# - SUSE Linux Enterprise 12 SP3 and higher
# - openSUSE Leap 42.3 and higher
# - openSUSE Tumbleweed and its derivatives
#
# - Mageia 5 and higher
#
#
%if ( 0%{?sle_version} > 120200 && !0%{?is_opensuse} ) || (
0%{?sle_version} > 120200 && 0%{?is_opensuse} ) || 0%{?suse_version} >
1500 || 0%{?rhel_version} > 600 || 0%{?centos_version} > 600 ||
0%{?scientificlinux_version} > 600 || 0%{?fedora_version} > 18 ||
0%{?mageia} > 4
%doc