This commit is contained in:
Tom Callaway 2020-01-07 15:04:01 -05:00
parent c21697a920
commit c19c1d14fb
4 changed files with 49 additions and 21 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/srtp-1.4.4-20101004cvs.tar.bz2
/v1.5.0.tar.gz
/v1.5.4.tar.gz
/v2.3.0.tar.gz

View File

@ -0,0 +1,36 @@
diff -up libsrtp-2.3.0/Makefile.in.sharedfix libsrtp-2.3.0/Makefile.in
--- libsrtp-2.3.0/Makefile.in.sharedfix 2020-01-07 09:48:36.004217062 -0500
+++ libsrtp-2.3.0/Makefile.in 2020-01-07 09:53:08.117725096 -0500
@@ -106,12 +106,14 @@ bindir = @bindir@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libsrtp2.pc
-SHAREDLIBVERSION = 1
+SHAREDLIBMINIVER = 1
+SHAREDLIBVERSION = $(SHAREDLIBMINIVER).0.0
ifneq (,$(or $(findstring linux,@host@), $(findstring gnu,@host@)))
SHAREDLIB_DIR = $(libdir)
-SHAREDLIB_LDFLAGS = -shared -Wl,-soname,$@
SHAREDLIBSUFFIXNOVER = so
+SHAREDLIBMINISUFFIX = $(SHAREDLIBSUFFIXNOVER).$(SHAREDLIBMINIVER)
SHAREDLIBSUFFIX = $(SHAREDLIBSUFFIXNOVER).$(SHAREDLIBVERSION)
+SHAREDLIB_LDFLAGS = -shared -Wl,-soname,libsrtp2.$(SHAREDLIBMINISUFFIX)
else ifneq (,$(or $(findstring cygwin,@host@), $(findstring mingw,@host@)))
SHAREDLIB_DIR = $(bindir)
SHAREDLIB_LDFLAGS = -shared -Wl,--out-implib,libsrtp2.dll.a
@@ -166,6 +168,7 @@ libsrtp2.$(SHAREDLIBSUFFIX): $(srtpobj)
$(CC) -shared -o $@ $(SHAREDLIB_LDFLAGS) \
$^ $(LDFLAGS) $(LIBS)
if [ -n "$(SHAREDLIBVERSION)" ]; then \
+ ln -sfn $@ libsrtp2.$(SHAREDLIBMINISUFFIX); \
ln -sfn $@ libsrtp2.$(SHAREDLIBSUFFIXNOVER); \
fi
@@ -288,6 +291,7 @@ install:
cp libsrtp2.$(SHAREDLIBSUFFIXNOVER) $(DESTDIR)$(SHAREDLIB_DIR)/; \
if [ -n "$(SHAREDLIBVERSION)" ]; then \
ln -sfn libsrtp2.$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR)/libsrtp2.$(SHAREDLIBSUFFIXNOVER); \
+ ln -sfn libsrtp2.$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR)/libsrtp2.$(SHAREDLIBMINISUFFIX); \
fi; \
fi
$(INSTALL) -d $(DESTDIR)$(pkgconfigdir)

View File

@ -1,20 +1,15 @@
%global shortname srtp
Name: libsrtp
Version: 1.5.4
Release: 11%{?dist}
Version: 2.3.0
Release: 1%{?dist}
Summary: An implementation of the Secure Real-time Transport Protocol (SRTP)
License: BSD
URL: https://github.com/cisco/libsrtp
Source0: https://github.com/cisco/libsrtp/archive/v%{version}.tar.gz
# Universal config.h
Source2: config.h
BuildRequires: gcc
BuildRequires: gcc, nss-devel, libpcap-devel
# 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
Patch0: libsrtp-2.3.0-shared-fix.patch
%description
This package provides an implementation of the Secure Real-time
@ -33,9 +28,6 @@ developing applications that use %{name}.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .sharedfix
%patch1 -p1 -b .srtp_aes_encrypt
%patch2 -p1 -b .sha1-name-fix
%patch3 -p1 -b .mips-name-fix
%if 0%{?rhel} > 0
%ifarch ppc64
@ -45,30 +37,29 @@ sed -i 's/-z noexecstack//' Makefile.in
%build
export CFLAGS="%{optflags} -fPIC"
%configure
%configure --enable-nss
make %{?_smp_mflags} shared_library
%install
make install DESTDIR=%{buildroot}
find %{buildroot} -name '*.la' -exec rm -f {} ';'
# 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
%ldconfig_scriptlets
%files
%license LICENSE
%doc CHANGES README TODO VERSION doc/*.txt doc/*.pdf
%doc CHANGES README.md
%{_libdir}/*.so.*
%files devel
%{_includedir}/%{shortname}/
%{_libdir}/pkgconfig/libsrtp.pc
%{_includedir}/%{shortname}2/
%{_libdir}/pkgconfig/libsrtp2.pc
%{_libdir}/*.so
%changelog
* Tue Jan 7 2020 Tom Callaway <spot@fedoraproject.org> - 2.3.0-1
- update to 2.3.0
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.4-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

View File

@ -1 +1 @@
64a9580f86a9c3e1c4986e944e6a5a84 v1.5.4.tar.gz
SHA512 (v2.3.0.tar.gz) = 34b1a01cb9a75aed175be09aadd2827224203b9801becc3fbc5214667cce79c3b87b0f59e4315583863ab5a2cc4fc81d56ab604a5e4c984518b8a8a2a7b77461