Blob Blame History Raw
Name:    pjproject
Summary: Libraries for building embedded/non-embedded VoIP applications
Version: 2.9
Release: 3%{?dist}
License: GPLv2+
URL:     http://www.pjsip.org

Source0: http://www.pjsip.org/release/%{version}/%{name}-%{version}.tar.bz2

Patch1: 0001-Tell-the-build-system-not-to-use-most-of-the-third_party-directory.patch
Patch2: 0002-Keep-the-.pc-file-clean.patch
Patch3: 0003-Add-a-config_site.h-file.patch
Patch4: 0004-Fix-ARMv7-endianness.patch
Patch5: 0005-Add-aarch64-detection.patch
Patch6: 0006-Add-ppc64-detection.patch
Patch7: 0007-Add-s390-detection.patch
Patch8: 0008-Don-t-use-SSE2-if-it-is-not-available.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-2qpg-f6wf-w984
Patch9: 0009-Merge-pull-request-from-GHSA-2qpg-f6wf-w984.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-qcvw-h34v-c7r9
Patch10: 0010-Merge-pull-request-from-GHSA-qcvw-h34v-c7r9.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-3qx3-cg72-wrh9
Patch11: 0011-Merge-pull-request-from-GHSA-3qx3-cg72-wrh9.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-m66q-q64c-hv36
Patch12: 0012-Merge-pull-request-from-GHSA-m66q-q64c-hv36.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-7fw8-54cv-r7pm
Patch13: 0013-Merge-pull-request-from-GHSA-7fw8-54cv-r7pm.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-ffff-m5fm-qm62
Patch14: 0014-Merge-pull-request-from-GHSA-ffff-m5fm-qm62.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-8fmx-hqw7-6gmc
Patch15: 0015-Merge-pull-request-from-GHSA-8fmx-hqw7-6gmc.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-r374-qrwv-86hh
Patch16: 0016-Merge-pull-request-from-GHSA-r374-qrwv-86hh.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-73f7-48m9-w662
Patch17: 0017-Fix-for-GHSA-73f7-48m9-w662.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-5x45-qp78-g4p4
Patch18: 0018-Merge-pull-request-from-GHSA-5x45-qp78-g4p4.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-vhxv-phmx-g52q
Patch19: 0019-Merge-pull-request-from-GHSA-vhxv-phmx-g52q.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-rwgw-vwxg-q799
Patch20: 0020-Merge-pull-request-from-GHSA-rwgw-vwxg-q799.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-p6g5-v97c-w5q4
Patch21: 0021-Merge-pull-request-from-GHSA-p6g5-v97c-w5q4.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-f5qg-pqcg-765m
Patch22: 0022-Merge-pull-request-from-GHSA-f5qg-pqcg-765m.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-26j7-ww69-c4qj
Patch23: 0023-Merge-pull-request-from-GHSA-26j7-ww69-c4qj.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-fq45-m3f7-3mhj
Patch24: 0024-Fix-for-GHSA-fq45-m3f7-3mhj.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-9pfh-r8x4-w26w
Patch25: 0025-Merge-pull-request-from-GHSA-9pfh-r8x4-w26w.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-cxwq-5g9x-x7fr
Patch26: 0026-Merge-pull-request-from-GHSA-cxwq-5g9x-x7fr.patch
# https://github.com/pjsip/pjproject/security/advisories/GHSA-q9cp-8wcq-7pfr
Patch27: 0027-Merge-pull-request-from-GHSA-q9cp-8wcq-7pfr.patch

BuildRequires: autoconf
BuildRequires: alsa-lib-devel
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gsm-devel
BuildRequires: libsrtp-devel
BuildRequires: libuuid-devel
BuildRequires: openssl-devel
BuildRequires: pkgconfig
BuildRequires: portaudio-devel
BuildRequires: speex-devel
BuildRequires: speexdsp-devel


%description
This package provides the Open Source, comprehensive, high performance,
small footprint multimedia communication libraries written in C
language for building embedded/non-embedded VoIP applications.
It contains:
- PJSIP - Open Source SIP Stack
- PJMEDIA - Open Source Media Stack
- PJNATH - Open Source NAT Traversal Helper Library
- PJLIB-UTIL - Auxiliary Library
- PJLIB - Ultra Portable Base Framework Library
- PJSUA2 - Object Oriented abstractions layer for PJSUA


%package devel
Summary: Development files to use pjproject
Requires: %{name} = %{version}-%{release}


