forked from pool/osmo-ggsn
This commit is contained in:
parent
50458c75a4
commit
f5a4ae0000
173
build-fixes.diff
Normal file
173
build-fixes.diff
Normal file
@ -0,0 +1,173 @@
|
||||
|
||||
* stuff is in the wrong directory, move to sbin
|
||||
* CFLAGS is abused for preprocessor, move to CPPFLAGS
|
||||
* add missing $(LIBGTPNL_CFLAGS)
|
||||
* ggsn includes libmnl.h but fails to PKG_CHECK for it;
|
||||
turns out it only uses the header and no defs, so kill that.
|
||||
* _DEPENDENCIES on files not generated by $this Makefile are pointless
|
||||
* must use .la files in _LDADD/_LIBADD whenever they exist
|
||||
* remove AC_PROG_CXX, the C++ is never used
|
||||
|
||||
---
|
||||
ggsn/Makefile.am | 10 +++++-----
|
||||
gtp/Makefile.am | 3 ++-
|
||||
lib/Makefile.am | 13 ++++++++-----
|
||||
lib/gtp-kernel.c | 5 +----
|
||||
sgsnemu/Makefile.am | 10 +++++-----
|
||||
tests/gtp/Makefile.am | 2 +-
|
||||
tests/lib/Makefile.am | 4 ++--
|
||||
7 files changed, 24 insertions(+), 23 deletions(-)
|
||||
|
||||
Index: osmo-ggsn-1.2.2/ggsn/Makefile.am
|
||||
===================================================================
|
||||
--- osmo-ggsn-1.2.2.orig/ggsn/Makefile.am
|
||||
+++ osmo-ggsn-1.2.2/ggsn/Makefile.am
|
||||
@@ -1,15 +1,15 @@
|
||||
-bin_PROGRAMS = osmo-ggsn
|
||||
+sbin_PROGRAMS = osmo-ggsn
|
||||
|
||||
AM_LDFLAGS = @EXEC_LDFLAGS@
|
||||
|
||||
-AM_CFLAGS = -O2 -D_GNU_SOURCE -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOVTY_CFLAGS)
|
||||
+AM_CPPFLAGS = -D_GNU_SOURCE -DSBINDIR='"$(sbindir)"' $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOVTY_CFLAGS)
|
||||
+AM_CFLAGS = -fno-builtin -Wall
|
||||
|
||||
-osmo_ggsn_LDADD = @EXEC_LDADD@ -lgtp -L../gtp ../lib/libmisc.a $(LIBOSMOCORE_LIBS) $(LIBOSMOCTRL_LIBS) $(LIBOSMOVTY_LIBS)
|
||||
+osmo_ggsn_LDADD = @EXEC_LDADD@ ../gtp/libgtp.la ../lib/libmisc.la $(LIBOSMOCORE_LIBS) $(LIBOSMOCTRL_LIBS) $(LIBOSMOVTY_LIBS)
|
||||
|
||||
if ENABLE_GTP_KERNEL
|
||||
-AM_CFLAGS += -DGTP_KERNEL $(LIBGTPNL_CFLAGS)
|
||||
+AM_CPPFLAGS += -DGTP_KERNEL $(LIBGTPNL_CFLAGS)
|
||||
osmo_ggsn_LDADD += $(LIBGTPNL_LIBS)
|
||||
endif
|
||||
|
||||
-osmo_ggsn_DEPENDENCIES = ../gtp/libgtp.la ../lib/libmisc.a
|
||||
osmo_ggsn_SOURCES = ggsn_vty.c ggsn.c ggsn.h icmpv6.c icmpv6.h checksum.c checksum.h
|
||||
Index: osmo-ggsn-1.2.2/gtp/Makefile.am
|
||||
===================================================================
|
||||
--- osmo-ggsn-1.2.2.orig/gtp/Makefile.am
|
||||
+++ osmo-ggsn-1.2.2/gtp/Makefile.am
|
||||
@@ -8,7 +8,8 @@ lib_LTLIBRARIES = libgtp.la
|
||||
|
||||
include_HEADERS = gtp.h pdp.h gtpie.h
|
||||
|
||||
-AM_CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS)
|
||||
+AM_CPPFLAGS = -DSBINDIR='"$(sbindir)"' $(LIBOSMOCORE_CFLAGS)
|
||||
+AM_CFLAGS = -O2 -fno-builtin -Wall -ggdb
|
||||
|
||||
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
|
||||
Index: osmo-ggsn-1.2.2/lib/Makefile.am
|
||||
===================================================================
|
||||
--- osmo-ggsn-1.2.2.orig/lib/Makefile.am
|
||||
+++ osmo-ggsn-1.2.2/lib/Makefile.am
|
||||
@@ -1,12 +1,15 @@
|
||||
-noinst_LIBRARIES = libmisc.a
|
||||
+noinst_LTLIBRARIES = libmisc.la
|
||||
|
||||
noinst_HEADERS = gnugetopt.h ippool.h lookup.h syserr.h tun.h in46_addr.h netdev.h gtp-kernel.h
|
||||
|
||||
-AM_CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS)
|
||||
+AM_CPPFLAGS = -DSBINDIR='"$(sbindir)"' $(LIBOSMOCORE_CFLAGS)
|
||||
+AM_CFLAGS = -fno-builtin -Wall
|
||||
|
||||
-libmisc_a_SOURCES = getopt1.c getopt.c ippool.c lookup.c tun.c debug.c in46_addr.c netdev.c
|
||||
+libmisc_la_SOURCES = getopt1.c getopt.c ippool.c lookup.c tun.c debug.c in46_addr.c netdev.c
|
||||
+libmisc_la_LIBADD = ${LIBOSMOCORE_LIBS}
|
||||
|
||||
if ENABLE_GTP_KERNEL
|
||||
-AM_CFLAGS += -DGTP_KERNEL $(LIBGTPNL_CFLAGS)
|
||||
-libmisc_a_SOURCES += gtp-kernel.c
|
||||
+AM_CPPFLAGS += -DGTP_KERNEL $(LIBGTPNL_CFLAGS)
|
||||
+libmisc_la_SOURCES += gtp-kernel.c
|
||||
+libmisc_la_LIBADD += ${LIBGTPNL_LIBS}
|
||||
endif
|
||||
Index: osmo-ggsn-1.2.2/lib/gtp-kernel.c
|
||||
===================================================================
|
||||
--- osmo-ggsn-1.2.2.orig/lib/gtp-kernel.c
|
||||
+++ osmo-ggsn-1.2.2/lib/gtp-kernel.c
|
||||
@@ -18,8 +18,6 @@
|
||||
|
||||
#include <libgtpnl/gtp.h>
|
||||
#include <libgtpnl/gtpnl.h>
|
||||
-#include <libmnl/libmnl.h>
|
||||
-
|
||||
#include <errno.h>
|
||||
|
||||
#include <time.h>
|
||||
@@ -31,8 +29,6 @@
|
||||
|
||||
#include <libgtpnl/gtp.h>
|
||||
#include <libgtpnl/gtpnl.h>
|
||||
-#include <libmnl/libmnl.h>
|
||||
-
|
||||
#include "gtp-kernel.h"
|
||||
|
||||
static void pdp_debug(const char *prefix, const char *devname, struct pdp_t *pdp)
|
||||
@@ -49,6 +45,7 @@ static void pdp_debug(const char *prefix
|
||||
in46a_ntoa(&ia46), inet_ntoa(ia));
|
||||
}
|
||||
|
||||
+struct mnl_socket;
|
||||
static struct {
|
||||
int genl_id;
|
||||
struct mnl_socket *nl;
|
||||
Index: osmo-ggsn-1.2.2/sgsnemu/Makefile.am
|
||||
===================================================================
|
||||
--- osmo-ggsn-1.2.2.orig/sgsnemu/Makefile.am
|
||||
+++ osmo-ggsn-1.2.2/sgsnemu/Makefile.am
|
||||
@@ -1,15 +1,15 @@
|
||||
-bin_PROGRAMS = sgsnemu
|
||||
+sbin_PROGRAMS = sgsnemu
|
||||
|
||||
AM_LDFLAGS = @EXEC_LDFLAGS@
|
||||
|
||||
-AM_CFLAGS = -O2 -D_GNU_SOURCE -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS)
|
||||
+AM_CPPFLAGS = -D_GNU_SOURCE -DSBINDIR='"$(sbindir)"' $(LIBOSMOCORE_CFLAGS)
|
||||
+AM_CFLAGS = -fno-builtin -Wall
|
||||
|
||||
-sgsnemu_LDADD = @EXEC_LDADD@ -lgtp -L../gtp ../lib/libmisc.a $(LIBOSMOCORE_LIBS)
|
||||
+sgsnemu_LDADD = @EXEC_LDADD@ ../gtp/libgtp.la ../lib/libmisc.la $(LIBOSMOCORE_LIBS)
|
||||
|
||||
if ENABLE_GTP_KERNEL
|
||||
-AM_CFLAGS += -DGTP_KERNEL $(LIBGTPNL_CFLAGS)
|
||||
+AM_CPPFLAGS += -DGTP_KERNEL $(LIBGTPNL_CFLAGS)
|
||||
sgsnemu_LDADD += $(LIBGTPNL_LIBS)
|
||||
endif
|
||||
|
||||
-sgsnemu_DEPENDENCIES = ../gtp/libgtp.la ../lib/libmisc.a
|
||||
sgsnemu_SOURCES = sgsnemu.c cmdline.c cmdline.h
|
||||
Index: osmo-ggsn-1.2.2/tests/gtp/Makefile.am
|
||||
===================================================================
|
||||
--- osmo-ggsn-1.2.2.orig/tests/gtp/Makefile.am
|
||||
+++ osmo-ggsn-1.2.2/tests/gtp/Makefile.am
|
||||
@@ -13,7 +13,7 @@ gtpie_test_SOURCES = \
|
||||
$(NULL)
|
||||
|
||||
gtpie_test_LDADD = \
|
||||
- $(top_builddir)/lib/debug.o \
|
||||
+ $(top_builddir)/lib/debug.lo \
|
||||
$(top_builddir)/gtp/libgtp.la \
|
||||
$(LIBOSMOCORE_LIBS) \
|
||||
$(NULL)
|
||||
Index: osmo-ggsn-1.2.2/tests/lib/Makefile.am
|
||||
===================================================================
|
||||
--- osmo-ggsn-1.2.2.orig/tests/lib/Makefile.am
|
||||
+++ osmo-ggsn-1.2.2/tests/lib/Makefile.am
|
||||
@@ -14,7 +14,7 @@ ippool_test_SOURCES = \
|
||||
$(NULL)
|
||||
|
||||
ippool_test_LDADD = \
|
||||
- $(top_builddir)/lib/libmisc.a \
|
||||
+ $(top_builddir)/lib/libmisc.la \
|
||||
$(LIBOSMOCORE_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
@@ -23,6 +23,6 @@ in46a_test_SOURCES = \
|
||||
$(NULL)
|
||||
|
||||
in46a_test_LDADD = \
|
||||
- $(top_builddir)/lib/libmisc.a \
|
||||
+ $(top_builddir)/lib/libmisc.la \
|
||||
$(LIBOSMOCORE_LIBS) \
|
||||
$(NULL)
|
@ -10,8 +10,6 @@ Tue Feb 5 21:33:10 UTC 2019 - mardnh@gmx.de
|
||||
DEL CTX REQ
|
||||
* fix support for multiple IPCP in PDP protocol configuration
|
||||
options
|
||||
- Remove patch: (fixed upstream)
|
||||
* build-fixes.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 11 13:08:04 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
@ -12,7 +12,7 @@
|
||||
# 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/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@ License: GPL-2.0-only AND LGPL-2.1-or-later
|
||||
Group: Productivity/Telephony/Servers
|
||||
URL: https://osmocom.org/projects/openggsn/wiki/OsmoGGSN
|
||||
Source: %name-%version.tar.xz
|
||||
Patch1: build-fixes.diff
|
||||
BuildRequires: libtool >= 2
|
||||
BuildRequires: pkgconfig >= 0.20
|
||||
BuildRequires: systemd-rpm-macros
|
||||
@ -69,11 +70,8 @@ applications that want to make use of libgtp.
|
||||
%build
|
||||
echo "%version" >.tarball-version
|
||||
autoreconf -fi
|
||||
%configure \
|
||||
--disable-static \
|
||||
--docdir="%_docdir/%name" \
|
||||
--with-systemdsystemunitdir=%_unitdir \
|
||||
--includedir="%_includedir/%name"
|
||||
%configure --disable-static --docdir="%_docdir/%name" \
|
||||
--includedir="%_includedir/%name" --with-systemdsystemunitdir="%_unitdir"
|
||||
make %{?_smp_mflags} V=1
|
||||
|
||||
%install
|
||||
@ -104,10 +102,10 @@ install -m 0644 doc/examples/sgsnemu.conf "$b/%_sysconfdir/osmocom/sgsnemu.conf"
|
||||
%files
|
||||
%license COPYING
|
||||
%doc AUTHORS README.md
|
||||
%_bindir/osmo-ggsn
|
||||
%_bindir/sgsnemu
|
||||
%_mandir/man8/osmo-ggsn.8%ext_man
|
||||
%_mandir/man8/sgsnemu.8%ext_man
|
||||
%_sbindir/osmo-ggsn
|
||||
%_sbindir/sgsnemu
|
||||
%_mandir/man8/osmo-ggsn.8*
|
||||
%_mandir/man8/sgsnemu.8*
|
||||
%_unitdir/%name.service
|
||||
%_sbindir/rc%name
|
||||
%dir %_docdir/%name/examples
|
||||
|
Loading…
Reference in New Issue
Block a user