Initial libosmo-gprs-llc library skeleton

Change-Id: Ia537acc6f4e6ab576dc7959d427b80f62c474296
This commit is contained in:
Vadim Yanitskiy 2022-08-26 06:11:08 +07:00
parent 4e50861ea0
commit 2639b78795
14 changed files with 145 additions and 4 deletions

View File

@ -15,6 +15,7 @@ SUBDIRS = \
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = \ pkgconfig_DATA = \
libosmo-csn1.pc \ libosmo-csn1.pc \
libosmo-gprs-llc.pc \
libosmo-gprs-rlcmac.pc \ libosmo-gprs-rlcmac.pc \
$(NULL) $(NULL)

View File

@ -4,6 +4,7 @@ libosmo-gprs - Osmocom GPRS libraries
This project is a home for several libraries providing common GPRS routines: This project is a home for several libraries providing common GPRS routines:
* libosmo-csn1 - CSN.1 (Concrete Syntax Notation 1) codec, * libosmo-csn1 - CSN.1 (Concrete Syntax Notation 1) codec,
* libosmo-gprs-llc - LLC (Logical Link Control) layer,
* libosmo-gprs-rlcmac - RLC/MAC message definitions. * libosmo-gprs-rlcmac - RLC/MAC message definitions.
Homepage Homepage

View File

@ -73,14 +73,17 @@ AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([libosmo-csn1.pc AC_CONFIG_FILES([libosmo-csn1.pc
libosmo-gprs-llc.pc
libosmo-gprs-rlcmac.pc libosmo-gprs-rlcmac.pc
include/Makefile include/Makefile
include/osmocom/Makefile include/osmocom/Makefile
include/osmocom/csn1/Makefile include/osmocom/csn1/Makefile
include/osmocom/gprs/Makefile include/osmocom/gprs/Makefile
include/osmocom/gprs/llc/Makefile
include/osmocom/gprs/rlcmac/Makefile include/osmocom/gprs/rlcmac/Makefile
src/Makefile src/Makefile
src/csn1/Makefile src/csn1/Makefile
src/llc/Makefile
src/rlcmac/Makefile src/rlcmac/Makefile
tests/Makefile tests/Makefile
tests/ts_44_018/Makefile tests/ts_44_018/Makefile

View File

@ -1,8 +1,8 @@
Name: libosmo-gprs Name: libosmo-gprs
Version: @VERSION@ Version: @VERSION@
Release: 0 Release: 0
Summary: Osmocom GPRS libraries (CSN.1, RLC/MAC) Summary: Osmocom GPRS libraries (CSN.1, RLC/MAC, LLC)
License: GPL-2.0-or-later License: GPL-2.0-or-later and AGPL-3.0-or-later
Group: Hardware/Mobile Group: Hardware/Mobile
URL: https://osmocom.org/projects/libosmo-gprs URL: https://osmocom.org/projects/libosmo-gprs
Source: %{name}-%{version}.tar.xz Source: %{name}-%{version}.tar.xz
@ -16,8 +16,8 @@ BuildRequires: pkgconfig(talloc)
%description %description
Osmocom GPRS libraries (CSN.1, RLC/MAC) Osmocom GPRS libraries (CSN.1, RLC/MAC)
This package provides Osmocom GPRS libraries used by osmocom-bb and This package provides Osmocom GPRS libraries used by osmocom-bb, osmo-pcu,
osmo-pcu: libosmo-csn1, libosmo-gprs-rlcmac. and osmo-sgsn: libosmo-csn1, libosmo-gprs-llc, libosmo-gprs-rlcmac.
%package -n libosmo-csn1-0 %package -n libosmo-csn1-0
Summary: CSN.1 (Concrete Syntax Notation 1) codec 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 This package provides development files for compiling a program using
libosmo-csn1 - CSN.1 (Concrete Syntax Notation 1) codec. 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 %package -n libosmo-gprs-rlcmac0
Summary: Osmocom GPRS RLC/MAC library Summary: Osmocom GPRS RLC/MAC library
License: GPL-2.0-or-later 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 %post -n libosmo-csn1-0 -p /sbin/ldconfig
%postun -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 %post -n libosmo-gprs-rlcmac0 -p /sbin/ldconfig
%postun -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/libosmo-csn1.so
%_libdir/pkgconfig/libosmo-csn1.pc %_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 %files -n libosmo-gprs-rlcmac0
%_libdir/libosmo-gprs-rlcmac.so.0* %_libdir/libosmo-gprs-rlcmac.so.0*

25
debian/control vendored
View File

@ -43,6 +43,31 @@ Depends: libosmo-csn1-0 (= ${binary:Version}),
${misc:Depends} ${misc:Depends}
Description: Development headers and libraries for the Osmocom CSN.1 codec 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 Package: libosmo-gprs-rlcmac0
Section: libs Section: libs
Architecture: any Architecture: any

21
debian/copyright vendored
View File

@ -29,3 +29,24 @@ License: GPL-2.0+
. .
You should have received a copy of the GNU Affero General Public License You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
Files: src/llc/*
include/osmocom/llc/*
Copyright: 2008-2015 Holger Hans Peter Freyther <zecke@selfish.org>
2008-2016 Harald Welte <laforge@gnumonks.org>
2011-2022 sysmocom s.f.m.c. GmbH <info@sysmocom.de>
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 <http://www.gnu.org/licenses/>.

5
debian/libosmo-gprs-llc-dev.install vendored Normal file
View File

@ -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

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

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

1
debian/rules vendored
View File

@ -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 # See https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#bpp-dbg
override_dh_strip: override_dh_strip:
dh_strip -plibosmo-csn1-0 --dbg-package=libosmo-csn1-dbg 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 dh_strip -plibosmo-gprs-rlcmac0 --dbg-package=libosmo-gprs-rlcmac-dbg
# Print test results in case of a failure # Print test results in case of a failure

View File

@ -1,3 +1,4 @@
SUBDIRS = \ SUBDIRS = \
llc \
rlcmac \ rlcmac \
$(NULL) $(NULL)

View File

@ -0,0 +1,4 @@
llc_HEADERS = \
$(NULL)
llcdir = $(includedir)/osmocom/gprs/llc

11
libosmo-gprs-llc.pc.in Normal file
View File

@ -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}/

View File

@ -1,4 +1,5 @@
SUBDIRS = \ SUBDIRS = \
csn1 \ csn1 \
llc \
rlcmac \ rlcmac \
$(NULL) $(NULL)

35
src/llc/Makefile.am Normal file
View File

@ -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)