Hello! Need to have package for wide row of RPM-distros, which such scheme: 1) Copy LICENSE file to %%doc for: - SLE 12 SP2 and lower - openSUSE Leap 42.2 and lower - RHEL 6 and lower - CentOS 6 and lower - Scientific Linux 6 and lower 2) Copy LICENSE file to %%license for: - SLE 12 SP3 and higher - openSUSE Leap 42.3 and higher - RHEL 7 and higher - CentOS 7 and higher - Scientific Linux 7 and higher due to these guidelines: Fedora: [0] https://fedoraproject.org/wiki/Packaging:LicensingGuidelines?rd=Packaging/Li... openSUSE: [1] https://en.opensuse.org/openSUSE:Specfile_guidelines#License_files To detect OS-es I use table from [2] https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto Initially I had such construction in spec: %if ( 0%{?sles_version} <= 120200 && !0%{?is_opensuse} ) || ( 0%{?sles_version} <= 120200 && 0%{?is_opensuse} ) || 0%{?rhel_version} <= 600 || 0%{?centos_version} <= 600 || 0%{?scientificlinux_version} <= 600 %doc LICENSE LICENSE.GPL2 README.md %else %doc README.md %license LICENSE LICENSE.GPL2 %endif Here RPMs are OK to be built, but on openSUSE 42.3 both of LICENSE LICENSE.GPL2 files were put to %doc (/usr/share/doc/packages/) instead of %license (/usr/share/licenses). If to use %if ( 0%{?sles_version} < 120300 && !0%{?is_opensuse} ) || ( 0%{?sles_version} < 120300 && 0%{?is_opensuse} ) || 0%{?rhel_version} < 700 || 0%{?centos_version} < 700 || 0%{?scientificlinux_version} < 700 %doc LICENSE LICENSE.GPL2 README.md %else %doc README.md %license LICENSE LICENSE.GPL2 %endif this doesn't help -- on openSUSE 42.3 both of LICENSE LICENSE.GPL2 files were put to %doc (/usr/share/doc/packages/) instead of %license (/usr/share/licenses). Even using 0%{?suse_version} macro instead of 0%{?sles_version} also doesn't help. Where am I wrong here? Please, give a hint how to have scheme mentioned in 1) and 2). [0] and [1] doesn't have explicit restriction on using <= sign. Can it be is use generally for 0%{?OS_version} macro? Thanks! -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org