Browse code

pkg/kamailio/obs: Packaged app_python3

Sergey Safarov authored on 18/05/2019 20:00:38
Showing 1 changed files
... ...
@@ -18,6 +18,7 @@
18 18
 %bcond_without mongodb
19 19
 %bcond_without perl
20 20
 %bcond_without phonenum
21
+%bcond_without python3
21 22
 %bcond_without rabbitmq
22 23
 %bcond_without redis
23 24
 %bcond_without ruby
... ...
@@ -42,6 +43,7 @@
42 43
 %bcond_without mongodb
43 44
 %bcond_without perl
44 45
 %bcond_without phonenum
46
+%bcond_without python3
45 47
 %bcond_without rabbitmq
46 48
 %bcond_without redis
47 49
 %bcond_without ruby
... ...
@@ -66,6 +68,7 @@
66 68
 %bcond_without mongodb
67 69
 %bcond_without perl
68 70
 %bcond_without phonenum
71
+%bcond_without python3
69 72
 %bcond_without rabbitmq
70 73
 %bcond_without redis
71 74
 %bcond_without ruby
... ...
@@ -90,6 +93,7 @@
90 93
 %bcond_without mongodb
91 94
 %bcond_without perl
92 95
 %bcond_without phonenum
96
+%bcond_without python3
93 97
 %bcond_without rabbitmq
94 98
 %bcond_without redis
95 99
 %bcond_without ruby
... ...
@@ -114,6 +118,7 @@
114 118
 %bcond_with mongodb
115 119
 %bcond_without perl
116 120
 %bcond_with phonenum
121
+%bcond_with python3
117 122
 %bcond_with rabbitmq
118 123
 %bcond_with redis
119 124
 %bcond_with ruby
... ...
@@ -139,6 +144,7 @@
139 144
 %bcond_without mongodb
140 145
 %bcond_without perl
141 146
 %bcond_without phonenum
147
+%bcond_without python3
142 148
 %bcond_without rabbitmq
143 149
 %bcond_without redis
144 150
 %bcond_without ruby
... ...
@@ -163,6 +169,7 @@
163 169
 %bcond_with mongodb
164 170
 %bcond_without perl
165 171
 %bcond_with phonenum
172
+%bcond_without python3
166 173
 %bcond_with rabbitmq
167 174
 %bcond_without redis
168 175
 %bcond_without ruby
... ...
@@ -187,6 +194,7 @@
187 194
 %bcond_with mongodb
188 195
 %bcond_with perl
189 196
 %bcond_with phonenum
197
+%bcond_with python3
190 198
 %bcond_with rabbitmq
191 199
 %bcond_with redis
192 200
 %bcond_with ruby
... ...
@@ -211,6 +219,7 @@
211 219
 %bcond_without mongodb
212 220
 %bcond_without perl
213 221
 %bcond_with phonenum
222
+%bcond_with python3
214 223
 %bcond_with rabbitmq
215 224
 %bcond_without redis
216 225
 %bcond_with ruby
... ...
@@ -283,15 +292,6 @@ BuildRequires:  bison, flex
283 292
 Requires:  filesystem
284 293
 BuildRequires:  systemd-mini, shadow
285 294
 %endif
286
-%if 0%{?fedora} == 27
287
-BuildRequires:  python3-devel
288
-%endif
289
-%if 0%{?fedora} == 28
290
-BuildRequires:  python3-devel
291
-%endif
292
-%if 0%{?fedora} == 30
293
-BuildRequires:  python3-devel
294
-%endif
295 295
 
296 296
 
297 297
 %description
... ...
@@ -737,6 +737,15 @@ Summary:    Python extensions for Kamailio
737 737
 Group:      %{PKGGROUP}
738 738
 Requires:   python, kamailio = %ver
739 739
 BuildRequires:  python, python-devel
740
+%if %{with python3}
741
+%if 0%{?rhel} == 7
742
+Requires:   python36, kamailio = %ver
743
+BuildRequires:  python36, python36-devel
744
+%else
745
+Requires:   python3, kamailio = %ver
746
+BuildRequires:  python3, python3-devel
747
+%endif
748
+%endif
740 749
 
741 750
 %description    python
742 751
 Python extensions for Kamailio.
... ...
@@ -1145,7 +1154,11 @@ make every-module skip_modules="app_mono db_cassandra db_oracle iptrtpproxy \
1145 1154
 %if %{with phonenum}
1146 1155
     kphonenum \
1147 1156
 %endif
1148
-    kpostgres kpresence kpython kradius \
1157
+    kpostgres kpresence kpython \
1158
+%if %{with python3}
1159
+    kpython3 \
1160
+%endif
1161
+    kradius \
1149 1162
 %if %{with redis}
1150 1163
     kredis \
1151 1164
 %endif
... ...
@@ -1225,7 +1238,11 @@ make install-modules-all skip_modules="app_mono db_cassandra db_oracle \
1225 1238
 %if %{with phonenum}
1226 1239
     kphonenum \
1227 1240
 %endif
1228
-    kpostgres kpresence kpython kradius \
1241
+    kpostgres kpresence kpython \
1242
+%if %{with python3}
1243
+    kpython3 \
1244
+%endif
1245
+    kradius \
1229 1246
 %if %{with redis}
1230 1247
     kredis \
1231 1248
 %endif
... ...
@@ -1961,6 +1978,10 @@ fi
1961 1978
 %defattr(-,root,root)
1962 1979
 %doc %{_docdir}/kamailio/modules/README.app_python
1963 1980
 %{_libdir}/kamailio/modules/app_python.so
1981
+%if %{with python3}
1982
+%doc %{_docdir}/kamailio/modules/README.app_python3
1983
+%{_libdir}/kamailio/modules/app_python3.so
1984
+%endif
1964 1985
 
1965 1986
 
1966 1987
 %if %{with rabbitmq}