Blame SPECS/libsrtp.spec

0faf0c
%global shortname srtp
0faf0c
%global cvsver 20101004cvs
0faf0c
0faf0c
Name:		lib%{shortname}
0faf0c
Version:	1.4.4
98e5b5
Release:	11.%{cvsver}%{?dist}
0faf0c
Summary:	An implementation of the Secure Real-time Transport Protocol (SRTP)
0faf0c
Group:		System Environment/Libraries
0faf0c
License:	BSD
0faf0c
URL:		http://srtp.sourceforge.net
0faf0c
# Upstream 1.4.4 tarball is a bit dated, need to use cvs
0faf0c
# cvs -d:pserver:anonymous@srtp.cvs.sourceforge.net:/cvsroot/srtp co -P srtp
0faf0c
# tar cvfj srtp-1.4.4-20101004cvs.tar.bz2 srtp/
0faf0c
Source0:	%{shortname}-%{version}-%{cvsver}.tar.bz2
0faf0c
# Pkgconfig goodness
0faf0c
Source1:	libsrtp.pc
0faf0c
# Universal config.h
0faf0c
Source2:	config.h
0faf0c
0faf0c
# Seriously. Who doesn't do shared libs these days?
0faf0c
# And how does Chromium always manage to find these projects and use them?
0faf0c
Patch0:		libsrtp-1.4.4-shared.patch
0faf0c
98e5b5
# Security fixes
98e5b5
Patch100:	libsrtp-global-buffer-overflow.patch
98e5b5
Patch101:	libsrtp-CVE-2013-2139.patch
98e5b5
Patch102:	libsrtp-CVE-2015-6360.patch
98e5b5
98e5b5
0faf0c
%description
0faf0c
This package provides an implementation of the Secure Real-time
0faf0c
Transport Protocol (SRTP), the Universal Security Transform (UST), and
0faf0c
a supporting cryptographic kernel. 
0faf0c
0faf0c
%package devel
0faf0c
Summary:	Development files for %{name}
0faf0c
Group:		Development/Libraries
0faf0c
Requires:	%{name} = %{version}-%{release}
0faf0c
Requires:	pkgconfig
0faf0c
0faf0c
%description devel
0faf0c
The %{name}-devel package contains libraries and header files for
0faf0c
developing applications that use %{name}.
0faf0c
0faf0c
%prep
0faf0c
%setup -q -n %{shortname}
0faf0c
%patch0 -p1 -b .shared
0faf0c
98e5b5
%patch100 -p1 -b .global-buffer-overflow
98e5b5
%patch101 -p1 -b .CVE-2013-2139
98e5b5
%patch102 -p1 -b .CVE-2015-6360
98e5b5
0faf0c
# Fix end-of-line encoding
0faf0c
sed -i 's/\r//g' doc/draft-irtf-cfrg-icm-00.txt
0faf0c
0faf0c
%if 0%{?rhel} > 0
0faf0c
%ifarch ppc64
0faf0c
sed -i 's/-z noexecstack//' Makefile.in
0faf0c
%endif
0faf0c
%endif
0faf0c
0faf0c
%build
0faf0c
export CFLAGS="%{optflags} -fPIC"
0faf0c
%configure --disable-static
0faf0c
make %{?_smp_mflags}
0faf0c
0faf0c
%install
0faf0c
make install DESTDIR=%{buildroot}
0faf0c
find %{buildroot} -name '*.la' -exec rm -f {} ';'
0faf0c
pushd %{buildroot}%{_libdir}
0faf0c
ln -sf libsrtp.so.0.0.0 libsrtp.so
0faf0c
ln -sf libsrtp.so.0.0.0 libsrtp.so.0
0faf0c
popd
0faf0c
0faf0c
# Install the pkg-config file
0faf0c
mkdir -p %{buildroot}%{_libdir}/pkgconfig/
0faf0c
install -m0644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/
0faf0c
# Fill in the variables
0faf0c
sed -i "s|@PREFIX@|%{_prefix}|g" %{buildroot}%{_libdir}/pkgconfig/libsrtp.pc
0faf0c
sed -i "s|@LIBDIR@|%{_libdir}|g" %{buildroot}%{_libdir}/pkgconfig/libsrtp.pc
0faf0c
sed -i "s|@INCLUDEDIR@|%{_includedir}|g" %{buildroot}%{_libdir}/pkgconfig/libsrtp.pc
0faf0c
0faf0c
# Handle multilib issues with config.h
0faf0c
mv %{buildroot}%{_includedir}/%{shortname}/config.h %{buildroot}%{_includedir}/%{shortname}/config-%{__isa_bits}.h
0faf0c
cp -a %{SOURCE2} %{buildroot}%{_includedir}/%{shortname}/config.h
0faf0c
0faf0c
%post -p /sbin/ldconfig
0faf0c
%postun -p /sbin/ldconfig
0faf0c
0faf0c
%files
0faf0c
%defattr(-,root,root,-)
0faf0c
%doc CHANGES LICENSE README TODO VERSION doc/*.txt doc/*.pdf
0faf0c
%{_libdir}/*.so.*
0faf0c
0faf0c
%files devel
0faf0c
%defattr(-,root,root,-)
0faf0c
%{_includedir}/%{shortname}/
0faf0c
%{_libdir}/pkgconfig/libsrtp.pc
0faf0c
%{_libdir}/*.so
0faf0c
0faf0c
%changelog
98e5b5
* Wed Feb 19 2020 Jan Grulich <jgrulich@redhat.com> - 1.4.4-11.20101004cvs
98e5b5
- Fix global buffer overflow
98e5b5
  Resolves: bz#1301202
98e5b5
98e5b5
- Fix improper handling of CSRC count and extension header length in RTP header
98e5b5
  Resolves: bz#1323705
98e5b5
98e5b5
- Fix buffer overflow in application of crypto profiles
98e5b5
  Resolves: bz#1141897
98e5b5
3f523d
* Tue Sep 16 2014 Jan Grulich <jgrulich@redhat.com> - 1.4.4-10.20101004cvs
3f523d
- Add detection for aarch64
3f523d
  Resolves: bz#1141907
3f523d
a28654
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.4.4-9.20101004cvs
a28654
- Mass rebuild 2014-01-24
a28654
a28654
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.4.4-8.20101004cvs
a28654
- Mass rebuild 2013-12-27
a28654
0faf0c
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.4-7.20101004cvs
0faf0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
0faf0c
0faf0c
* Tue Sep 25 2012 Karsten Hopp <karsten@redhat.com> 1.4.4-6.20101004cvs
0faf0c
- use __PPC64__, not __ppc64__ which is undefined on PPC64 arch
0faf0c
0faf0c
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.4-5.20101004cvs
0faf0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
0faf0c
0faf0c
* Tue Feb 21 2012 Tom Callaway <spot@fedoraproject.org> - 1.4.4-4.20101004cvs
0faf0c
- handle config.h multilib (bz787537)
0faf0c
0faf0c
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.4-3.20101004cvs
0faf0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
0faf0c
0faf0c
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.4-2.20101004cvs
0faf0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
0faf0c
0faf0c
* Tue Jan 25 2011 Jeffrey C. Ollie <jeff@ocjtech.us>
0faf0c
- Don't use '-z noexecstack' option for linker on PPC64 (EL6)
0faf0c
0faf0c
* Mon Oct  4 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 1.4.4-1.20101004cvs
0faf0c
- initial package