Change in osmo-iuh[master]: Provide libosmo-hnbap as a public shared library

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Mon Oct 25 08:52:25 UTC 2021


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/25880 )

Change subject: Provide libosmo-hnbap as a public shared library
......................................................................

Provide libosmo-hnbap as a public shared library

It is needed by the new osmo-hnodeb project.

Related: SYS#5516
Change-Id: I0d0862e9d59d3b206f3f7dfae4b39ae4032bb762
---
M Makefile.am
M configure.ac
M contrib/osmo-iuh.spec.in
M debian/control
A debian/libosmo-hnbap-dev.install
A debian/libosmo-hnbap0.install
M debian/rules
M include/osmocom/hnbap/Makefile.am
A libosmo-hnbap.pc.in
M src/Makefile.am
M src/hnbap/Makefile.am
M src/tests/Makefile.am
12 files changed, 84 insertions(+), 14 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/Makefile.am b/Makefile.am
index fd684e7..1dc00d6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,7 +3,7 @@
 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 \
diff --git a/configure.ac b/configure.ac
index e2d9f56..93c5bb1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -150,6 +150,7 @@
 AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])
 
 AC_OUTPUT(
+	libosmo-hnbap.pc
 	libosmo-ranap.pc
 	libosmo-sabp.pc
 	src/Makefile
diff --git a/contrib/osmo-iuh.spec.in b/contrib/osmo-iuh.spec.in
index c8bdea2..592b168 100644
--- a/contrib/osmo-iuh.spec.in
+++ b/contrib/osmo-iuh.spec.in
@@ -42,6 +42,21 @@
 %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 @@
 %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*
 
diff --git a/debian/control b/debian/control
index 236e853..e13834f 100644
--- a/debian/control
+++ b/debian/control
@@ -45,6 +45,28 @@
   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
diff --git a/debian/libosmo-hnbap-dev.install b/debian/libosmo-hnbap-dev.install
new file mode 100644
index 0000000..4191a57
--- /dev/null
+++ b/debian/libosmo-hnbap-dev.install
@@ -0,0 +1,3 @@
+usr/include/osmocom/hnbap
+usr/lib/*/libosmo-hnbap.so
+usr/lib/*/pkgconfig/libosmo-hnbap.pc
diff --git a/debian/libosmo-hnbap0.install b/debian/libosmo-hnbap0.install
new file mode 100644
index 0000000..766f1f1
--- /dev/null
+++ b/debian/libosmo-hnbap0.install
@@ -0,0 +1 @@
+usr/lib/*/libosmo-hnbap*.so.*
diff --git a/debian/rules b/debian/rules
index e1f6124..714ef8b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,6 +14,7 @@
 
 # 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
diff --git a/include/osmocom/hnbap/Makefile.am b/include/osmocom/hnbap/Makefile.am
index cd9b720..871549e 100644
--- a/include/osmocom/hnbap/Makefile.am
+++ b/include/osmocom/hnbap/Makefile.am
@@ -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 @@
 	U-RNTIQueryResponse.h \
 	UTRANCellID.h
 
+hnbapdir = $(includedir)/osmocom/hnbap
+
 DISTCLEANFILES = \
 	hnbap_ies_defs.h
diff --git a/libosmo-hnbap.pc.in b/libosmo-hnbap.pc.in
new file mode 100644
index 0000000..db05756
--- /dev/null
+++ b/libosmo-hnbap.pc.in
@@ -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}/
diff --git a/src/Makefile.am b/src/Makefile.am
index 524f7b2..3414a01 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -61,9 +61,15 @@
 
 # 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 @@
 #
 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_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
diff --git a/src/hnbap/Makefile.am b/src/hnbap/Makefile.am
index 8a2c56a..c4a8c29 100644
--- a/src/hnbap/Makefile.am
+++ b/src/hnbap/Makefile.am
@@ -236,9 +236,9 @@
 
 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
 
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index 003ea51..dfc8fe6 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -11,17 +11,16 @@
 
 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 @@
 #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
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/25880
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I0d0862e9d59d3b206f3f7dfae4b39ae4032bb762
Gerrit-Change-Number: 25880
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211025/7852dbf8/attachment.htm>


More information about the gerrit-log mailing list