diff --git a/Makefile.am b/Makefile.am index ebaaf29..227694c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,6 +15,7 @@ SUBDIRS = \ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = \ libosmo-csn1.pc \ + libosmo-gprs-llc.pc \ libosmo-gprs-rlcmac.pc \ $(NULL) diff --git a/README.md b/README.md index 8a6c5c9..c857f66 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ libosmo-gprs - Osmocom GPRS libraries This project is a home for several libraries providing common GPRS routines: * libosmo-csn1 - CSN.1 (Concrete Syntax Notation 1) codec, +* libosmo-gprs-llc - LLC (Logical Link Control) layer, * libosmo-gprs-rlcmac - RLC/MAC message definitions. Homepage diff --git a/configure.ac b/configure.ac index 0275362..6e9bcb4 100644 --- a/configure.ac +++ b/configure.ac @@ -73,14 +73,17 @@ AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([libosmo-csn1.pc + libosmo-gprs-llc.pc libosmo-gprs-rlcmac.pc include/Makefile include/osmocom/Makefile include/osmocom/csn1/Makefile include/osmocom/gprs/Makefile + include/osmocom/gprs/llc/Makefile include/osmocom/gprs/rlcmac/Makefile src/Makefile src/csn1/Makefile + src/llc/Makefile src/rlcmac/Makefile tests/Makefile tests/ts_44_018/Makefile diff --git a/contrib/libosmo-gprs.spec.in b/contrib/libosmo-gprs.spec.in index 6496749..9c27c2d 100644 --- a/contrib/libosmo-gprs.spec.in +++ b/contrib/libosmo-gprs.spec.in @@ -1,8 +1,8 @@ Name: libosmo-gprs Version: @VERSION@ Release: 0 -Summary: Osmocom GPRS libraries (CSN.1, RLC/MAC) -License: GPL-2.0-or-later +Summary: Osmocom GPRS libraries (CSN.1, RLC/MAC, LLC) +License: GPL-2.0-or-later and AGPL-3.0-or-later Group: Hardware/Mobile URL: https://osmocom.org/projects/libosmo-gprs Source: %{name}-%{version}.tar.xz @@ -16,8 +16,8 @@ BuildRequires: pkgconfig(talloc) %description Osmocom GPRS libraries (CSN.1, RLC/MAC) -This package provides Osmocom GPRS libraries used by osmocom-bb and -osmo-pcu: libosmo-csn1, libosmo-gprs-rlcmac. +This package provides Osmocom GPRS libraries used by osmocom-bb, osmo-pcu, +and osmo-sgsn: libosmo-csn1, libosmo-gprs-llc, libosmo-gprs-rlcmac. %package -n libosmo-csn1-0 Summary: CSN.1 (Concrete Syntax Notation 1) codec @@ -40,6 +40,24 @@ Requires: libosmo-csn1-0 = %{version} This package provides development files for compiling a program using libosmo-csn1 - CSN.1 (Concrete Syntax Notation 1) codec. +%package -n libosmo-gprs-llc0 +Summary: Osmocom GPRS LLC library +License: AGPL-3.0-or-later +Group: System/Libraries + +%description -n libosmo-gprs-llc0 +This package provides LLC (Logical Link Control) layer for (E)GPRS. + +%package -n libosmo-gprs-llc-devel +Summary: Development files for libosmo-gprs-llc +License: AGPL-3.0-or-later +Group: Development/Libraries/C and C++ +Requires: libosmo-gprs-llc0 = %{version} + +%description -n libosmo-gprs-llc-devel +This package provides development files for compiling a program using +libosmo-gprs-llc - LLC (Logical Link Control) layer for (E)GPRS. + %package -n libosmo-gprs-rlcmac0 Summary: Osmocom GPRS RLC/MAC library License: GPL-2.0-or-later @@ -78,6 +96,8 @@ make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) %post -n libosmo-csn1-0 -p /sbin/ldconfig %postun -n libosmo-csn1-0 -p /sbin/ldconfig +%post -n libosmo-gprs-llc0 -p /sbin/ldconfig +%postun -n libosmo-gprs-llc0 -p /sbin/ldconfig %post -n libosmo-gprs-rlcmac0 -p /sbin/ldconfig %postun -n libosmo-gprs-rlcmac0 -p /sbin/ldconfig @@ -91,6 +111,17 @@ make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) %_libdir/libosmo-csn1.so %_libdir/pkgconfig/libosmo-csn1.pc +%files -n libosmo-gprs-llc0 +%_libdir/libosmo-gprs-llc.so.0* + +%files -n libosmo-gprs-llc-devel +%dir %_includedir/%name +%dir %_includedir/%name/osmocom +%dir %_includedir/%name/osmocom/gprs +%_includedir/%name/osmocom/gprs/llc +%_libdir/libosmo-gprs-llc.so +%_libdir/pkgconfig/libosmo-gprs-llc.pc + %files -n libosmo-gprs-rlcmac0 %_libdir/libosmo-gprs-rlcmac.so.0* diff --git a/debian/control b/debian/control index 6af9a96..77a7767 100644 --- a/debian/control +++ b/debian/control @@ -43,6 +43,31 @@ Depends: libosmo-csn1-0 (= ${binary:Version}), ${misc:Depends} Description: Development headers and libraries for the Osmocom CSN.1 codec +Package: libosmo-gprs-llc0 +Section: libs +Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, + ${shlibs:Depends} +Description: Osmocom LLC (Logical Link Control) layer for GPRS and EGPRS + +Package: libosmo-gprs-llc-dbg +Architecture: any +Section: debug +Multi-Arch: same +Depends: libosmo-gprs-llc0 (= ${binary:Version}), + ${misc:Depends} +Description: Debug symbols for libosmo-gprs-llc + +Package: libosmo-gprs-llc-dev +Architecture: any +Multi-Arch: same +Section: libdevel +Depends: libosmo-gprs-llc0 (= ${binary:Version}), + ${misc:Depends} +Description: Development headers and libraries for libosmo-gprs-llc + Package: libosmo-gprs-rlcmac0 Section: libs Architecture: any diff --git a/debian/copyright b/debian/copyright index 718bd5a..2ff9bd6 100644 --- a/debian/copyright +++ b/debian/copyright @@ -29,3 +29,24 @@ License: GPL-2.0+ . You should have received a copy of the GNU Affero General Public License along with this program. If not, see . + +Files: src/llc/* + include/osmocom/llc/* +Copyright: 2008-2015 Holger Hans Peter Freyther + 2008-2016 Harald Welte + 2011-2022 sysmocom s.f.m.c. GmbH +License: AGPL-3.0+ + +License: AGPL-3.0+ + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + . + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . diff --git a/debian/libosmo-gprs-llc-dev.install b/debian/libosmo-gprs-llc-dev.install new file mode 100644 index 0000000..b4d76e5 --- /dev/null +++ b/debian/libosmo-gprs-llc-dev.install @@ -0,0 +1,5 @@ +usr/include/osmocom/gprs/llc +usr/lib/*/libosmo-gprs-llc*.a +usr/lib/*/libosmo-gprs-llc*.so +usr/lib/*/libosmo-gprs-llc*.la +usr/lib/*/pkgconfig/libosmo-gprs-llc.pc diff --git a/debian/libosmo-gprs-llc0.install b/debian/libosmo-gprs-llc0.install new file mode 100644 index 0000000..fcd940e --- /dev/null +++ b/debian/libosmo-gprs-llc0.install @@ -0,0 +1 @@ +usr/lib/*/libosmo-gprs-llc*.so.* diff --git a/debian/rules b/debian/rules index 514453c..7701a8e 100755 --- a/debian/rules +++ b/debian/rules @@ -11,6 +11,7 @@ VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g') # See https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#bpp-dbg override_dh_strip: dh_strip -plibosmo-csn1-0 --dbg-package=libosmo-csn1-dbg + dh_strip -plibosmo-gprs-llc0 --dbg-package=libosmo-gprs-llc-dbg dh_strip -plibosmo-gprs-rlcmac0 --dbg-package=libosmo-gprs-rlcmac-dbg # Print test results in case of a failure diff --git a/include/osmocom/gprs/Makefile.am b/include/osmocom/gprs/Makefile.am index f3bd3c1..56b22de 100644 --- a/include/osmocom/gprs/Makefile.am +++ b/include/osmocom/gprs/Makefile.am @@ -1,3 +1,4 @@ SUBDIRS = \ + llc \ rlcmac \ $(NULL) diff --git a/include/osmocom/gprs/llc/Makefile.am b/include/osmocom/gprs/llc/Makefile.am new file mode 100644 index 0000000..d394413 --- /dev/null +++ b/include/osmocom/gprs/llc/Makefile.am @@ -0,0 +1,4 @@ +llc_HEADERS = \ + $(NULL) + +llcdir = $(includedir)/osmocom/gprs/llc diff --git a/libosmo-gprs-llc.pc.in b/libosmo-gprs-llc.pc.in new file mode 100644 index 0000000..8a1ae95 --- /dev/null +++ b/libosmo-gprs-llc.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: Osmocom [E]GPRS LLC (Logical Link Control) Library +Description: C Utility Library +Version: @VERSION@ +Requires: libosmocore +Libs: -L${libdir} -losmo-gprs-llc +Cflags: -I${includedir}/ diff --git a/src/Makefile.am b/src/Makefile.am index 962d182..6a02887 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,5 @@ SUBDIRS = \ csn1 \ + llc \ rlcmac \ $(NULL) diff --git a/src/llc/Makefile.am b/src/llc/Makefile.am new file mode 100644 index 0000000..5f9fac3 --- /dev/null +++ b/src/llc/Makefile.am @@ -0,0 +1,35 @@ +# This is _NOT_ the library release version, it's an API version. +# Please read Chapter 6 "Library interface versions" of the libtool +# documentation before making any modification +LIBVERSION=0:0:0 + +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_srcdir)/include \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + $(LIBOSMOCORE_CFLAGS) \ + $(NULL) + +AM_LDFLAGS = \ + $(LIBOSMOCORE_LIBS) \ + $(NULL) + +lib_LTLIBRARIES = \ + libosmo-gprs-llc.la \ + $(NULL) + +libosmo_gprs_llc_la_SOURCES = \ + $(NULL) + +# TODO: -export-symbols-regex '^osmo_' +libosmo_gprs_llc_la_LDFLAGS = \ + -version-info $(LIBVERSION) \ + -no-undefined \ + $(NULL) + +libosmo_gprs_llc_la_LIBADD = \ + $(LIBOSMOCORE_LIBS) \ + $(NULL)