Skip to content

Commit 8e41694

Browse files
MikhailKasimovadegtyarev
authored andcommitted
Improve distribution detection in RPM spec (#33)
1 parent 3cbee1f commit 8e41694

1 file changed

Lines changed: 21 additions & 11 deletions

File tree

gost3411-2012.spec

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,34 +56,45 @@ install -pm 644 gost3411-2012-sse41.h %{buildroot}%{_includedir}/gost3411-2012/
5656
%{_mandir}/man1/gost3411-2012*
5757
#
5858
# Copy LICENSE file to %%doc for:
59-
# - SLE 12 SP2 and lower
60-
# - openSUSE Leap 42.2 and lower
61-
# - RHEL 6 and lower
59+
#
60+
# - RedHat Enterprise Linux 6 and lower
6261
# - CentOS 6 and lower
62+
# - Fedora 18 and lower
63+
#
6364
# - Scientific Linux 6 and lower
6465
#
66+
# - SUSE Linux Enterprise 12 SP2 and lower
67+
# - openSUSE Leap 42.2 and lower
6568
#
69+
# - Mageia 4 and lower
6670
#
6771
# Copy LICENSE file to %%license for:
68-
# - SLE 12 SP3 and higher
69-
# - openSUSE Leap 42.3 and higher
70-
# - RHEL 7 and higher
72+
#
73+
# - RedHat Enterprise Linux 7 and higher
7174
# - CentOS 7 and higher
75+
# - Fedora 19 and higher
76+
#
7277
# - Scientific Linux 7 and higher
7378
#
74-
# Fedora distros feel OK to LICENSE being both in %%doc or %%license regardless to their version.
79+
# - SUSE Linux Enterprise 12 SP3 and higher
80+
# - openSUSE Leap 42.3 and higher
81+
# - openSUSE Tumbleweed and its derivatives
82+
#
83+
# - Mageia 5 and higher
7584
#
7685
# Guideline paragraphs about using %%license macro instead of %%doc for LICENSE in spec-files:
7786
#
7887
# Fedora: [0] https://fedoraproject.org/wiki/Packaging:LicensingGuidelines?rd=Packaging/LicensingGuidelines#License_Text
7988
#
8089
# openSUSE: [1] https://en.opensuse.org/openSUSE:Specfile_guidelines#License_files
8190
#
82-
%if ( 0%{?sle_version} <= 120200 && !0%{?is_opensuse} ) || ( 0%{?sle_version} <= 120200 && 0%{?is_opensuse} ) || 0%{?rhel_version} <= 600 || 0%{?centos_version} <= 600 || 0%{?scientificlinux_version} <= 600
83-
%doc LICENSE LICENSE.GPL2 README.md
84-
%else
91+
# Distribution detection codes: [2] https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
92+
#
93+
%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
8594
%doc README.md
8695
%license LICENSE LICENSE.GPL2
96+
%else
97+
%doc LICENSE LICENSE.GPL2 README.md
8798
%endif
8899

89100
%files devel
@@ -103,4 +114,3 @@ install -pm 644 gost3411-2012-sse41.h %{buildroot}%{_includedir}/gost3411-2012/
103114

104115
* Mon Apr 09 2018 alexey@renatasystems.org 0.12-1
105116
- Initial RPM release
106-

0 commit comments

Comments
 (0)