1
0
forked from pool/osmo-ggsn

integrate build-fixes2.diff into build-fixes.diff

OBS-URL: https://build.opensuse.org/package/show/network:telephony/osmo-ggsn?expand=0&rev=5
This commit is contained in:
Jan Engelhardt 2018-01-05 19:01:46 +00:00 committed by Git OBS Bridge
parent 0fc7641e66
commit a4c589c1fc
2 changed files with 55 additions and 38 deletions

View File

@ -14,12 +14,13 @@
gtp/Makefile.am | 3 ++- gtp/Makefile.am | 3 ++-
lib/Makefile.am | 8 +++++--- lib/Makefile.am | 8 +++++---
sgsnemu/Makefile.am | 9 ++++----- sgsnemu/Makefile.am | 9 ++++-----
5 files changed, 18 insertions(+), 19 deletions(-) tests/lib/Makefile.am | 4 ++--
6 files changed, 20 insertions(+), 21 deletions(-)
Index: osmo-ggsn-1.0.0.30/ggsn/Makefile.am Index: osmo-ggsn-1.1.0/ggsn/Makefile.am
=================================================================== ===================================================================
--- osmo-ggsn-1.0.0.30.orig/ggsn/Makefile.am --- osmo-ggsn-1.1.0.orig/ggsn/Makefile.am
+++ osmo-ggsn-1.0.0.30/ggsn/Makefile.am +++ osmo-ggsn-1.1.0/ggsn/Makefile.am
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
-bin_PROGRAMS = osmo-ggsn -bin_PROGRAMS = osmo-ggsn
+sbin_PROGRAMS = osmo-ggsn +sbin_PROGRAMS = osmo-ggsn
@ -44,10 +45,10 @@ Index: osmo-ggsn-1.0.0.30/ggsn/Makefile.am
osmo_ggsn_SOURCES = ggsn_vty.c ggsn.c ggsn.h gtp-kernel.h icmpv6.c icmpv6.h checksum.c checksum.h osmo_ggsn_SOURCES = ggsn_vty.c ggsn.c ggsn.h gtp-kernel.h icmpv6.c icmpv6.h checksum.c checksum.h
if ENABLE_GTP_KERNEL if ENABLE_GTP_KERNEL
Index: osmo-ggsn-1.0.0.30/ggsn/gtp-kernel.c Index: osmo-ggsn-1.1.0/ggsn/gtp-kernel.c
=================================================================== ===================================================================
--- osmo-ggsn-1.0.0.30.orig/ggsn/gtp-kernel.c --- osmo-ggsn-1.1.0.orig/ggsn/gtp-kernel.c
+++ osmo-ggsn-1.0.0.30/ggsn/gtp-kernel.c +++ osmo-ggsn-1.1.0/ggsn/gtp-kernel.c
@@ -17,8 +17,6 @@ @@ -17,8 +17,6 @@
#include <libgtpnl/gtp.h> #include <libgtpnl/gtp.h>
@ -74,10 +75,10 @@ Index: osmo-ggsn-1.0.0.30/ggsn/gtp-kernel.c
static struct { static struct {
int genl_id; int genl_id;
struct mnl_socket *nl; struct mnl_socket *nl;
Index: osmo-ggsn-1.0.0.30/gtp/Makefile.am Index: osmo-ggsn-1.1.0/gtp/Makefile.am
=================================================================== ===================================================================
--- osmo-ggsn-1.0.0.30.orig/gtp/Makefile.am --- osmo-ggsn-1.1.0.orig/gtp/Makefile.am
+++ osmo-ggsn-1.0.0.30/gtp/Makefile.am +++ osmo-ggsn-1.1.0/gtp/Makefile.am
@@ -6,7 +6,8 @@ lib_LTLIBRARIES = libgtp.la @@ -6,7 +6,8 @@ lib_LTLIBRARIES = libgtp.la
include_HEADERS = gtp.h pdp.h gtpie.h include_HEADERS = gtp.h pdp.h gtpie.h
@ -88,10 +89,10 @@ Index: osmo-ggsn-1.0.0.30/gtp/Makefile.am
libgtp_la_SOURCES = gtp.c gtp.h gtpie.c gtpie.h pdp.c pdp.h lookupa.c lookupa.h queue.c queue.h libgtp_la_SOURCES = gtp.c gtp.h gtpie.c gtpie.h pdp.c pdp.h lookupa.c lookupa.h queue.c queue.h
libgtp_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined libgtp_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined
Index: osmo-ggsn-1.0.0.30/lib/Makefile.am Index: osmo-ggsn-1.1.0/lib/Makefile.am
=================================================================== ===================================================================
--- osmo-ggsn-1.0.0.30.orig/lib/Makefile.am --- osmo-ggsn-1.1.0.orig/lib/Makefile.am
+++ osmo-ggsn-1.0.0.30/lib/Makefile.am +++ osmo-ggsn-1.1.0/lib/Makefile.am
@@ -1,7 +1,9 @@ @@ -1,7 +1,9 @@
-noinst_LIBRARIES = libmisc.a -noinst_LIBRARIES = libmisc.a
+noinst_LTLIBRARIES = libmisc.la +noinst_LTLIBRARIES = libmisc.la
@ -105,10 +106,10 @@ Index: osmo-ggsn-1.0.0.30/lib/Makefile.am
-libmisc_a_SOURCES = getopt1.c getopt.c ippool.c lookup.c tun.c debug.c in46_addr.c -libmisc_a_SOURCES = getopt1.c getopt.c ippool.c lookup.c tun.c debug.c in46_addr.c
+libmisc_la_SOURCES = getopt1.c getopt.c ippool.c lookup.c tun.c debug.c in46_addr.c +libmisc_la_SOURCES = getopt1.c getopt.c ippool.c lookup.c tun.c debug.c in46_addr.c
+libmisc_la_LIBADD = ${LIBOSMOCORE_LIBS} +libmisc_la_LIBADD = ${LIBOSMOCORE_LIBS}
Index: osmo-ggsn-1.0.0.30/sgsnemu/Makefile.am Index: osmo-ggsn-1.1.0/sgsnemu/Makefile.am
=================================================================== ===================================================================
--- osmo-ggsn-1.0.0.30.orig/sgsnemu/Makefile.am --- osmo-ggsn-1.1.0.orig/sgsnemu/Makefile.am
+++ osmo-ggsn-1.0.0.30/sgsnemu/Makefile.am +++ osmo-ggsn-1.1.0/sgsnemu/Makefile.am
@@ -1,9 +1,8 @@ @@ -1,9 +1,8 @@
-bin_PROGRAMS = sgsnemu -bin_PROGRAMS = sgsnemu
+sbin_PROGRAMS = sgsnemu +sbin_PROGRAMS = sgsnemu
@ -123,3 +124,24 @@ Index: osmo-ggsn-1.0.0.30/sgsnemu/Makefile.am
-sgsnemu_DEPENDENCIES = ../gtp/libgtp.la ../lib/libmisc.a -sgsnemu_DEPENDENCIES = ../gtp/libgtp.la ../lib/libmisc.a
+sgsnemu_LDADD = @EXEC_LDADD@ ../gtp/libgtp.la ../lib/libmisc.la $(LIBOSMOCORE_LIBS) +sgsnemu_LDADD = @EXEC_LDADD@ ../gtp/libgtp.la ../lib/libmisc.la $(LIBOSMOCORE_LIBS)
sgsnemu_SOURCES = sgsnemu.c cmdline.c cmdline.h sgsnemu_SOURCES = sgsnemu.c cmdline.c cmdline.h
Index: osmo-ggsn-1.1.0/tests/lib/Makefile.am
===================================================================
--- osmo-ggsn-1.1.0.orig/tests/lib/Makefile.am
+++ osmo-ggsn-1.1.0/tests/lib/Makefile.am
@@ -10,7 +10,7 @@ ippool_test_SOURCES = \
$(NULL)
ippool_test_LDADD = \
- $(top_builddir)/lib/libmisc.a \
+ $(top_builddir)/lib/libmisc.la \
$(LIBOSMOCORE_LIBS) \
$(NULL)
@@ -19,6 +19,6 @@ in46a_test_SOURCES = \
$(NULL)
in46a_test_LDADD = \
- $(top_builddir)/lib/libmisc.a \
+ $(top_builddir)/lib/libmisc.la \
$(LIBOSMOCORE_LIBS) \
$(NULL)

View File

@ -24,9 +24,8 @@ License: GPL-2.0 AND LGPL-2.1+
Group: Productivity/Telephony/Servers Group: Productivity/Telephony/Servers
URL: https://osmocom.org/projects/openggsn/wiki/OsmoGGSN URL: https://osmocom.org/projects/openggsn/wiki/OsmoGGSN
Source: %name-%version.tar.xz Source: %name-%version.tar.xz
#Patch1: build-fixes.diff Patch1: build-fixes.diff
Patch2: build-fixes2.diff Patch2: 0001-fix-compiler-warnings-return-0-in-main-in-3-tests.patch
Patch3: 0001-fix-compiler-warnings-return-0-in-main-in-3-tests.patch
BuildRequires: libtool >= 2 BuildRequires: libtool >= 2
BuildRequires: pkgconfig >= 0.20 BuildRequires: pkgconfig >= 0.20
BuildRequires: systemd-rpm-macros BuildRequires: systemd-rpm-macros
@ -67,29 +66,25 @@ applications that want to make use of libgtp.
%prep %prep
%setup -q %setup -q
#%%patch -P 1 -p1 %patch -P 1 -P 2 -p1
%patch2 -p1
%patch3 -p1
%build %build
echo "%version" >.tarball-version echo "%version" >.tarball-version
autoreconf -fi autoreconf -fi
%configure \ %configure --disable-static --docdir="%_docdir/%name" \
--disable-static \
--docdir=%_docdir/%name \
--includedir="%_includedir/%name" --includedir="%_includedir/%name"
make %{?_smp_mflags} V=1 make %{?_smp_mflags} V=1
%install %install
b=%buildroot b="%buildroot"
%make_install %make_install
find %buildroot -type f -name "*.la" -delete -print find $b -type f -name "*.la" -delete -print
install -D -m 0644 contrib/osmo-ggsn.service "$b/%_unitdir/%name.service" install -D -m 0644 contrib/osmo-ggsn.service "$b/%_unitdir/%name.service"
install -d %buildroot/%_sbindir install -d "$b/%_sbindir"
ln -s %_sbindir/service %buildroot%_sbindir/rc%name ln -s "%_sbindir/service" "$b/%_sbindir/rc%name"
install -d %buildroot%_sysconfdir/osmocom install -d "$b/%_sysconfdir/osmocom"
install -m 0644 doc/examples/osmo-ggsn.cfg %buildroot%_sysconfdir/osmocom/osmo-ggsn.cfg install -m 0644 doc/examples/osmo-ggsn.cfg "$b/%_sysconfdir/osmocom/osmo-ggsn.cfg"
install -m 0644 doc/examples/sgsnemu.conf %buildroot%_sysconfdir/osmocom/sgsnemu.conf install -m 0644 doc/examples/sgsnemu.conf "$b/%_sysconfdir/osmocom/sgsnemu.conf"
%pre %pre
%service_add_pre %name.service %service_add_pre %name.service