Provide libosmo-rua as a public shared library

It is needed by the new osmo-hnodeb project.

Related: SYS#5516
Change-Id: I8b800baacbfe3a3c424c51b418b5ac2e2848b3ba
This commit is contained in:
Pau Espin Pedrol
2021-10-21 14:49:24 +02:00
parent 35f2bd60ae
commit dba8b0c334
12 changed files with 81 additions and 15 deletions

View File

@@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS = foreign dist-bzip2
SUBDIRS = src include doc contrib SUBDIRS = src include doc contrib
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libosmo-hnbap.pc libosmo-ranap.pc libosmo-sabp.pc pkgconfig_DATA = libosmo-hnbap.pc libosmo-ranap.pc libosmo-rua.pc libosmo-sabp.pc
EXTRA_DIST = \ EXTRA_DIST = \
.version \ .version \

View File

@@ -152,6 +152,7 @@ AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])
AC_OUTPUT( AC_OUTPUT(
libosmo-hnbap.pc libosmo-hnbap.pc
libosmo-ranap.pc libosmo-ranap.pc
libosmo-rua.pc
libosmo-sabp.pc libosmo-sabp.pc
src/Makefile src/Makefile
src/hnbap/Makefile src/hnbap/Makefile

View File

@@ -75,6 +75,20 @@ Osmocom code for the Iuh interface (HNBAP, RUA, RANAP)
This subpackage contains libraries and header files for developing This subpackage contains libraries and header files for developing
applications that want to make use of libosmoranap. applications that want to make use of libosmoranap.
%package -n libosmo-rua0
Summary: Shared Library part of libosmo-rua
Group: System/Libraries
%description -n libosmo-rua0
Osmocom code for the Iuh interface (HNBAP, RUA, RANAP)
%package -n libosmo-rua-devel
Summary: Development files for Osmocom RUA library
Group: Development/Libraries/C and C++
Requires: libosmo-rua0 = %{version}
%description -n libosmo-rua-devel
Osmocom code for the Iuh interface (HNBAP, RUA, RANAP)
%package -n libosmo-sabp0 %package -n libosmo-sabp0
Summary: Shared Library part of libosmo-sabp Summary: Shared Library part of libosmo-sabp
@@ -152,6 +166,14 @@ make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
%{_libdir}/libosmo-ranap.so %{_libdir}/libosmo-ranap.so
%{_libdir}/pkgconfig/libosmo-ranap.pc %{_libdir}/pkgconfig/libosmo-ranap.pc
%files -n libosmo-rua0
%{_libdir}/libosmo-rua.so.0*
%files -n libosmo-rua-devel
%{_includedir}/*
%{_libdir}/libosmo-rua.so
%{_libdir}/pkgconfig/libosmo-rua.pc
%files -n libosmo-sabp0 %files -n libosmo-sabp0
%{_libdir}/libosmo-sabp.so.0* %{_libdir}/libosmo-sabp.so.0*

22
debian/control vendored
View File

@@ -89,6 +89,28 @@ Multi-Arch: same
Depends: libosmo-ranap3 (= ${binary:Version}), ${misc:Depends} Depends: libosmo-ranap3 (= ${binary:Version}), ${misc:Depends}
Description: Osmocom code for the Iuh interface (HNBAP, RUA, RANAP) Description: Osmocom code for the Iuh interface (HNBAP, RUA, RANAP)
Package: libosmo-rua0
Section: libs
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: Osmocom code for the Iuh interface (HNBAP, RUA, RANAP)
Package: libosmo-rua-dbg
Section: debug
Architecture: any
Multi-Arch: same
Depends: libosmo-rua0 (= ${binary:Version}), ${misc:Depends}
Description: Osmocom code for the Iuh interface (HNBAP, RUA, RANAP)
Package: libosmo-rua-dev
Section: libdevel
Architecture: any
Multi-Arch: same
Depends: libosmo-rua0 (= ${binary:Version}), ${misc:Depends}
Description: Osmocom code for the Iuh interface (HNBAP, RUA, RANAP)
Package: libosmo-sabp0 Package: libosmo-sabp0
Section: libs Section: libs
Architecture: any Architecture: any

3
debian/libosmo-rua-dev.install vendored Normal file
View File

@@ -0,0 +1,3 @@
usr/include/osmocom/rua
usr/lib/*/libosmo-rua.so
usr/lib/*/pkgconfig/libosmo-rua.pc

1
debian/libosmo-rua0.install vendored Normal file
View File

@@ -0,0 +1 @@
usr/lib/*/libosmo-rua*.so.*

1
debian/rules vendored
View File

@@ -16,6 +16,7 @@ override_dh_auto_configure:
override_dh_strip: override_dh_strip:
dh_strip -plibosmo-hnbap0 --dbg-package=libosmo-hnbap-dbg dh_strip -plibosmo-hnbap0 --dbg-package=libosmo-hnbap-dbg
dh_strip -plibosmo-ranap3 --dbg-package=libosmo-ranap-dbg dh_strip -plibosmo-ranap3 --dbg-package=libosmo-ranap-dbg
dh_strip -plibosmo-rua0 --dbg-package=libosmo-rua-dbg
dh_strip -plibosmo-sabp0 --dbg-package=libosmo-sabp-dbg dh_strip -plibosmo-sabp0 --dbg-package=libosmo-sabp-dbg
dh_strip -posmo-hnbgw --dbg-package=osmo-hnbgw-dbg dh_strip -posmo-hnbgw --dbg-package=osmo-hnbgw-dbg

View File

@@ -1,4 +1,4 @@
noinst_HEADERS = \ rua_HEADERS = \
rua_common.h rua_ies_defs.h rua_msg_factory.h \ rua_common.h rua_ies_defs.h rua_msg_factory.h \
RUA_Ansi-41-IDNNS.h \ RUA_Ansi-41-IDNNS.h \
RUA_Cause.h \ RUA_Cause.h \
@@ -36,5 +36,7 @@ noinst_HEADERS = \
RUA_TypeOfError.h \ RUA_TypeOfError.h \
RUA_UnsuccessfulOutcome.h RUA_UnsuccessfulOutcome.h
ruadir = $(includedir)/osmocom/rua
DISTCLEANFILES = \ DISTCLEANFILES = \
rua_ies_defs.h rua_ies_defs.h

10
libosmo-rua.pc.in Normal file
View File

@@ -0,0 +1,10 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: Osmocom RUA protocol library
Description: C Utility Library
Version: @VERSION@
Libs: -L${libdir} -losmo-rua
Cflags: -I${includedir}/

View File

@@ -63,8 +63,9 @@ AM_CFLAGS = -Wall -I$(top_srcdir)/include -I$(top_builddir)/include \
# #
HNBAP_LIBVERSION=0:0:0 HNBAP_LIBVERSION=0:0:0
RANAP_LIBVERSION=4:0:1 RANAP_LIBVERSION=4:0:1
RUA_LIBVERSION=0:0:0
SABP_LIBVERSION=0:0:0 SABP_LIBVERSION=0:0:0
lib_LTLIBRARIES = libosmo-hnbap.la libosmo-ranap.la libosmo-sabp.la lib_LTLIBRARIES = libosmo-hnbap.la libosmo-ranap.la libosmo-rua.la libosmo-sabp.la
libosmo_hnbap_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HNBAP_LIBVERSION) libosmo_hnbap_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HNBAP_LIBVERSION)
libosmo_hnbap_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOSIGTRAN_LIBS) \ libosmo_hnbap_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOSIGTRAN_LIBS) \
$(ASN1C_LIBS) hnbap/libosmo-asn1-hnbap.la $(ASN1C_LIBS) hnbap/libosmo-asn1-hnbap.la
@@ -76,6 +77,11 @@ libosmo_ranap_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSM
libosmo_ranap_la_SOURCES = ranap_common.c ranap_encoder.c ranap_decoder.c ranap_msg_factory.c iu_helpers.c \ libosmo_ranap_la_SOURCES = ranap_common.c ranap_encoder.c ranap_decoder.c ranap_msg_factory.c iu_helpers.c \
ranap_common_cn.c iu_client.c iu_client_vty.c ranap_common_cn.c iu_client.c iu_client_vty.c
libosmo_rua_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HNBAP_LIBVERSION)
libosmo_rua_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOSIGTRAN_LIBS) \
$(ASN1C_LIBS) rua/libosmo-asn1-rua.la
libosmo_rua_la_SOURCES = rua_common.c rua_encoder.c rua_decoder.c rua_msg_factory.c
libosmo_sabp_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(SABP_LIBVERSION) libosmo_sabp_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(SABP_LIBVERSION)
libosmo_sabp_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOSIGTRAN_LIBS) \ libosmo_sabp_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOSIGTRAN_LIBS) \
$(ASN1C_LIBS) sabp/libosmo-asn1-sabp.la $(ASN1C_LIBS) sabp/libosmo-asn1-sabp.la
@@ -86,17 +92,14 @@ libosmo_sabp_la_SOURCES = sabp_common.c sabp_encoder.c sabp_decoder.c
# #
bin_PROGRAMS = osmo-hnbgw bin_PROGRAMS = osmo-hnbgw
osmo_hnbgw_SOURCES = rua_encoder.c rua_decoder.c rua_common.c \ osmo_hnbgw_SOURCES = hnbgw.c hnbgw_hnbap.c hnbgw_rua.c hnbgw_ranap.c \
rua_msg_factory.c \
hnbgw.c hnbgw_hnbap.c hnbgw_rua.c hnbgw_ranap.c \
hnbgw_vty.c \ hnbgw_vty.c \
context_map.c hnbgw_cn.c context_map.c hnbgw_cn.c
osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOCTRL_LIBS) \ osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOCTRL_LIBS) \
$(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) \ $(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) \
$(OSMONETIF_LIBS) \ $(OSMONETIF_LIBS) \
rua/libosmo-asn1-rua.a \ libosmo-hnbap.la libosmo-rua.la libosmo-ranap.la
libosmo-hnbap.la libosmo-ranap.la
regen: regenerate-from-asn1-source regen: regenerate-from-asn1-source

