Provide libosmo-hnbap as a public shared library

It is needed by the new osmo-hnodeb project.

Related: SYS#5516
Change-Id: I0d0862e9d59d3b206f3f7dfae4b39ae4032bb762
This commit is contained in:
Pau Espin 2021-10-21 13:50:20 +02:00
parent 2127a71515
commit 35f2bd60ae
12 changed files with 84 additions and 14 deletions

View File

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

View File

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

View File

@ -42,6 +42,21 @@ BuildRequires: pkgconfig(libosmovty) >= 1.5.0
%description
Osmocom code for the Iuh interface (HNBAP, RUA, RANAP)
%package -n libosmo-hnbap0
Summary: Shared Library part of libosmo-hnbap
Group: System/Libraries
%description -n libosmo-hnbap0
Osmocom code for the Iuh interface (HNBAP, RUA, RANAP)
%package -n libosmo-hnbap-devel
Summary: Development files for Osmocom HNBAP library
Group: Development/Libraries/C and C++
Requires: libosmo-hnbap0 = %{version}
%description -n libosmo-hnbap-devel
Osmocom code for the Iuh interface (HNBAP, RUA, RANAP)
%package -n libosmo-ranap3
Summary: Shared Library part of libosmo-ranap
Group: System/Libraries
@ -121,6 +136,14 @@ make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
%config %{_sysconfdir}/osmocom/osmo-hnbgw.cfg
%{_unitdir}/osmo-hnbgw.service
%files -n libosmo-hnbap0
%{_libdir}/libosmo-hnbap.so.0*
%files -n libosmo-hnbap-devel
%{_includedir}/*
%{_libdir}/libosmo-hnbap.so
%{_libdir}/pkgconfig/libosmo-hnbap.pc
%files -n libosmo-ranap3
%{_libdir}/libosmo-ranap.so.3*

22
debian/control vendored
View File

@ -45,6 +45,28 @@ Description: ${misc:Package} PDF documentation
Various manuals: user manual, VTY reference manual and/or
protocol/interface manuals.
Package: libosmo-hnbap0
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-hnbap-dbg
Section: debug
Architecture: any
Multi-Arch: same
Depends: libosmo-hnbap0 (= ${binary:Version}), ${misc:Depends}
Description: Osmocom code for the Iuh interface (HNBAP, RUA, RANAP)
Package: libosmo-hnbap-dev
Section: libdevel
Architecture: any
Multi-Arch: same
Depends: libosmo-hnbap0 (= ${binary:Version}), ${misc:Depends}
Description: Osmocom code for the Iuh interface (HNBAP, RUA, RANAP)
Package: libosmo-ranap3
Section: libs
Architecture: any

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

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

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

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

1
debian/rules vendored
View File

@ -14,6 +14,7 @@ override_dh_auto_configure:
# See https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#bpp-dbg
override_dh_strip:
dh_strip -plibosmo-hnbap0 --dbg-package=libosmo-hnbap-dbg
dh_strip -plibosmo-ranap3 --dbg-package=libosmo-ranap-dbg
dh_strip -plibosmo-sabp0 --dbg-package=libosmo-sabp-dbg
dh_strip -posmo-hnbgw --dbg-package=osmo-hnbgw-dbg

View File

@ -1,4 +1,4 @@
noinst_HEADERS = \
hnbap_HEADERS = \
hnbap_common.h hnbap_ies_defs.h \
AccessResult.h \
Access-stratum-release-indicator.h \
@ -116,5 +116,7 @@ noinst_HEADERS = \
U-RNTIQueryResponse.h \
UTRANCellID.h
hnbapdir = $(includedir)/osmocom/hnbap
DISTCLEANFILES = \
hnbap_ies_defs.h

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

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

View File

@ -61,9 +61,15 @@ AM_CFLAGS = -Wall -I$(top_srcdir)/include -I$(top_builddir)/include \
# build the shared RANAP + SABP library
#
HNBAP_LIBVERSION=0:0:0
RANAP_LIBVERSION=4:0:1
SABP_LIBVERSION=0:0:0
lib_LTLIBRARIES = libosmo-ranap.la libosmo-sabp.la
lib_LTLIBRARIES = libosmo-hnbap.la libosmo-ranap.la libosmo-sabp.la
libosmo_hnbap_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HNBAP_LIBVERSION)
libosmo_hnbap_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOSIGTRAN_LIBS) \
$(ASN1C_LIBS) hnbap/libosmo-asn1-hnbap.la
libosmo_hnbap_la_SOURCES = hnbap_common.c hnbap_encoder.c hnbap_decoder.c
libosmo_ranap_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(RANAP_LIBVERSION)
libosmo_ranap_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOSIGTRAN_LIBS) \
$(ASN1C_LIBS) ranap/libosmo-asn1-ranap.la
@ -80,8 +86,7 @@ libosmo_sabp_la_SOURCES = sabp_common.c sabp_encoder.c sabp_decoder.c
#
bin_PROGRAMS = osmo-hnbgw
osmo_hnbgw_SOURCES = hnbap_encoder.c hnbap_decoder.c hnbap_common.c \
rua_encoder.c rua_decoder.c rua_common.c \
osmo_hnbgw_SOURCES = rua_encoder.c rua_decoder.c rua_common.c \
rua_msg_factory.c \
hnbgw.c hnbgw_hnbap.c hnbgw_rua.c hnbgw_ranap.c \
hnbgw_vty.c \
@ -90,8 +95,8 @@ osmo_hnbgw_SOURCES = hnbap_encoder.c hnbap_decoder.c hnbap_common.c \
osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOVTY_LIBS) $(OSMOCTRL_LIBS) \
$(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) \
$(OSMONETIF_LIBS) \
hnbap/libosmo-asn1-hnbap.a rua/libosmo-asn1-rua.a \
libosmo-ranap.la
rua/libosmo-asn1-rua.a \
libosmo-hnbap.la libosmo-ranap.la
regen: regenerate-from-asn1-source

View File

@ -236,9 +236,9 @@ AM_CFLAGS = -I$(top_srcdir)/include $(ASN1C_CFLAGS) $(OSMOCORE_CFLAGS)
HNBAP_ASN1 = $(top_srcdir)/asn1/hnbap
noinst_LIBRARIES=libosmo-asn1-hnbap.a
libosmo_asn1_hnbap_a_SOURCES=$(ASN_MODULE_SOURCES)
libosmo_asn1_hnbap_a_LIBADD=$(ASN1C_LDADD)
noinst_LTLIBRARIES=libosmo-asn1-hnbap.la
libosmo_asn1_hnbap_la_SOURCES=$(ASN_MODULE_SOURCES)
libosmo_asn1_hnbap_la_LIBADD=$(ASN1C_LDADD)
regen: regenerate-from-asn1-source

View File

@ -11,17 +11,16 @@ check_PROGRAMS = test-ranap test-helpers test-hnbap hnb-test #dummy-cn
noinst_HEADERS = test_common.h hnb-test.h hnb-test-layers.h
HNBAP_FILES = $(top_srcdir)/src/hnbap_common.c $(top_builddir)/src/hnbap_decoder.c $(top_builddir)/src/hnbap_encoder.c
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_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_LDADD = $(COMMON_LIBS) $(top_builddir)/src/hnbap/libosmo-asn1-hnbap.a $(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 = $(HNBAP_FILES) $(RUA_FILES) hnb-test.c test_common.c hnb-test-ranap.c hnb-test-rua.c
hnb_test_LDADD = $(COMMON_LIBS) $(top_builddir)/src/hnbap/libosmo-asn1-hnbap.a $(top_builddir)/src/rua/libosmo-asn1-rua.a $(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_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-hnbap.la $(top_builddir)/src/rua/libosmo-asn1-rua.a $(top_builddir)/src/libosmo-ranap.la
test_ranap_SOURCES = test-ranap.c test_common.c
test_ranap_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-ranap.la
@ -30,6 +29,9 @@ test_ranap_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-ranap.la
#dummy_cn_SOURCES = test_common.c dummy_cn_sua.c
#dummy_cn_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-ranap.la
$(top_builddir)/src/libosmo-hnbap.la:
$(MAKE) -C $(top_builddir)/src libosmo-hnbap.la
$(top_builddir)/src/libosmo-ranap.la:
$(MAKE) -C $(top_builddir)/src libosmo-ranap.la