File change-name.patch of Package libsrtp2-linphone

# From: Paolo Stivanin <pstivanin@suse.com>
# Date: 2021-07-15 07:36:00 +0200
# Upstream: they use a public (=can browse code) but private
#           (=no registration allowed) gitlab, so no issues/patches
#           can be submitted.
#
# This patch changes the name of this fork from
# srtp2 (which is the same name as the official project from Cisco)
# to srtp2-linphone. This avoid conflicts when both packages need to
# be installed at the same time.
diff -ruN a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt	2021-07-14 14:14:19.962946488 +0200
+++ b/CMakeLists.txt	2021-07-14 14:14:34.739008845 +0200
@@ -24,7 +24,7 @@
 ############################################################################

 cmake_minimum_required(VERSION 3.13)
-project(SRTP2 LANGUAGES C VERSION "2.2.0")
+project(SRTP2-LINPHONE LANGUAGES C VERSION "2.2.0")
 
 
 option(ENABLE_STATIC "Build static library (default is shared library)." NO)
diff -ruN a/config.h.cmake b/config.h.cmake
--- a/config.h.cmake	2021-07-14 14:14:19.962946488 +0200
+++ b/config.h.cmake	2021-07-14 14:25:41.265822063 +0200
@@ -61,8 +61,8 @@
 #cmakedefine HAVE_UINT64_T 1
 #cmakedefine SIZEOF_UNSIGNED_LONG @SIZEOF_UNSIGNED_LONG@
 #cmakedefine SIZEOF_UNSIGNED_LONG_LONG @SIZEOF_UNSIGNED_LONG_LONG@
-#cmakedefine PACKAGE_STRING "libsrtp2 2.2.0-pre"
-#cmakedefine PACKAGE_VERSION "2.0.1-pre"
+#cmakedefine PACKAGE_STRING "libsrtp2-linphone 2.2.0"
+#cmakedefine PACKAGE_VERSION "2.2.0"
 
 #ifndef __cplusplus
 #cmakedefine inline @inline@
diff -ruN a/configure b/configure
--- a/configure	2021-07-14 14:14:19.962946488 +0200
+++ b/configure	2021-07-14 14:27:17.090226448 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libsrtp2 2.2.0.
+# Generated by GNU Autoconf 2.69 for libsrtp2-linphone 2.2.0.
 #
 # Report bugs to <https://github.com/cisco/libsrtp/issues>.
 #
@@ -578,10 +578,10 @@
 MAKEFLAGS=
 
 # Identity of this package.
-PACKAGE_NAME='libsrtp2'
-PACKAGE_TARNAME='libsrtp2'
+PACKAGE_NAME='libsrtp2-linphone'
+PACKAGE_TARNAME='libsrtp2-linphone'
 PACKAGE_VERSION='2.2.0'
-PACKAGE_STRING='libsrtp2 2.2.0'
+PACKAGE_STRING='libsrtp2-linphone 2.2.0'
 PACKAGE_BUGREPORT='https://github.com/cisco/libsrtp/issues'
 PACKAGE_URL=''
 
