1
0
forked from pool/libosmo-sccp
Jan Engelhardt 2014-07-21 08:38:00 +00:00 committed by Git OBS Bridge
commit f2bfe74d5e
6 changed files with 303 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

115
0001-build-fixes.patch Normal file
View File

@ -0,0 +1,115 @@
From 1d95c316569c325775981aecd31b34abad029a2f Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Mon, 21 Jul 2014 10:13:00 +0200
Subject: [PATCH] build: fixes
Require osmogsm in configure.ac, because source code depends on it.
Find and use system talloc, do not rely on OSMO's bundled copy.
Rename libmtp to libosmo-mtp, as libmtp is already used by the
Multimedia Transfer Protocol library.
---
configure.ac | 4 +++-
libosmo-mtp.pc.in | 2 +-
libosmo-sccp.pc.in | 2 +-
src/Makefile.am | 12 ++++++++----
tests/m2ua/Makefile.am | 6 +++---
tests/sccp/Makefile.am | 6 +++---
6 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/configure.ac b/configure.ac
index 98a6b1f..75d2b95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,9 +13,11 @@ dnl checks for programs
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PROG_INSTALL
-AC_PROG_RANLIB
+LT_INIT
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.0)
+PKG_CHECK_MODULES([LIBOSMOGSM], [libosmogsm])
+PKG_CHECK_MODULES([TALLOC], [talloc])
# The following test is taken from WebKit's webkit.m4
saved_CFLAGS="$CFLAGS"
diff --git a/libosmo-mtp.pc.in b/libosmo-mtp.pc.in
index 675d0d3..5e99dd3 100644
--- a/libosmo-mtp.pc.in
+++ b/libosmo-mtp.pc.in
@@ -6,5 +6,5 @@ includedir=@includedir@
Name: Osmo MTP Lib
Description: Osmo MTP Lib
Version: @VERSION@
-Libs: -L${libdir} -lmtp
+Libs: -L${libdir} -losmo-mtp
Cflags: -I${includedir}/
diff --git a/libosmo-sccp.pc.in b/libosmo-sccp.pc.in
index eda8d49..9dd18c1 100644
--- a/libosmo-sccp.pc.in
+++ b/libosmo-sccp.pc.in
@@ -6,5 +6,5 @@ includedir=@includedir@
Name: OpenBSC SCCP Lib
Description: OpenBSC SCCP Lib
Version: @VERSION@
-Libs: -L${libdir} -lsccp
+Libs: -L${libdir} -losmo-sccp
Cflags: -I${includedir}/
diff --git a/src/Makefile.am b/src/Makefile.am
index c7451ad..85863f8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,8 +2,12 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)
AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS)
sccpdir = $(libdir)
-sccp_LIBRARIES = libsccp.a libmtp.a libm2ua.a
+sccp_LTLIBRARIES = libosmo-sccp.la libosmo-mtp.la libosmo-m2ua.la
+
+libosmo_sccp_la_SOURCES = sccp.c
+libosmo_mtp_la_SOURCES = mtp_pcap.c
+libosmo_m2ua_la_SOURCES = m2ua_msg.c
+libosmo_sccp_la_LDFLAGS = -release ${PACKAGE_VERSION}
+libosmo_mtp_la_LDFLAGS = -release ${PACKAGE_VERSION}
+libosmo_m2ua_la_LDFLAGS = -release ${PACKAGE_VERSION}
-libsccp_a_SOURCES = sccp.c
-libmtp_a_SOURCES = mtp_pcap.c
-libm2ua_a_SOURCES = m2ua_msg.c
diff --git a/tests/m2ua/Makefile.am b/tests/m2ua/Makefile.am
index 0eb8302..1d1b56f 100644
--- a/tests/m2ua/Makefile.am
+++ b/tests/m2ua/Makefile.am
@@ -1,8 +1,8 @@
-INCLUDES = $(all_includes) -I$(top_srcdir)/include -Wall
-AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS)
+AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -Wall ${LIBOSMOCORE_CFLAGS} ${TALLOC_CFLAGS}
+AM_CFLAGS=-Wall
EXTRA_DIST = m2ua_test.ok
noinst_PROGRAMS = m2ua_test
m2ua_test_SOURCES = m2ua_test.c
-m2ua_test_LDADD = $(top_builddir)/src/libm2ua.a $(LIBOSMOCORE_LIBS)
+m2ua_test_LDADD = $(top_builddir)/src/libosmo-m2ua.la $(LIBOSMOCORE_LIBS) ${TALLOC_LIBS}
diff --git a/tests/sccp/Makefile.am b/tests/sccp/Makefile.am
index 90790a3..f43d858 100644
--- a/tests/sccp/Makefile.am
+++ b/tests/sccp/Makefile.am
@@ -1,10 +1,10 @@
-INCLUDES = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS)
+AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include ${LIBOSMOCORE_CFLAGS} ${TALLOC_CFLAGS}
+AM_CFLAGS=-Wall -ggdb3
EXTRA_DIST = sccp_test.ok
noinst_PROGRAMS = sccp_test
sccp_test_SOURCES = sccp_test.c $(top_srcdir)/src/sccp.c
-sccp_test_LDADD = $(LIBOSMOCORE_LIBS)
+sccp_test_LDADD = $(LIBOSMOCORE_LIBS) ${TALLOC_LIBS}
--
2.0.0

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:deebd1a67a8c988db4ce69fe04d55a54900d596ba908f9545896ae38515f76c3
size 35244

