|
@@ -1,18 +1,22 @@
|
|
|
+%global shortname srtp
|
|
|
+
|
|
|
Summary: Secure RTP (SRTP) and UST Reference Implementations
|
|
|
Name: libsrtp
|
|
|
-Version: 1.4.4
|
|
|
+Version: 1.5.4
|
|
|
Release: 1%{?_dist_release}
|
|
|
|
|
|
-Source0: srtp-%{version}.tgz
|
|
|
-# Pkgconfig goodness
|
|
|
-Source1: libsrtp.pc
|
|
|
-# Seriously. Who doesn't do shared libs these days?
|
|
|
-# And how does Chromium always manage to find these projects and use them?
|
|
|
-Patch0: libsrtp-1.4.4-shared.patch
|
|
|
+Source0: https://github.com/cisco/libsrtp/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
|
+# Universal config.h
|
|
|
+Source2: config.h
|
|
|
+# Fix shared lib so ldconfig doesn't complain
|
|
|
+Patch0: libsrtp-1.5.4-shared-fix.patch
|
|
|
+Patch1: libsrtp-srtp_aes_encrypt.patch
|
|
|
+Patch2: libsrtp-sha1-name-fix.patch
|
|
|
+Patch3: libsrtp-fix-name-collision-on-MIPS.patch
|
|
|
|
|
|
License: BSD
|
|
|
Group: System Environment/Libraries
|
|
|
-URL: http://srtp.sourceforge.net/
|
|
|
+URL: https://github.com/cisco/libsrtp
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
@@ -36,56 +40,54 @@ libsrtp
|
|
|
|
|
|
|
|
|
%prep
|
|
|
-%setup -q -n srtp
|
|
|
-%patch0 -p1
|
|
|
+%setup -q
|
|
|
+
|
|
|
+%patch0 -p1 -b .sharedfix
|
|
|
+%patch1 -p1 -b .srtp_aes_encrypt
|
|
|
+%patch2 -p1 -b .sha1-name-fix
|
|
|
+%patch3 -p1 -b .mips-name-fix
|
|
|
|
|
|
|
|
|
%build
|
|
|
export CFLAGS="%{optflags} -fPIC"
|
|
|
%configure --disable-static
|
|
|
-%{__make} %{?_smp_mflags}
|
|
|
+%{__make} %{?_smp_mflags} shared_library
|
|
|
|
|
|
|
|
|
%install
|
|
|
-%{__rm} -rf ${RPM_BUILD_ROOT}
|
|
|
-%{__make} install DESTDIR=${RPM_BUILD_ROOT}
|
|
|
-pushd %{buildroot}%{_libdir}
|
|
|
-ln -sf libsrtp.so.0.0.0 libsrtp.so
|
|
|
-ln -sf libsrtp.so.0.0.0 libsrtp.so.0
|
|
|
-popd
|
|
|
-
|
|
|
-find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} \;
|
|
|
+%{__rm} -rf %{buildroot}
|
|
|
+%{__make} install DESTDIR=%{buildroot}
|
|
|
+find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
|
|
|
|
|
-# Install the pkg-config file
|
|
|
-mkdir -p %{buildroot}%{_libdir}/pkgconfig/
|
|
|
-install -m0644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/
|
|
|
-# Fill in the variables
|
|
|
-sed -i "s|@PREFIX@|%{_prefix}|g" %{buildroot}%{_libdir}/pkgconfig/libsrtp.pc
|
|
|
-sed -i "s|@LIBDIR@|%{_libdir}|g" %{buildroot}%{_libdir}/pkgconfig/libsrtp.pc
|
|
|
-sed -i "s|@INCLUDEDIR@|%{_includedir}|g" %{buildroot}%{_libdir}/pkgconfig/libsrtp.pc
|
|
|
+# Handle multilib issues with config.h
|
|
|
+mv %{buildroot}%{_includedir}/%{shortname}/config.h %{buildroot}%{_includedir}/%{shortname}/config-%{__isa_bits}.h
|
|
|
+cp -a %{SOURCE2} %{buildroot}%{_includedir}/%{shortname}/config.h
|
|
|
|
|
|
|
|
|
%clean
|
|
|
-%{__rm} -rf ${RPM_BUILD_ROOT}
|
|
|
+%{__rm} -rf %{buildroot}
|
|
|
|
|
|
-%post -p /sbin/ldconfig
|
|
|
+%post
|
|
|
+/sbin/ldconfig
|
|
|
|
|
|
-%postun -p /sbin/ldconfig
|
|
|
+%postun
|
|
|
+/sbin/ldconfig
|
|
|
|
|
|
%files
|
|
|
-%defattr(-,root,root,-)
|
|
|
-%doc CHANGES LICENSE README
|
|
|
-%{_libdir}/libsrtp.so.*
|
|
|
+%license LICENSE
|
|
|
+%doc CHANGES README TODO VERSION doc/*.txt doc/*.pdf
|
|
|
+%{_libdir}/*.so.*
|
|
|
|
|
|
%files devel
|
|
|
-%defattr(-,root,root,-)
|
|
|
-%{_includedir}/srtp
|
|
|
-%{_libdir}/libsrtp.so
|
|
|
+%{_includedir}/%{shortname}/
|
|
|
%{_libdir}/pkgconfig/libsrtp.pc
|
|
|
-
|
|
|
+%{_libdir}/*.so
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* Mon Jul 11 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.5.4-1
|
|
|
+- new upstream release.
|
|
|
+
|
|
|
* Tue Feb 14 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.4-1
|
|
|
- initial build for Vine Linux based on fedora development
|
|
|
|