%description devel
Header information for:
- PJSIP - Open Source SIP Stack
- PJMEDIA - Open Source Media Stack
- PJNATH - Open Source NAT Traversal Helper Library
- PJLIB-UTIL - Auxiliary Library
- PJLIB - Ultra Portable Base Framework Library


%package -n pjsua
Summary: command line SIP user agent
Requires: %{name} = %{version}-%{release}


%description -n pjsua
pjsua is an open source command line SIP user agent (softphone)
that is used as the reference implementation for PJSIP, PJNATH, and PJMEDIA.
Despite its simple command line appearance, it does pack many features!



%prep
%setup -q -n %{name}-%{version}
# Update old FSF addresses
grep -ril '59 Temple Place' * | xargs sed -i 's/59 Temple Place,\s\+Suite 330,/51 Franklin Street, Fifth Floor,/im'
grep -ril '59 Temple Place' * | xargs sed -i 's/59 Temple Place - Suite 330,/51 Franklin Street, Fifth Floor,/im'
grep -ril 'Boston, MA\s\+02111-1307' * | xargs sed -i 's/Boston,\s\+MA\s\+02111-1307/Boston, MA  02110-1335/im'
%patch1 -p1 -b .3rd
%patch2 -p1 -b .pkg
%patch3 -p1 -b .config
%patch4 -p1 -b .arm
%patch5 -p1 -b .aarch64
%patch6 -p1 -b .ppc64
%patch7 -p1 -b .s390
%patch8 -p1 -b .sse2

# make sure we don't bundle these third-party libraries
# (They're excluded through ./configure, but this is an
# additional safety net)
rm -rf third_party/BaseClasses
rm -rf third_party/bdsound
rm -rf third_party/bin
rm -rf third_party/g7221
rm -rf third_party/gsm
rm -rf third_party/milenage
rm -rf third_party/mp3
rm -rf third_party/portaudio
rm -rf third_party/resample
rm -rf third_party/speex
rm -rf third_party/srtp
rm -rf third_party/ilbc
rm -rf third_party/build/baseclasses
rm -rf third_party/build/g7221
rm -rf third_party/build/gsm
rm -rf third_party/build/milenage
rm -rf third_party/build/portaudio/src
rm -rf third_party/build/resample
rm -rf third_party/build/samplerate
rm -rf third_party/build/speex
rm -rf third_party/build/srtp
rm -rf third_party/build/ilbc

%build
# Regenerate aconfigure for Patch8
autoconf aconfigure.ac > aconfigure

# We're building without audio or video support, as Asterisk isn't using
# that functionality, and it made it easier to ensure that we don't
# bundle any unnecessary libraries.  Please contact me if your project
# needs this support, and I'll re-enable it
export CFLAGS="-DPJ_HAS_IPV6=1 -DNDEBUG ${ARCHFLAGS} %{optflags}"

%configure --enable-shared        \
           --with-external-gsm    \
           --with-external-pa     \
           --with-external-speex  \
           --with-external-srtp   \
           --disable-opencore-amr \
           --disable-resample     \
           --disable-sound        \
           --disable-video        \
           --disable-v4l2         \
           --disable-ilbc-codec   \
           --disable-libyuv       \
           --disable-g7221-codec  

#make %{?_smp_mflags} dep
#make %{?_smp_mflags}
make -j1 dep
make -j1


%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install

install -p -D -m 0755 pjsip-apps/bin/pjsua-* %{buildroot}%{_bindir}/pjsua

# Remove the static libraries, as they aren't wanted
find %{buildroot} -type f -name "*.a" -delete


%ldconfig_scriptlets
%ldconfig_scriptlets devel


%files
%doc README.txt README-RTEMS INSTALL.txt
%license COPYING
%attr(755, root, root) %{_libdir}/lib*.so.*