@@ -1274,7 +1274,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libsrtp2 2.2.0 to adapt to many kinds of systems.
+\`configure' configures libsrtp2-linphone 2.2.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1323,7 +1323,7 @@
   --infodir=DIR           info documentation [DATAROOTDIR/info]
   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
   --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/libsrtp2]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/libsrtp2-linphone]
   --htmldir=DIR           html documentation [DOCDIR]
   --dvidir=DIR            dvi documentation [DOCDIR]
   --pdfdir=DIR            pdf documentation [DOCDIR]
@@ -1340,7 +1340,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libsrtp2 2.2.0:";;
+     short | recursive ) echo "Configuration of libsrtp2-linphone 2.2.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1446,7 +1446,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libsrtp2 configure 2.2.0
+libsrtp2-linphone configure 2.2.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1961,7 +1961,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libsrtp2 $as_me 2.2.0, which was
+It was created by libsrtp2-linphone $as_me 2.2.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -5821,7 +5821,7 @@
 ac_config_headers="$ac_config_headers crypto/include/config.h:config_in.h"
 
 
-ac_config_files="$ac_config_files Makefile crypto/Makefile doc/Makefile libsrtp2.pc"
+ac_config_files="$ac_config_files Makefile crypto/Makefile doc/Makefile libsrtp2-linphone.pc"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -6330,7 +6330,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libsrtp2 $as_me 2.2.0, which was
+This file was extended by libsrtp2-linphone $as_me 2.2.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -6392,7 +6392,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libsrtp2 config.status 2.2.0
+libsrtp2-linphone config.status 2.2.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -6518,7 +6518,7 @@
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "crypto/Makefile") CONFIG_FILES="$CONFIG_FILES crypto/Makefile" ;;
     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
-    "libsrtp2.pc") CONFIG_FILES="$CONFIG_FILES libsrtp2.pc" ;;
+    "libsrtp2-linphone.pc") CONFIG_FILES="$CONFIG_FILES libsrtp2-linphone.pc" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
diff -ruN a/configure.ac b/configure.ac
--- a/configure.ac	2021-07-14 14:14:19.962946488 +0200
+++ b/configure.ac	2021-07-14 14:17:44.051807854 +0200
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT([libsrtp2], [2.2.0], [https://github.com/cisco/libsrtp/issues])
+AC_INIT([libsrtp2-linphone], [2.2.0], [https://github.com/cisco/libsrtp/issues])
 
 dnl Must come before AC_PROG_CC
 EMPTY_CFLAGS="no"
diff -ruN a/configure.in b/configure.in
--- a/configure.in	2021-07-14 14:14:19.962946488 +0200
+++ b/configure.in	2021-07-14 14:18:30.576004232 +0200
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT([libsrtp2], [2.0.1-pre], [https://github.com/cisco/libsrtp/issues])
+AC_INIT([libsrtp2-linphone], [2.2.0], [https://github.com/cisco/libsrtp/issues])
 
 dnl Must come before AC_PROG_CC
 if test -z "$CFLAGS"; then
@@ -191,7 +191,7 @@
 AC_CHECK_PROG(PKG_CONFIG, pkg-config, yes)
 if test "x$PKG_CONFIG" != "x"; then
     HAVE_PKG_CONFIG=1
-    AC_CONFIG_FILES([libsrtp2.pc])
+    AC_CONFIG_FILES([libsrtp2-linphone.pc])
 else
     HAVE_PKG_CONFIG=0
 fi
diff -ruN a/crypto/include/CMakeLists.txt b/crypto/include/CMakeLists.txt
--- a/crypto/include/CMakeLists.txt	2021-07-14 14:14:19.962946488 +0200
+++ b/crypto/include/CMakeLists.txt	2021-07-14 14:22:18.228965090 +0200
@@ -23,6 +23,6 @@
 file(GLOB HEADER_FILES "*.h")
 
 install(FILES ${HEADER_FILES}
-	DESTINATION include/srtp2
+	DESTINATION include/srtp2-linphone
 	PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
 )
diff -ruN a/crypto/Makefile.in b/crypto/Makefile.in
--- a/crypto/Makefile.in	2021-07-14 14:14:19.962946488 +0200
+++ b/crypto/Makefile.in	2021-07-14 14:22:09.140926735 +0200
@@ -16,7 +16,7 @@
 LIBS	= @LIBS@
 LDFLAGS	= @LDFLAGS@ -L. -L..
 COMPILE = $(CC) $(DEFS) $(INCDIR) $(CPPFLAGS) $(CFLAGS)
-CRYPTOLIB = -lsrtp2
+CRYPTOLIB = -lsrtp2-linphone
 
 RANLIB	= @RANLIB@
 
Binary files a/.git/index and b/.git/index differ
diff -ruN a/include/CMakeLists.txt b/include/CMakeLists.txt
--- a/include/CMakeLists.txt	2021-07-14 14:14:19.962946488 +0200
+++ b/include/CMakeLists.txt	2021-07-14 14:22:43.781072964 +0200
@@ -23,6 +23,6 @@
 file(GLOB HEADER_FILES "*.h")
 
 install(FILES ${HEADER_FILES}
-	DESTINATION include/srtp2
+	DESTINATION include/srtp2-linphone
 	PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
 )
diff -ruN a/libsrtp2-linphone.pc.in b/libsrtp2-linphone.pc.in
--- a/libsrtp2-linphone.pc.in	1970-01-01 01:00:00.000000000 +0100
+++ b/libsrtp2-linphone.pc.in	2021-07-14 14:23:04.213159211 +0200
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: @PACKAGE_NAME@
+Version: @PACKAGE_VERSION@
+Description: Library for SRTP (Secure Realtime Transport Protocol)
+
+Libs: -L${libdir} -lsrtp2-linphone @LIBS@
+Cflags: -I${includedir}
diff -ruN a/libsrtp2.pc.in b/libsrtp2.pc.in
--- a/libsrtp2.pc.in	2021-07-14 14:14:19.962946488 +0200
+++ b/libsrtp2.pc.in	1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: @PACKAGE_NAME@
-Version: @PACKAGE_VERSION@
-Description: Library for SRTP (Secure Realtime Transport Protocol)
-
-Libs: -L${libdir} -lsrtp2 @LIBS@
-Cflags: -I${includedir}
diff -ruN a/Makefile.in b/Makefile.in
--- a/Makefile.in	2021-07-14 14:14:19.962946488 +0200
+++ b/Makefile.in	2021-07-14 14:21:55.652869800 +0200
@@ -8,8 +8,8 @@
 # runtest       runs test applications
 # runtest-valgrind runs test applications with valgrind
 # test		builds test applications
-# libsrtp2.a	static library implementing srtp
-# libsrtp2.so	shared library implementing srtp
+# libsrtp2-linphone.a	static library implementing srtp
+# libsrtp2-linphone.so	shared library implementing srtp
 # clean		removes objects, libs, and executables
 # distribution  cleans and builds a .tgz
 # tags          builds etags file from all .c and .h files
@@ -22,7 +22,7 @@
 all: test
 
 runtest: test
-	@echo "running libsrtp2 test applications..."
+	@echo "running libsrtp2-linphone test applications..."
 	crypto/test/cipher_driver$(EXE) -v >/dev/null
 	crypto/test/kernel_driver$(EXE) -v >/dev/null
 	test/test_srtp$(EXE) >/dev/null
@@ -35,14 +35,14 @@
 ifeq (1, $(USE_OPENSSL))
 	cd test; $(abspath $(srcdir))/test/rtpw_test_gcm.sh -w $(abspath $(srcdir))/test/words.txt >/dev/null
 endif
-	@echo "libsrtp2 test applications passed."
+	@echo "libsrtp2-linphone test applications passed."
 	$(MAKE) -C crypto runtest
 
 runtest-valgrind: test
-	@echo "running libsrtp2 test applications... (valgrind)"
+	@echo "running libsrtp2-linphone test applications... (valgrind)"
 	valgrind --error-exitcode=1 --leak-check=full test/test_srtp$(EXE) -v >/dev/null
 	valgrind --error-exitcode=1 --leak-check=full test/srtp_driver$(EXE) -v >/dev/null
-	@echo "libsrtp2 test applications passed. (valgrind)"
+	@echo "libsrtp2-linphone test applications passed. (valgrind)"
 
 # makefile variables
 
@@ -54,7 +54,7 @@
 LIBS	= @LIBS@
 LDFLAGS	= -L. @LDFLAGS@
 COMPILE = $(CC) $(DEFS) $(INCDIR) $(CPPFLAGS) $(CFLAGS)
-SRTPLIB	= -lsrtp2
+SRTPLIB	= -lsrtp2-linphone
 PCAP_LIB = @PCAP_LIB@
 
 AR      = @AR@
@@ -79,7 +79,7 @@
 bindir = @bindir@
 
 pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libsrtp2.pc
+pkgconfig_DATA = libsrtp2-linphone.pc
 
 SHAREDLIBVERSION = 1
 ifneq (,$(or $(findstring linux,@host@), $(findstring gnu,@host@)))
@@ -133,22 +133,22 @@
 
 srtpobj = srtp/srtp.o srtp/ekt.o
 
-libsrtp2.a: $(srtpobj) $(cryptobj) $(gdoi)
-	$(AR) cr libsrtp2.a $^
-	$(RANLIB) libsrtp2.a
+libsrtp2-linphone.a: $(srtpobj) $(cryptobj) $(gdoi)
+	$(AR) cr libsrtp2-linphone.a $^
+	$(RANLIB) libsrtp2-linphone.a
 
-libsrtp2.$(SHAREDLIBSUFFIX): $(srtpobj) $(cryptobj) $(gdoi)
+libsrtp2-linphone.$(SHAREDLIBSUFFIX): $(srtpobj) $(cryptobj) $(gdoi)
 	$(CC) -shared -o $@ $(SHAREDLIB_LDFLAGS) \
 				$^ $(LDFLAGS) $(LIBS)
 	if [ -n "$(SHAREDLIBVERSION)" ]; then \
-		ln -sfn $@ libsrtp2.$(SHAREDLIBSUFFIXNOVER); \
+		ln -sfn $@ libsrtp2-linphone.$(SHAREDLIBSUFFIXNOVER); \
 	fi
 
-shared_library: libsrtp2.$(SHAREDLIBSUFFIX)
+shared_library: libsrtp2-linphone.$(SHAREDLIBSUFFIX)
 
-libsrtp2.so: $(srtpobj) $(cryptobj)
-	$(CC) -shared -Wl,-soname,libsrtp2.so \
-		-o libsrtp2.so $^ $(LDFLAGS)
+libsrtp2-linphone.so: $(srtpobj) $(cryptobj)
+	$(CC) -shared -Wl,-soname,libsrtp2-linphone.so \
+		-o libsrtp2-linphone.so $^ $(LDFLAGS)
 
 # test applications
 ifneq (1, $(USE_OPENSSL))
@@ -168,7 +168,7 @@
 testapp += test/rtp_decoder$(EXE)
 endif
 
-$(testapp): libsrtp2.a
+$(testapp): libsrtp2-linphone.a
 
 test/rtpw$(EXE): test/rtpw.c test/rtp.c test/util.c test/getopt_s.c \
 		crypto/math/datatypes.c
@@ -238,40 +238,40 @@
 
 # documentation - the target libsrtp2doc builds html documentation
 
-libsrtp2doc:
+libsrtp2-linphone-doc:
 	$(MAKE) -C doc
 
 .PHONY: clean superclean distclean install
 
 install:
-	$(INSTALL) -d $(DESTDIR)$(includedir)/srtp2
+	$(INSTALL) -d $(DESTDIR)$(includedir)/srtp2-linphone
 	$(INSTALL) -d $(DESTDIR)$(libdir)
-	cp $(srcdir)/include/srtp.h $(DESTDIR)$(includedir)/srtp2
-	cp $(srcdir)/crypto/include/cipher.h $(DESTDIR)$(includedir)/srtp2
-	cp $(srcdir)/crypto/include/auth.h $(DESTDIR)$(includedir)/srtp2
-	cp $(srcdir)/crypto/include/crypto_types.h $(DESTDIR)$(includedir)/srtp2
-	if [ -f libsrtp2.a ]; then cp libsrtp2.a $(DESTDIR)$(libdir)/; fi
+	cp $(srcdir)/include/srtp.h $(DESTDIR)$(includedir)/srtp2-linphone
+	cp $(srcdir)/crypto/include/cipher.h $(DESTDIR)$(includedir)/srtp2-linphone
+	cp $(srcdir)/crypto/include/auth.h $(DESTDIR)$(includedir)/srtp2-linphone
+	cp $(srcdir)/crypto/include/crypto_types.h $(DESTDIR)$(includedir)/srtp2-linphone
+	if [ -f libsrtp2-linphone.a ]; then cp libsrtp2-linphone.a $(DESTDIR)$(libdir)/; fi
 	if [ -f libsrtp2.dll.a ]; then cp libsrtp2.dll.a $(DESTDIR)$(libdir)/; fi
-	if [ -f libsrtp2.$(SHAREDLIBSUFFIX) ]; then \
+	if [ -f libsrtp2-linphone.$(SHAREDLIBSUFFIX) ]; then \
 		$(INSTALL) -d $(DESTDIR)$(SHAREDLIB_DIR); \
-		cp libsrtp2.$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR)/; \
-		cp libsrtp2.$(SHAREDLIBSUFFIXNOVER) $(DESTDIR)$(SHAREDLIB_DIR)/; \
+		cp libsrtp2-linphone.$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR)/; \
+		cp libsrtp2-linphone.$(SHAREDLIBSUFFIXNOVER) $(DESTDIR)$(SHAREDLIB_DIR)/; \
 		if [ -n "$(SHAREDLIBVERSION)" ]; then \
-			ln -sfn libsrtp2.$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR)/libsrtp2.$(SHAREDLIBSUFFIXNOVER); \
+			ln -sfn libsrtp2-linphone.$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR)/libsrtp2-linphone.$(SHAREDLIBSUFFIXNOVER); \
 		fi; \
 	fi
 	$(INSTALL) -d $(DESTDIR)$(pkgconfigdir)
 	cp $(top_builddir)/$(pkgconfig_DATA) $(DESTDIR)$(pkgconfigdir)/
 
 uninstall:
-	rm -f $(DESTDIR)$(includedir)/srtp2/*.h
-	rm -f $(DESTDIR)$(libdir)/libsrtp2.*
-	-rmdir $(DESTDIR)$(includedir)/srtp2
+	rm -f $(DESTDIR)$(includedir)/srtp2-linphone/*.h
+	rm -f $(DESTDIR)$(libdir)/libsrtp2-linphone.*
+	-rmdir $(DESTDIR)$(includedir)/srtp2-linphone
 	rm -f $(DESTDIR)$(pkgconfigdir)/$(pkgconfig_DATA)
 
 clean:
 	rm -rf $(cryptobj) $(srtpobj) TAGS \
-		libsrtp2.a libsrtp2.so libsrtp2.dll.a core *.core test/core
+		libsrtp2-linphone.a libsrtp2-linphone.so libsrtp2.dll.a core *.core test/core
 	for a in * */* */*/*; do			\
 			  if [ -f "$$a~" ] ; then rm -f $$a~; fi;	\
 		done;
diff -ruN a/VERSION b/VERSION
--- a/VERSION	2021-07-14 14:14:19.962946488 +0200
+++ b/VERSION	2021-07-14 14:17:53.471847614 +0200
@@ -1 +1 @@
-2.0.1-pre
+2.2.0
openSUSE Build Service is sponsored by