Browse code

pkg/kamailio/obs: simlifid module definition for RHEL dist

Sergey Safarov authored on 14/06/2021 05:05:41
Showing 1 changed files
... ...
@@ -28,9 +28,15 @@
28 28
 %bcond_without xmlrpc
29 29
 %endif
30 30
 
31
-%if 0%{?centos_ver} == 6
31
+%if 0%{?rhel} == 6
32
+%if 0%{?centos_ver}
32 33
 %define dist_name centos
33 34
 %define dist_version %{?centos}
35
+%endif
36
+%if 0%{?centos_ver} == 0
37
+%define dist_name rhel
38
+%define dist_version %{?rhel}
39
+%endif
34 40
 %bcond_with cnxcc
35 41
 %bcond_without dnssec
36 42
 %bcond_without evapi
... ...
@@ -54,10 +60,16 @@
54 60
 %bcond_without xmlrpc
55 61
 %endif
56 62
 
57
-%if 0%{?centos_ver} == 7
63
+%if 0%{?rhel} == 7
64
+%if 0%{?centos_ver}
58 65
 %define dist_name centos
59 66
 %define dist_version %{?centos}
60 67
 %define dist .el7.centos
68
+%endif
69
+%if 0%{?centos_ver} == 0
70
+%define dist_name rhel
71
+%define dist_version %{?rhel}
72
+%endif
61 73
 %bcond_without cnxcc
62 74
 %bcond_with dnssec
63 75
 %bcond_without evapi
... ...
@@ -81,23 +93,26 @@
81 93
 %bcond_without xmlrpc
82 94
 %endif
83 95
 
84
-%if 0%{?centos_ver} == 8 || 0%{?almalinux_ver} == 8 || 0%{?rocky_ver} == 8
85
-%define rhel_rebuild 8
86
-% if 0%{?centos_ver}
96
+%if 0%{?rhel} == 8
97
+%if 0%{?centos_ver}
87 98
 %define dist_name centos
88 99
 %define dist_version %{?centos}
89 100
 %define dist .el8.centos
90 101
 %endif
91
-% if 0%{?almalinux_ver}
102
+%if 0%{?almalinux_ver}
92 103
 %define dist_name centos
93 104
 %define dist_version %{?almalinux}
94 105
 %define dist .el8.almalinux
95 106
 %endif
96
-% if 0%{?rocky_ver}
107
+%if 0%{?rocky_ver}
97 108
 %define dist_name centos
98 109
 %define dist_version %{?rocky}
99 110
 %define dist .el8.rocky
100 111
 %endif
112
+%if 0%{?centos_ver} == 0 && 0%{?almalinux_ver} == 0 && 0%{?rocky_ver} == 0
113
+%define dist_name rhel
114
+%define dist_version %{?rhel}
115
+%endif
101 116
 %bcond_without cnxcc
102 117
 %bcond_with dnssec
103 118
 %bcond_without evapi
... ...
@@ -147,84 +162,6 @@
147 162
 %bcond_without xmlrpc
148 163
 %endif
149 164
 
150
-%if 0%{?rhel} == 6 && 0%{?centos_ver} != 6
151
-%define dist_name rhel
152
-%define dist_version %{?rhel}
153
-%bcond_with cnxcc
154
-%bcond_without dnssec
155
-%bcond_without evapi
156
-%bcond_with geoip
157
-%bcond_with http_async_client
158
-%bcond_with ims
159
-%bcond_with jansson
160
-%bcond_with json
161
-%bcond_with lua
162
-%bcond_with kazoo
163
-%bcond_with memcached
164
-%bcond_with mongodb
165
-%bcond_with perl
166
-%bcond_with phonenum
167
-%bcond_with python3
168
-%bcond_with rabbitmq
169
-%bcond_with redis
170
-%bcond_with ruby
171
-%bcond_with sctp
172
-%bcond_with websocket
173
-%bcond_without xmlrpc
174
-%endif
175
-
176
-%if 0%{?rhel} == 7 && 0%{?centos_ver} != 7
177
-%define dist_name rhel
178
-%define dist_version %{?rhel}
179
-%bcond_without cnxcc
180
-%bcond_with dnssec
181
-%bcond_without evapi
182
-%bcond_without geoip
183
-%bcond_without http_async_client
184
-%bcond_without ims
185
-%bcond_without jansson
186
-%bcond_without json
187
-%bcond_without lua
188
-%bcond_without kazoo
189
-%bcond_without memcached
190
-%bcond_without mongodb
191
-%bcond_without perl
192
-%bcond_without phonenum
193
-%bcond_without python3
194
-%bcond_without rabbitmq
195
-%bcond_without redis
196
-%bcond_without ruby
197
-%bcond_without sctp
198
-%bcond_without websocket
199
-%bcond_without xmlrpc
200
-%endif
201
-
202
-%if 0%{?rhel} == 8 && 0%{?rhel_rebuild} != 8
203
-%define dist_name rhel
204
-%define dist_version %{?rhel}
205
-%bcond_without cnxcc
206
-%bcond_with dnssec
207
-%bcond_without evapi
208
-%bcond_without geoip
209
-%bcond_without http_async_client
210
-%bcond_without ims
211
-%bcond_without jansson
212
-%bcond_without json
213
-%bcond_without lua
214
-%bcond_without kazoo
215
-%bcond_without memcached
216
-%bcond_without mongodb
217
-%bcond_without perl
218
-%bcond_without phonenum
219
-%bcond_without python3
220
-%bcond_without rabbitmq
221
-%bcond_without redis
222
-%bcond_without ruby
223
-%bcond_without sctp
224
-%bcond_without websocket
225
-%bcond_without xmlrpc
226
-%endif
227
-
228 165
 # Defining missing macros on RHEL/CentOS 6
229 166
 %if 0%{?rhel} == 6
230 167
 %define _rundir %{_localstatedir}/run