Accepting request 284609 from home:jengelh:branches:network:telephony
- Update to new upstream release 1.5.0 OBS-URL: https://build.opensuse.org/request/show/284609 OBS-URL: https://build.opensuse.org/package/show/network:telephony/libsrtp?expand=0&rev=6
This commit is contained in:
parent
fddd431c98
commit
b56a3738e9
@ -1,215 +0,0 @@
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: 2011-10-25 17:51:31.000000000 +0200
|
||||
|
||||
Switch to stress-free automake with libtool library generation.
|
||||
Also add a pkgconfig file for easy detection of presence and paths
|
||||
by secondary projects.
|
||||
|
||||
As libsrtp 1.4.5 has not yet officially been released (as a tarball,
|
||||
on sf.net) and the API is still changing, using -release
|
||||
${PACKAGE_VERSION} won't be of help. We really need to count ABI
|
||||
versions ourselves. So far,
|
||||
|
||||
libsrtp.so.1: srtp 1.4.4
|
||||
libsrtp.so.2: srtp 1.4.5-pre (7db9eb2c67ec8da7c016b7422885)
|
||||
|
||||
---
|
||||
Makefile.am | 99 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
configure.in | 13 ++++-
|
||||
crypto/include/Makefile.am | 7 +++
|
||||
include/Makefile.am | 4 +
|
||||
libsrtp.pc.in | 11 +++++
|
||||
5 files changed, 131 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: libsrtp/Makefile.am
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libsrtp/Makefile.am
|
||||
@@ -0,0 +1,102 @@
|
||||
+# -*- Makefile -*-
|
||||
+
|
||||
+SUBDIRS = crypto/include include
|
||||
+
|
||||
+AM_CPPFLAGS = -I${top_srcdir}/crypto/include -I${top_srcdir}/include
|
||||
+
|
||||
+pkgconfdir = ${libdir}/pkgconfig
|
||||
+pkgconf_DATA = libsrtp.pc
|
||||
+
|
||||
+lib_LTLIBRARIES = libsrtp.la
|
||||
+
|
||||
+noinst_LTLIBRARIES = libcryptomath.la
|
||||
+
|
||||
+ciphers = crypto/cipher/cipher.c crypto/cipher/null_cipher.c \
|
||||
+ crypto/cipher/aes.c crypto/cipher/aes_icm.c \
|
||||
+ crypto/cipher/aes_cbc.c
|
||||
+
|
||||
+hashes = crypto/hash/null_auth.c crypto/hash/sha1.c \
|
||||
+ crypto/hash/hmac.c crypto/hash/auth.c # crypto/hash/tmmhv2.c
|
||||
+
|
||||
+replay = crypto/replay/rdb.c crypto/replay/rdbx.c \
|
||||
+ crypto/replay/ut_sim.c
|
||||
+
|
||||
+math = crypto/math/datatypes.c crypto/math/stat.c
|
||||
+
|
||||
+ust = crypto/ust/ust.c
|
||||
+
|
||||
+rng = crypto/rng/prng.c crypto/rng/ctr_prng.c
|
||||
+if RAND_LINUX_KERNEL
|
||||
+rng += crypto/rng/rand_linux_kernel.c
|
||||
+else
|
||||
+rng += crypto/rng/rand_source.c
|
||||
+endif
|
||||
+
|
||||
+err = crypto/kernel/err.c
|
||||
+
|
||||
+kernel = crypto/kernel/crypto_kernel.c crypto/kernel/alloc.c \
|
||||
+ crypto/kernel/key.c $(rng) $(err) # $(ust)
|
||||
+
|
||||
+cryptsrc = ${ciphers} ${hashes} ${math} ${stat} ${kernel} ${replay}
|
||||
+
|
||||
+# libsrtp.a (implements srtp processing)
|
||||
+
|
||||
+srtpsrc = srtp/srtp.c srtp/ekt.c
|
||||
+
|
||||
+# gdoi is the group domain of interpretation for isakmp, a group key
|
||||
+# management system which can provide keys for srtp
|
||||
+if GDOI
|
||||
+gdoi = gdoi/srtp+gdoi.c
|
||||
+endif
|
||||
+
|
||||
+# so.1 was used in srtp-sharedlib.diff..
|
||||
+libsrtp_la_SOURCES = ${srtpsrc} ${cryptsrc} ${gdoi}
|
||||
+libsrtp_la_LDFLAGS = -version-info 2:0:0
|
||||
+
|
||||
+libcryptomath_la_SOURCES = crypto/math/math.c crypto/math/gf2_8.c
|
||||
+
|
||||
+# test applications
|
||||
+
|
||||
+check_PROGRAMS = crypto/test/aes_calc crypto/test/cipher_driver \
|
||||
+ crypto/test/datatypes_driver crypto/test/kernel_driver \
|
||||
+ crypto/test/rand_gen crypto/test/sha1_driver \
|
||||
+ crypto/test/stat_driver \
|
||||
+ test/srtp_driver test/replay_driver test/roc_driver test/rdbx_driver \
|
||||
+ test/rtpw test/dtls_srtp_driver
|
||||
+
|
||||
+test_rtpw_SOURCES = test/rtpw.c test/rtp.c test/getopt_s.c
|
||||
+test_rtpw_LDADD = libsrtp.la
|
||||
+
|
||||
+test_srtp_driver_SOURCES = test/srtp_driver.c test/getopt_s.c
|
||||
+test_srtp_driver_LDADD = libsrtp.la
|
||||
+
|
||||
+test_rdbx_driver_SOURCES = test/rdbx_driver.c test/getopt_s.c
|
||||
+test_rdbx_driver_LDADD = libsrtp.la
|
||||
+
|
||||
+test_dtls_srtp_driver_SOURCES = test/dtls_srtp_driver.c test/getopt_s.c
|
||||
+test_dtls_srtp_driver_LDADD = libsrtp.la
|
||||
+
|
||||
+memtest: test/srtp_driver
|
||||
+ @test/srtp_driver -v -d "alloc" > tmp
|
||||
+ @grep freed tmp | wc -l > freed
|
||||
+ @grep allocated tmp | wc -l > allocated
|
||||
+ @echo "checking for memory leaks (only works with --enable-stdout)"
|
||||
+ cmp -s allocated freed
|
||||
+ @echo "passed (same number of alloc() and dealloc() calls found)"
|
||||
+ @rm freed allocated tmp
|
||||
+
|
||||
+# tables_apps are used to generate the tables used in the crypto
|
||||
+# implementations; these need only be generated during porting, not
|
||||
+# for building libsrtp or the test applications
|
||||
+
|
||||
+check_PROGRAMS += tables/aes_tables
|
||||
+
|
||||
+tables_aes_tables_SOURCES = tables/aes_tables.c
|
||||
+tables_aes_tables_LDADD = libcryptomath.la
|
||||
+
|
||||
+# the target 'plot' runs the timing test (test/srtp_driver -t) then
|
||||
+# uses gnuplot to produce plots of the results - see the script file
|
||||
+# 'timing'
|
||||
+
|
||||
+plot: test/srtp_driver
|
||||
+ test/srtp_driver -t > timing.dat
|
||||
Index: libsrtp/configure.in
|
||||
===================================================================
|
||||
--- libsrtp.orig/configure.in
|
||||
+++ libsrtp/configure.in
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
-AC_INIT(srtp)
|
||||
+AC_INIT([srtp], [1.4.5])
|
||||
|
||||
dnl Must come before AC_PROG_CC
|
||||
if test -z "$CFLAGS"; then
|
||||
@@ -8,9 +8,13 @@ if test -z "$CFLAGS"; then
|
||||
fi
|
||||
|
||||
dnl Checks for programs.
|
||||
-AC_PROG_RANLIB
|
||||
+AM_INIT_AUTOMAKE([-Wall foreign subdir-objects tar-pax])
|
||||
AC_PROG_CC
|
||||
+AM_PROG_CC_C_O
|
||||
AC_PROG_INSTALL
|
||||
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||
+AC_DISABLE_STATIC
|
||||
+AC_PROG_LIBTOOL
|
||||
|
||||
dnl Check the byte order
|
||||
AC_C_BIGENDIAN
|
||||
@@ -81,6 +85,7 @@ else
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(RNG_OBJS)
|
||||
+AM_CONDITIONAL([RAND_LINUX_KERNEL], [test "$enable_linux_kernel" = yes])
|
||||
|
||||
|
||||
dnl Checks for header files.
|
||||
@@ -189,10 +194,12 @@ if test "$enable_gdoi" = "yes"; then
|
||||
AC_SUBST(GDOI_OBJS)
|
||||
fi
|
||||
AC_MSG_RESULT($enable_gdoi)
|
||||
+AM_CONDITIONAL([GDOI], [test "$enable_gdoi" = "yes"])
|
||||
|
||||
AC_CONFIG_HEADER(crypto/include/config.h:config_in.h)
|
||||
|
||||
-AC_OUTPUT(Makefile crypto/Makefile doc/Makefile)
|
||||
+AC_CONFIG_FILES([Makefile crypto/Makefile crypto/include/Makefile doc/Makefile include/Makefile libsrtp.pc])
|
||||
+AC_OUTPUT
|
||||
|
||||
# This is needed when building outside the source dir.
|
||||
AS_MKDIR_P(crypto/ae_xfm)
|
||||
Index: libsrtp/crypto/include/Makefile.am
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libsrtp/crypto/include/Makefile.am
|
||||
@@ -0,0 +1,7 @@
|
||||
+# -*- Makefile -*-
|
||||
+
|
||||
+pkginclude_HEADERS = \
|
||||
+ aes.h aes_cbc.h aes_icm.h alloc.h auth.h cipher.h crypto.h \
|
||||
+ crypto_kernel.h crypto_math.h crypto_types.h cryptoalg.h datatypes.h \
|
||||
+ err.h gf2_8.h hmac.h integers.h kernel_compat.h key.h null_auth.h \
|
||||
+ null_cipher.h prng.h rand_source.h rdb.h rdbx.h sha1.h stat.h xfm.h
|
||||
Index: libsrtp/include/Makefile.am
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libsrtp/include/Makefile.am
|
||||
@@ -0,0 +1,4 @@
|
||||
+# -*- Makefile -*-
|
||||
+
|
||||
+pkginclude_HEADERS = \
|
||||
+ getopt_s.h rtp.h rtp_priv.h srtp.h srtp_priv.h ut_sim.h
|
||||
Index: libsrtp/libsrtp.pc.in
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libsrtp/libsrtp.pc.in
|
||||
@@ -0,0 +1,11 @@
|
||||
+prefix=@prefix@
|
||||
+exec_prefix=@exec_prefix@
|
||||
+libdir=@libdir@
|
||||
+includedir=@includedir@
|
||||
+
|
||||
+Name: libsrtp
|
||||
+Description: Secure Real-time Transport Protocol library
|
||||
+Version: 1.4.5
|
||||
+URL: http://srtp.sf.net/
|
||||
+Libs: -L${libdir} -lsrtp
|
||||
+Cflags: -I${includedir}/srtp
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:875193a517e24a166ff5d87be7679080f153ad111c2d034ffed080d9ee96679b
|
||||
size 4090572
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 3 18:49:15 UTC 2015 - jengelh@inai.de
|
||||
|
||||
- Update to new upstream release 1.5.0
|
||||
* Add support for OpenSSL crypto
|
||||
* Add support for AES-GCM crypto suites.
|
||||
* Add user data API to allow user to associate additional data
|
||||
with a SRTP context.
|
||||
- Replace libsrtp-automake.patch by simpler srtp-soname.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 28 06:03:05 UTC 2014 - jengelh@inai.de
|
||||
|
||||
|
42
libsrtp.spec
42
libsrtp.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package libsrtp
|
||||
#
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -17,9 +17,8 @@
|
||||
|
||||
|
||||
Name: libsrtp
|
||||
%define library_name libsrtp2
|
||||
%define git_snapshot 7db9eb2
|
||||
Version: 1.4.5.0.20130918.%{git_snapshot}
|
||||
%define library_name libsrtp-1_5_0
|
||||
Version: 1.5.0
|
||||
Release: 0
|
||||
Summary: Secure Real-Time Transport Protocol (SRTP) library
|
||||
License: BSD-3-Clause
|
||||
@ -27,16 +26,10 @@ Group: Development/Libraries/C and C++
|
||||
Url: http://srtp.sourceforge.net/srtp.html
|
||||
|
||||
#Git-Clone: git://github.com/cisco/libsrtp
|
||||
Source: %{name}-git%{git_snapshot}.tar.xz
|
||||
# PATCH-FEATURE-OPENSUSE libsrtp-automake.patch jengelh@inai.de -- Support for automake to easily build shared library.
|
||||
Patch: %{name}-automake.patch
|
||||
Source: https://github.com/cisco/libsrtp/archive/v%version.tar.gz
|
||||
Patch1: srtp-soname.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: libtool
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: xz
|
||||
Provides: srtp = %{version}-%{release}
|
||||
Obsoletes: srtp < %{version}
|
||||
|
||||
@ -77,31 +70,31 @@ in RFC 3711. More information about the SRTP protocol itself can be
|
||||
found on the Secure RTP page.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}
|
||||
%patch -p1
|
||||
%setup -q
|
||||
%patch -P 1 -p1
|
||||
tr '\r' '\n' <doc/draft-irtf-cfrg-icm-00.txt >doc/draft-irtf-cfrg-icm-00.txt.unix
|
||||
touch -r doc/draft-irtf-cfrg-icm-00.txt doc/draft-irtf-cfrg-icm-00.txt.unix
|
||||
mv doc/draft-irtf-cfrg-icm-00.txt.unix doc/draft-irtf-cfrg-icm-00.txt
|
||||
|
||||
%build
|
||||
autoreconf -fi
|
||||
export CFLAGS="%optflags -fPIC"
|
||||
%configure \
|
||||
--enable-generic-aesicm \
|
||||
--enable-syslog
|
||||
--enable-syslog \
|
||||
--disable-static
|
||||
# --enable-gdoi
|
||||
# FIXME: Does not work:
|
||||
# --enable-kernel-linux
|
||||
make %{?_smp_mflags}
|
||||
make %{?_smp_mflags} SONAME="libsrtp-%version.so"
|
||||
|
||||
%install
|
||||
%makeinstall
|
||||
rm %{buildroot}%{_libdir}/*.la
|
||||
%make_install SONAME="libsrtp-%version.so"
|
||||
rm -f "%buildroot/%_libdir"/*.a
|
||||
|
||||
# This file is required by some headers, but missing in the installed files. (bnc#839475)
|
||||
install -m0644 crypto/include/config.h %{buildroot}%{_includedir}/srtp/
|
||||
# This file is required by some headers, but missing in the installed files
|
||||
# (once upon a time - bnc#839475). Now just check that it is there.
|
||||
test -f "%buildroot/%_includedir/srtp/config.h"
|
||||
|
||||
# We provide verbose messages here.
|
||||
set +x
|
||||
# Including of files with generic names and quotes is unsafe and can cause include clashes.
|
||||
# Do it in install phase, because rewriting of the source code before building would require deeper changes.
|
||||
# /usr/include is included automatically, so we don't modify .pc file. (bnc#839475#c2)
|
||||
@ -126,7 +119,6 @@ for SYMBOL in\
|
||||
echo "Rewriting symbol $SYMBOL to SRTP_$SYMBOL..."
|
||||
sed -i 's:\([^A-Z0-9_]\)\('$SYMBOL'\)\([^A-Z0-9_]\|$\):\1SRTP_\2\3:g' %{buildroot}%{_includedir}/srtp/*.h
|
||||
done
|
||||
set -x
|
||||
|
||||
%post -n %{library_name} -p /sbin/ldconfig
|
||||
|
||||
@ -134,7 +126,7 @@ set -x
|
||||
|
||||
%files -n %{library_name}
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libsrtp.so.2*
|
||||
%_libdir/libsrtp-%version.so
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
|
53
srtp-soname.diff
Normal file
53
srtp-soname.diff
Normal file
@ -0,0 +1,53 @@
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: 2015-02-04 14:19:57.379625407 +0100
|
||||
|
||||
build: allow using unique SONAMEs
|
||||
|
||||
The srtp build totally lacks versioning, so provide the possibility
|
||||
to control one from the specfile.
|
||||
---
|
||||
Makefile.in | 17 ++++++++++++-----
|
||||
1 file changed, 12 insertions(+), 5 deletions(-)
|
||||
|
||||
Index: libsrtp/Makefile.in
|
||||
===================================================================
|
||||
--- libsrtp.orig/Makefile.in
|
||||
+++ libsrtp/Makefile.in
|
||||
@@ -19,7 +19,8 @@ HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@
|
||||
|
||||
.PHONY: all test build_table_apps
|
||||
|
||||
-all: test
|
||||
+SONAME = libsrtp.so
|
||||
+all: test ${SONAME}
|
||||
|
||||
runtest: build_table_apps test
|
||||
@echo "running libsrtp test applications..."
|
||||
@@ -121,9 +122,10 @@ libsrtp.a: $(srtpobj) $(cryptobj) $(gdoi
|
||||
ar cr libsrtp.a $^
|
||||
$(RANLIB) libsrtp.a
|
||||
|
||||
-libsrtp.so: $(srtpobj) $(cryptobj) $(gdoi)
|
||||
- $(CC) -shared -Wl,-soname,libsrtp.so \
|
||||
- -o libsrtp.so $^ $(LDFLAGS)
|
||||
+${SONAME}: $(srtpobj) $(cryptobj) $(gdoi)
|
||||
+ $(CC) -shared -Wl,-soname,${SONAME} \
|
||||
+ -o ${SONAME} $^ $(LDFLAGS)
|
||||
+ if [ "${SONAME}" != libsrtp.so ]; then ln -s "${SONAME}" libsrtp.so; fi
|
||||
|
||||
# libcryptomath.a contains general-purpose routines that are used to
|
||||
# generate tables and verify cryptoalgorithm implementations - this
|
||||
@@ -221,7 +223,12 @@ install:
|
||||
cp $(srcdir)/crypto/include/*.h $(DESTDIR)$(includedir)/srtp
|
||||
if [ "$(srcdir)" != "." ]; then cp crypto/include/*.h $(DESTDIR)$(includedir)/srtp; fi
|
||||
if [ -f libsrtp.a ]; then cp libsrtp.a $(DESTDIR)$(libdir)/; fi
|
||||
- if [ -f libsrtp.so ]; then cp libsrtp.so $(DESTDIR)$(libdir)/; fi
|
||||
+ if [ -f "${SONAME}" ]; then \
|
||||
+ cp -a "${SONAME}" ${DESTDIR}${libdir}/; \
|
||||
+ if [ "${SONAME}" != libsrtp.so ]; then \
|
||||
+ cp -a libsrtp.so $(DESTDIR)$(libdir)/; \
|
||||
+ fi; \
|
||||
+ fi
|
||||
if [ "$(pkgconfig_DATA)" != "" ]; then \
|
||||
$(INSTALL) -d $(DESTDIR)$(pkgconfigdir); \
|
||||
cp $(srcdir)/$(pkgconfig_DATA) $(DESTDIR)$(pkgconfigdir)/; \
|
3
v1.5.0.tar.gz
Normal file
3
v1.5.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ecf5e9be5a6ec3c73841977dc2e059c69209849f2e500269fa133d4c654f1b47
|
||||
size 1687709
|
Loading…
Reference in New Issue
Block a user