4
libosmo-sccp.changes Normal file
View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Mon Jul 21 08:37:45 UTC 2014 - jengelh@inai.de
- Initial package (version 0.0.6.3) for build.opensuse.org

157
libosmo-sccp.spec Normal file
View File

@ -0,0 +1,157 @@
#
# spec file for package libosmo-sccp
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: libosmo-sccp
Summary: Osmocom library for A-bis interface between BTS and BSC
License: AGPL-3.0+ and GPL-2.0+
Group: Development/Libraries/C and C++
Version: 0.0.6.3
Release: 0
Url: http://openbsc.osmocom.org/
#Git-Clone: git://git.osmocom.org/libosmo-sccp
#Snapshot: 0.0.6.3
Source: %name-%version.tar.xz
Patch1: 0001-build-fixes.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: automake >= 1.6
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: xz
BuildRequires: pkgconfig(libosmocore) >= 0.3.0
BuildRequires: pkgconfig(libosmogsm)
BuildRequires: pkgconfig(talloc)
%description
%package -n libosmo-m2ua-0_0_6_3
Summary: Osmocom Message Transfer Part 2 User Adaptation library
License: AGPL-3.0+
Group: System/Libraries
%description -n libosmo-m2ua-0_0_6_3
M2UA (RFC 3331) provides an SCTP (RFC 3873) adaptation layer for the
seamless backhaul of MTP Level 2 user messages and service interface
across an IP network.
%package -n libosmo-m2ua-devel
Summary: Development files for the Osmocom M2UA library
License: AGPL-3.0+
Group: Development/Libraries/C and C++
Requires: libosmo-m2ua-0_0_6_3 = %version
%description -n libosmo-m2ua-devel
%package -n libosmo-mtp-0_0_6_3
Summary: Osmocom Message Transfer Part library
License: GPL-2.0+
Group: System/Libraries
%description -n libosmo-mtp-0_0_6_3
The Message Transfer Part (MTP) is part of the Signaling System 7
(SS7) used for communication in Public Switched Telephone Networks.
MTP is responsible for reliable, unduplicated and in-sequence
transport of SS7 messages between communication partners.
%package -n libosmo-mtp-devel
Summary: Development files for the Osmocom MTP library
License: GPL-2.0+
Group: Development/Libraries/C and C++
Requires: libosmo-mtp-0_0_6_3 = %version
%description -n libosmo-mtp-devel
%package -n libosmo-sccp-0_0_6_3
Summary: Osmocom Signalling Connection Control Part library
License: GPL-2.0+
Group: System/Libraries
%description -n libosmo-sccp-0_0_6_3
The Signalling Connection Control Part (SCCP) is a network layer
protocol that provides extended routing, flow control, segmentation,
connection-orientation, and error correction facilities in Signaling
System 7 telecommunications networks. SCCP relies on the services of
MTP for basic routing and error detection.
%package -n libosmo-sccp-devel
Summary: Development files for the Osmocom SCCP library
License: GPL-2.0+
Group: Development/Libraries/C and C++
Requires: libosmo-sccp-0_0_6_3 = %version
%description -n libosmo-sccp-devel
%prep
%setup -qn %name
%patch -P 1 -p1
%build
echo "%version" >.tarball-version
autoreconf -fiv
%configure --enable-shared --disable-static
make %{?_smp_mflags}
%install
b="%buildroot"
make %{?_smp_mflags} install DESTDIR="$b"
find "$b/%_libdir" -type f -name "*.la" -delete
%check
make %{?_smp_mflags} check
%post -n libosmo-m2ua-0_0_6_3 -p /sbin/ldconfig
%postun -n libosmo-m2ua-0_0_6_3 -p /sbin/ldconfig
%post -n libosmo-mtp-0_0_6_3 -p /sbin/ldconfig
%postun -n libosmo-mtp-0_0_6_3 -p /sbin/ldconfig
%post -n libosmo-sccp-0_0_6_3 -p /sbin/ldconfig
%postun -n libosmo-sccp-0_0_6_3 -p /sbin/ldconfig
%files -n libosmo-m2ua-0_0_6_3
%defattr(-,root,root)
%_libdir/libosmo-m2ua-%version.so
%files -n libosmo-m2ua-devel
%defattr(-,root,root)
%dir %_includedir/osmocom
%_includedir/osmocom/m2ua/
%_libdir/libosmo-m2ua.so
%files -n libosmo-mtp-0_0_6_3
%defattr(-,root,root)
%_libdir/libosmo-mtp-%version.so
%files -n libosmo-mtp-devel
%defattr(-,root,root)
%dir %_includedir/osmocom
%_includedir/osmocom/mtp/
%_libdir/libosmo-mtp.so
%_libdir/pkgconfig/libosmo-mtp.pc
%files -n libosmo-sccp-0_0_6_3
%defattr(-,root,root)
%_libdir/libosmo-sccp.so
%_libdir/libosmo-sccp-%version.so
%files -n libosmo-sccp-devel
%defattr(-,root,root)
%dir %_includedir/osmocom
%_includedir/osmocom/sccp/
%_libdir/pkgconfig/libosmo-sccp.pc
%changelog