View File

@@ -74,9 +74,9 @@ ASN_MODULE_INC= \
AM_CFLAGS = -I$(top_srcdir)/include $(ASN1C_CFLAGS) $(OSMOCORE_CFLAGS) AM_CFLAGS = -I$(top_srcdir)/include $(ASN1C_CFLAGS) $(OSMOCORE_CFLAGS)
noinst_LIBRARIES=libosmo-asn1-rua.a noinst_LTLIBRARIES=libosmo-asn1-rua.la
libosmo_asn1_rua_a_SOURCES=$(ASN_MODULE_SOURCES) libosmo_asn1_rua_la_SOURCES=$(ASN_MODULE_SOURCES)
libosmo_asn1_rua_a_LIBADD=$(ASN1C_LDADD) libosmo_asn1_rua_la_LIBADD=$(ASN1C_LDADD)
regen: regenerate-from-asn1-source regen: regenerate-from-asn1-source

View File

@@ -11,16 +11,14 @@ check_PROGRAMS = test-ranap test-helpers test-hnbap hnb-test #dummy-cn
noinst_HEADERS = test_common.h hnb-test.h hnb-test-layers.h noinst_HEADERS = test_common.h hnb-test.h hnb-test-layers.h
RUA_FILES = $(top_srcdir)/src/rua_common.c $(top_builddir)/src/rua_decoder.c $(top_builddir)/src/rua_encoder.c $(top_srcdir)/src/rua_msg_factory.c
test_helpers_SOURCES = test-helpers.c test_common.c test_helpers_SOURCES = test-helpers.c test_common.c
test_helpers_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-ranap.la test_helpers_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-ranap.la
test_hnbap_SOURCES = $(top_srcdir)/src/hnbap_common.c $(top_builddir)/src/hnbap_decoder.c test-hnbap.c test_common.c test_hnbap_SOURCES = $(top_srcdir)/src/hnbap_common.c $(top_builddir)/src/hnbap_decoder.c test-hnbap.c test_common.c
test_hnbap_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-hnbap.la $(top_builddir)/src/libosmo-ranap.la test_hnbap_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-hnbap.la $(top_builddir)/src/libosmo-ranap.la
hnb_test_SOURCES = $(RUA_FILES) hnb-test.c test_common.c hnb-test-ranap.c hnb-test-rua.c hnb_test_SOURCES = hnb-test.c test_common.c hnb-test-ranap.c hnb-test-rua.c
hnb_test_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-hnbap.la $(top_builddir)/src/rua/libosmo-asn1-rua.a $(top_builddir)/src/libosmo-ranap.la hnb_test_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-hnbap.la $(top_builddir)/src/libosmo-rua.la $(top_builddir)/src/libosmo-ranap.la
test_ranap_SOURCES = test-ranap.c test_common.c test_ranap_SOURCES = test-ranap.c test_common.c
test_ranap_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-ranap.la test_ranap_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-ranap.la
@@ -32,6 +30,9 @@ test_ranap_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-ranap.la
$(top_builddir)/src/libosmo-hnbap.la: $(top_builddir)/src/libosmo-hnbap.la:
$(MAKE) -C $(top_builddir)/src libosmo-hnbap.la $(MAKE) -C $(top_builddir)/src libosmo-hnbap.la
$(top_builddir)/src/libosmo-rua.la:
$(MAKE) -C $(top_builddir)/src libosmo-rua.la
$(top_builddir)/src/libosmo-ranap.la: $(top_builddir)/src/libosmo-ranap.la:
$(MAKE) -C $(top_builddir)/src libosmo-ranap.la $(MAKE) -C $(top_builddir)/src libosmo-ranap.la