From 4a955ee01198000cd39ddeb0db3627639917f1fc Mon Sep 17 00:00:00 2001 From: spike Date: Dec 15 2018 00:41:33 +0000 Subject: Use bundled jansson and pjproject for epel --- diff --git a/asterisk.spec b/asterisk.spec index d09d6a8..6423286 100644 --- a/asterisk.spec +++ b/asterisk.spec @@ -12,7 +12,13 @@ %global tmpfilesd 1 %global apidoc 0 +%if 0%{?fedora} %global mysql 1 +%endif +%if 0%{?rhel} +# Disable mysql for epel until RHBZ#1652293 is resolved +%global mysql 0 +%endif %global odbc 1 %global postgresql 1 %global radius 1 @@ -61,6 +67,10 @@ Source6: asterisk-tmpfiles #"551F 2910 4B21 0608 0C6C 2851 073B 0C1F C9B2 E352" \ #"57E7 69BC 3790 6C09 1E7F 641F 6CB4 4E55 7BD9 82D8" > asterisk-gpgkeys.gpg Source7: asterisk-gpgkeys.gpg +%if 0%{?rhel} +Source8: https://raw.githubusercontent.com/asterisk/third-party/master/jansson/2.11/jansson-2.11.tar.bz2 +Source9: https://raw.githubusercontent.com/asterisk/third-party/master/pjproject/2.7.2/pjproject-2.7.2.tar.bz2 +%endif %if 0%{?fedora} Patch0: asterisk-mariadb.patch @@ -197,8 +207,10 @@ BuildRequires: lm_sensors-devel BuildRequires: uw-imap-devel +%if 0%{?fedora} BuildRequires: pjproject-devel BuildRequires: jansson-devel +%endif Requires(pre): %{_sbindir}/useradd Requires(pre): %{_sbindir}/groupadd @@ -676,6 +688,11 @@ chmod -x contrib/scripts/dbsep.cgi %{__perl} -pi -e 's/^MENUSELECT_RES=(.*)$/MENUSELECT_RES=\1 res_http_post/g' menuselect.makeopts %endif +%if 0%{?rhel} +cp %{SOURCE8} %{_builddir}/asterisk-%{version}/third-party/jansson/ +cp %{SOURCE9} %{_builddir}/asterisk-%{version}/third-party/pjproject/ +%endif + %build export CFLAGS="%{optflags}" @@ -695,7 +712,12 @@ pushd menuselect %configure popd +%if 0%{?fedora} %configure --with-imap=system --with-gsm=/usr --with-ilbc=/usr --with-libedit=yes --with-srtp --with-pjproject=/usr --without-pjproject-bundled LDFLAGS="%{ldflags}" +%endif +%if 0%{?rhel} +%configure --with-imap=system --with-gsm=/usr --with-ilbc=/usr --with-libedit=yes --with-srtp --with-pjproject-bundled --with-jansson-bundled LDFLAGS="%{ldflags}" +%endif %make_build menuselect-tree NOISY_BUILD=1 %{__perl} -n -i -e 'print unless /openr2/i' menuselect-tree @@ -903,6 +925,10 @@ fi %{_unitdir}/asterisk.service %{_libdir}/libasteriskssl.so.1 +%if 0%{?rhel} >= 7 +%{_libdir}/libasteriskpj.so +%{_libdir}/libasteriskpj.so.2 +%endif %dir %{_libdir}/asterisk %dir %{_libdir}/asterisk/modules diff --git a/sources b/sources index 905b002..2143a9d 100644 --- a/sources +++ b/sources @@ -1,2 +1,4 @@ SHA512 (asterisk-16.0.1.tar.gz) = 49ef314187a6818beafa18d5d9bb59954c87fb3b920a416bb2509ad1f452281dd22600a78105d7965836ad8ae060955485503945dcea78da3842d3ecb97611bb SHA512 (asterisk-16.0.1.tar.gz.asc) = d31cc43094bcf922bed46e917905158d0051f4bec29b60f1d3984189b6bc7cc9cdbe2f42676b0afdb05e11f95661d8a40984f6e48fd00abc13a2b409ff58067b +SHA512 (jansson-2.11.tar.bz2) = 3a9ef8c470d203ef65f214d979d0a8dfc034ff1417b2af7071564c804e33d51f7b30915c7d62ac2156092aef756e4cdc3298a67205b913ffc312dcafeeefc1dc +SHA512 (pjproject-2.7.2.tar.bz2) = 3d355ffcbbeed62cfc711e574a987dc06043ccf4f2625820adffa89167022b8306fcee3fada71d3d45e7b902fc9c65ac8221de101cbafed25362a3921f702afd