Browse Source

Use leagacy mode for shellfu-sh-coerce also for RHEL-7

Turns out perl-Term-ANSIColor is only available since RHEL-8.
Alois Mahdal 4 years ago
parent
commit
dcdcd52728
1 changed files with 8 additions and 4 deletions
  1. 8
    4
      packaging/template.spec

+ 8
- 4
packaging/template.spec View File

@@ -1,9 +1,13 @@
1 1
 %if ( 0%{?rhel} && 0%{?rhel} < 7 ) || ( 0%{?centos} && 0%{?centos} < 7 )
2 2
 %global pspkg procps
3
-%global legacy true
4 3
 %else
5 4
 %global pspkg procps-ng
6
-%global legacy false
5
+%endif
6
+
7
+%if ( 0%{?rhel} && 0%{?rhel} < 8 ) || ( 0%{?centos} && 0%{?centos} < 8 )
8
+%global legacy_coerce true
9
+%else
10
+%global legacy_coerce false
7 11
 %endif
8 12
 
9 13
 Name:           __MKIT_PROJ_PKGNAME__
@@ -111,7 +115,7 @@ interactive terminal menus
111 115
 %package sh-coerce
112 116
 Summary: Shellfu/sh module with data coercion helpers
113 117
 Requires: perl
114
-%if %{legacy} == "false"
118
+%if %{legacy_coerce} == "false"
115 119
 Requires: perl-Term-ANSIColor
116 120
 %endif
117 121
 Requires: shellfu-sh
@@ -151,7 +155,7 @@ common ANSI color names.
151 155
 
152 156
 %prep
153 157
 %setup -q
154
-/bin/sed -i '/^__COERCE__LEGACY=/s/:-false/:-%{legacy}/' ./src/include-sh/coerce.sh
158
+/bin/sed -i '/^__COERCE__LEGACY=/s/:-false/:-%{legacy_coerce}/' ./src/include-sh/coerce.sh
155 159
 
156 160
 
157 161
 %build