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 <put all your package readme and other information stuff here, except license(-s) stuff> %license <put your package license(-s) stuff here only> %else %doc <put all your package readme, license(-s) and other information stuff here> %endif ========== Gived in patch versions of dstros are settled after having couple of tests on [0] for different packages to get green "succeeded" biulding output for all. Actually, for example: [3] https://build.opensuse.org/package/show/home:k_mikhail/GOST34.11-2012 [4] https://build.opensuse.org/package/show/home:k_mikhail:branches:home:onielse... Hope, this patch will be useful/helpful for packagers, who want to build their packages for wide row of different RPM-based distros and their various versions and to be OK with building guidelines ([5], [6]). Feel free to update this patch, if needed. Thanks! References: ========== Fedora: [5] https://fedoraproject.org/wiki/Packaging:LicensingGuidelines?rd=Packaging/Li... openSUSE: [6] https://en.opensuse.org/openSUSE:Specfile_guidelines#License_files Distribution detection codes: [7] https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org