%files devel
%attr(755, root, root) %{_libdir}/lib*.so
%{_includedir}/pj++/
%{_includedir}/pj/
%{_includedir}/pjlib-util/
%{_includedir}/pjmedia-audiodev/
%{_includedir}/pjmedia-codec/
%{_includedir}/pjmedia-videodev/
%{_includedir}/pjmedia/
%{_includedir}/pjnath/
%{_includedir}/pjsip-simple/
%{_includedir}/pjsip-ua/
%{_includedir}/pjsip/
%{_includedir}/pjsua-lib/
%{_includedir}/pjsua2/
%{_includedir}/*.h
%{_includedir}/*.hpp
%{_libdir}/pkgconfig/libpjproject.pc

%files -n pjsua
%{_bindir}/pjsua


%changelog
* Thu Oct 05 2023 Carl George <carlwgeorge@fedoraproject.org> - 2.9-3
- Backport many CVE fixes from upstream
- Resolves: rhbz#2035054 CVE-2021-37706
- Resolves: rhbz#2173703 CVE-2021-41141 CVE-2021-43845 CVE-2022-24754 CVE-2022-24763 CVE-2022-24786 CVE-2022-24792 CVE-2022-24793
- Resolves: rhbz#2055519 CVE-2021-43299
- Resolves: rhbz#2055522 CVE-2021-43300
- Resolves: rhbz#2055525 CVE-2021-43301
- Resolves: rhbz#2055528 CVE-2021-43302
- Resolves: rhbz#2055515 CVE-2021-43303
- Resolves: rhbz#2035070 CVE-2021-43804
- Resolves: rhbz#2050383 CVE-2022-21722
- Resolves: rhbz#2050388 CVE-2022-21723
- Resolves: rhbz#2155596 CVE-2022-23537
- Resolves: rhbz#2156105 CVE-2022-23547
- Resolves: rhbz#2069392 CVE-2022-23608
- Resolves: rhbz#2242356 CVE-2022-24764
- Resolves: rhbz#2173073 CVE-2022-31031
- Resolves: rhbz#2173075 CVE-2022-39244
- Resolves: rhbz#2178841 CVE-2023-27585

* Thu Oct 10 2019 Jared K. Smith <jsmith@fedoraproject.org> - 2.9-2
- Try again to fix SSE2-related build issues on non-X86_64 systems

* Wed Oct 09 2019 Jared K. Smith <jsmith@fedoraproject.org> - 2.9-1
- Update to upstream 2.9 release

* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Tue Sep 18 2018 Miro Hrončok <mhroncok@redhat.com> - 2.7.2-3
- Remove Python 2 subpackage (#1627359)

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Thu Feb 22 2018 Jared Smith <jsmith@fedoraproject.org> - 2.7.2-1
- Update to upstream 2.7.2 release for security updates

* Mon Feb 19 2018 Jared Smith <jsmith@fedoraproject.org> - 2.6-11
- Add missing BuildRequires on gcc and gcc-c++

* Thu Feb 15 2018 Jared Smith <jsmith@fedoraproject.org> - 2.6-10
- Use ldconfig_scriptlets macro

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Feb 07 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.6-8
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Sun Dec 17 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.6-7
- Python 2 binary package renamed to python2-pjsua
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

* Sun Sep 03 2017 Jared Smith <jsmith@fedoraproject.org> - 2.6-6
- Don't run make in parallel, to try to identify build problem on PPC builds

* Sun Sep  3 2017 Tom Hughes <tom@compton.nu> - 2.6-5
- Fix armv7 patch to remove replaced error directive

* Fri Sep 01 2017 Sandro Mani <manisandro@gmail.com> - 2.6-4
- Add patch to only build with sse2 if it is enabled
- Add patch to add s390 build definitions to config.h

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Tue Jun 13 2017 Jared Smith <jsmith@fedoraproject.org> - 2.6-1
- Update to upstream 2.6 release

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.5-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Oct 03 2016 Benjamin Lefoul <lef@fedoraproject.org> - 2.4.5-7
- Commenting out latest patch for BZ 1381133

* Tue Sep 20 2016 Benjamin Lefoul <lef@fedoraproject.org> - 2.4.5-6
- Add support for multiple listeners. More info with Ring project at SFL.

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.5-5
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Wed Feb 24 2016 Jared Smith <jsmith@fedoraproject.org> - 2.4.5-4
- Include config_site.h file to improve performance

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Jan 15 2016 Jared Smith <jsmith@fedoraproject.org> - 2.4.5-2
- Add -DNDEBUG to CFLAGS at request of Asterisk developers

* Mon Aug 31 2015 Jared Smith <jsmith@fedoraproject.org> - 2.4.5-1
- Update to upstream 2.4.5 release
- Create sub-packages for pjsua and python bindings

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Tue May  5 2015 Peter Robinson <pbrobinson@fedoraproject.org> 2.4-1
- Upstream 2.4 release

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 2.3-8
- Rebuilt for GCC 5 C++11 ABI change

* Thu Jan 29 2015 Peter Robinson <pbrobinson@fedoraproject.org> 2.3-7
- Fix endian support for aarch64
- Add speexdsp-devel dep as speex_echo.h has moved there

* Fri Nov 14 2014 Tom Callaway <spot@fedoraproject.org> - 2.3-6
- rebuild against new libsrtp

* Sun Oct 26 2014 Jared Smith <jsmith@fedoraproject.org> - 2.3-5
- Fix endianness support on ARM platform

* Wed Oct 15 2014 Jared Smith <jsmith@fedoraproject.org> - 2.3-3
- Add IPv6 support

* Wed Sep 10 2014 Jared Smith <jsmiht@fedoraproject.org> - 2.3-2
- Disable video support, and specifically tell it not to use libyuv,
  as the version of libyuv in Fedora is too old
- Disable ilbc codec support, as it is not needed

* Wed Sep 10 2014 Jared Smith <jsmiht@fedoraproject.org> - 2.3-1
- Update to upstream 2.3 release

* Fri Jun 20 2014 Jared Smith <jsmiht@fedoraproject.org> - 2.2.1-1
- Update to upstream 2.2.1 release

* Sun Mar 09 2014 Jared Smith <jsmiht@fedoraproject.org> - 2.2-4
- Instead of deleting the empty file pj/config_site.h, make it non-empty

* Fri Feb 28 2014 Jared Smith <jsmiht@fedoraproject.org> - 2.2-3
- Fix the location of the .so files
- Add a massive patch to fix the incorrect FSF address

* Fri Feb 28 2014 Jared Smith <jsmiht@fedoraproject.org> - 2.2-2
- Rebase a patch to simple eliminate the third_party directory
- Add a patch to fix up the .pc file

* Fri Feb 28 2014 Jared Smith <jsmiht@fedoraproject.org> - 2.2-1
- Update to upstream 2.2 release

* Fri Jan 17 2014 Dale Macartney <dbmacartney@fedoraproject.org> - 2.1-0.6.git217740d
- Shorten sumary, and moved libs to -devel package

* Mon Nov 25 2013 Anthony Messina <amessina@messinet.com> - 2.1-0.5.git217740d
- Enable G.722.1 and ILBC

* Mon Nov 25 2013 Anthony Messina <amessina@messinet.com> - 2.1-0.4.git217740d
- Build without opencore-amr

* Mon Nov 18 2013 Anthony Messina <amessina@messinet.com> - 2.1-0.3.git217740d
- Updates for SIP transaction handling

* Sat Nov 16 2013 Anthony Messina <amessina@messinet.com> - 2.1-0.2.gitde17f0e
- Rebuild for updates to OpenSSL

* Mon Oct 07 2013 Anthony Messina <amessina@messinet.com> - 2.1-0.1.gitde17f0e
- Package for Fedora & Asterisk: https://wiki.asterisk.org/wiki/display/AST/Installing+pjproject

* Mon Apr 22 2013 Anthony Messina <amessina@messinet.com> - 2.1-1
- Update to 2.1 release

* Sat Feb 16 2013 Mario Santagiuliana <fedora@marionline.it> - 2.0.1-1
- New version 2.0.1

* Mon Apr 16 2012 Mario Santagiuliana <fedora@marionline.it> - 1.12-2
- fix warning mixed-use-of-spaces-and-tabs from rpmlint
- use macro name and version

* Wed Apr 11 2012 Tom Callaway <spot@fedoraproject.org> - 1.12-1
- use system copy of libsrtp

* Thu Jan 12 2012 Mario Santagiuliana <fedora@marionline.it> 1.12-0
- Update to version 1.12

* Sun Jan 08 2012 Mario Santagiuliana <fedora@marionline.it> 1.10-7
- Follow the comment of Rex Dieter:
  https://bugzilla.redhat.com/show_bug.cgi?id=728302#c17

* Sat Jan 07 2012 Mario Santagiuliana <fedora@marionline.it> 1.10-6
- Follow the comment of Rex Dieter:
  https://bugzilla.redhat.com/show_bug.cgi?id=728302#c14
  https://bugzilla.redhat.com/show_bug.cgi?id=728302#c15

* Thu Dec 29 2011 Mario Santagiuliana <fedora@marionline.it> 1.10-5
- Follow the comment of Rex Dieter:
  https://bugzilla.redhat.com/show_bug.cgi?id=728302#c11

* Mon Aug 15 2011 Mario Santagiulaina <fedora@marionline.it> 1.10-4
- Forgot to write changelog for 1.10-3.
- Version 1.10.3 add patch to resolve libdir issue.

* Mon Aug 15 2011 Mario Santagiulaina <fedora@marionline.it> 1.10-2
- Follow the comment of Thomas Spura:
  https://bugzilla.redhat.com/show_bug.cgi?id=728302#c1

* Thu Aug 04 2011 Mario Santagiulaina <fedora@marionline.it> 1.10-1
- Initial RPM release