From: Ruben Undheim <ruben.undheim@gmail.com>
Date: Sun, 5 Aug 2018 20:53:25 +0000
Subject: Upstream only delivers static libraries. This patch changes these

to shared libraries. In addition, the libraries are renamed to make it clearer
what they are (and because of a conflict in the Debian namespace for one of
them)
---
 libosmo-mtp.pc.in      |  2 +-
 libosmo-sccp.pc.in     |  2 +-
 src/Makefile.am        | 13 ++++++++-----
 tests/m2ua/Makefile.am |  2 +-
 4 files changed, 11 insertions(+), 8 deletions(-)

Index: libosmo-sccp-1.6.0+dfsg1/libosmo-mtp.pc.in
===================================================================
--- libosmo-sccp-1.6.0+dfsg1.orig/libosmo-mtp.pc.in	2022-10-04 12:17:51.089058938 +0200
+++ libosmo-sccp-1.6.0+dfsg1/libosmo-mtp.pc.in	2022-10-04 12:17:51.085058938 +0200
@@ -6,5 +6,5 @@
 Name: Osmo MTP Lib
 Description: Osmo MTP Lib
 Version: @VERSION@
-Libs: -L${libdir} -lmtp
+Libs: -L${libdir} -losmomtp
 Cflags: -I${includedir}/
Index: libosmo-sccp-1.6.0+dfsg1/libosmo-sccp.pc.in
===================================================================
--- libosmo-sccp-1.6.0+dfsg1.orig/libosmo-sccp.pc.in	2022-10-04 12:17:51.089058938 +0200
+++ libosmo-sccp-1.6.0+dfsg1/libosmo-sccp.pc.in	2022-10-04 12:17:51.085058938 +0200
@@ -6,5 +6,5 @@
 Name: OpenBSC SCCP Lib
 Description: OpenBSC SCCP Lib
 Version: @VERSION@
-Libs: -L${libdir} -lsccp
+Libs: -L${libdir} -losmosccp -losmoxua
 Cflags: -I${includedir}/
Index: libosmo-sccp-1.6.0+dfsg1/src/Makefile.am
===================================================================
--- libosmo-sccp-1.6.0+dfsg1.orig/src/Makefile.am	2022-10-04 12:17:51.089058938 +0200
+++ libosmo-sccp-1.6.0+dfsg1/src/Makefile.am	2022-10-04 12:17:51.085058938 +0200
@@ -7,11 +7,14 @@
 # Legacy static libs
 
 sccpdir = $(libdir)
-sccp_LIBRARIES = libsccp.a libmtp.a libxua.a
+sccp_LTLIBRARIES = libosmosccp.la libosmomtp.la libosmoxua.la
 
-libsccp_a_SOURCES = sccp.c
-libmtp_a_SOURCES = mtp_pcap.c
-libxua_a_SOURCES = xua_msg.c
+libosmosccp_la_SOURCES = sccp.c
+libosmosccp_la_LDFLAGS= -shared -fPIC
+libosmomtp_la_SOURCES = mtp_pcap.c
+libosmomtp_la_LDFLAGS= -shared -fPIC
+libosmoxua_la_SOURCES = xua_msg.c
+libosmoxua_la_LDFLAGS= -shared -fPIC
 # ensure that the file for the static lib is built with different C
 # flags, working around automake complaining that xua_msg.o is built
 # both with libtool (below) and without (here)
Index: libosmo-sccp-1.6.0+dfsg1/tests/m2ua/Makefile.am
===================================================================
--- libosmo-sccp-1.6.0+dfsg1.orig/tests/m2ua/Makefile.am	2022-10-04 12:17:51.089058938 +0200
+++ libosmo-sccp-1.6.0+dfsg1/tests/m2ua/Makefile.am	2022-10-04 12:17:51.085058938 +0200
@@ -5,4 +5,4 @@
 
 check_PROGRAMS = m2ua_test
 m2ua_test_SOURCES = m2ua_test.c
-m2ua_test_LDADD = $(top_builddir)/src/libxua.a $(LIBOSMOCORE_LIBS)
+m2ua_test_LDADD = $(top_builddir)/src/libosmoxua.la $(LIBOSMOCORE_LIBS)
