From a4c589c1fc648ff3c25b8ea0640ae320947e48549dbff1034723b26a36e139a0 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 5 Jan 2018 19:01:46 +0000 Subject: [PATCH] integrate build-fixes2.diff into build-fixes.diff OBS-URL: https://build.opensuse.org/package/show/network:telephony/osmo-ggsn?expand=0&rev=5 --- build-fixes.diff | 64 ++++++++++++++++++++++++++++++++---------------- osmo-ggsn.spec | 29 +++++++++------------- 2 files changed, 55 insertions(+), 38 deletions(-) diff --git a/build-fixes.diff b/build-fixes.diff index 23eec89..1be7b34 100644 --- a/build-fixes.diff +++ b/build-fixes.diff @@ -9,17 +9,18 @@ * remove AC_PROG_CXX, the C++ is never used --- - ggsn/Makefile.am | 12 ++++++------ - ggsn/gtp-kernel.c | 5 +---- - gtp/Makefile.am | 3 ++- - lib/Makefile.am | 8 +++++--- - sgsnemu/Makefile.am | 9 ++++----- - 5 files changed, 18 insertions(+), 19 deletions(-) + ggsn/Makefile.am | 12 ++++++------ + ggsn/gtp-kernel.c | 5 +---- + gtp/Makefile.am | 3 ++- + lib/Makefile.am | 8 +++++--- + sgsnemu/Makefile.am | 9 ++++----- + 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.0.0.30/ggsn/Makefile.am +--- osmo-ggsn-1.1.0.orig/ggsn/Makefile.am ++++ osmo-ggsn-1.1.0/ggsn/Makefile.am @@ -1,17 +1,17 @@ -bin_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 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.0.0.30/ggsn/gtp-kernel.c +--- osmo-ggsn-1.1.0.orig/ggsn/gtp-kernel.c ++++ osmo-ggsn-1.1.0/ggsn/gtp-kernel.c @@ -17,8 +17,6 @@ #include @@ -74,10 +75,10 @@ Index: osmo-ggsn-1.0.0.30/ggsn/gtp-kernel.c static struct { int genl_id; 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.0.0.30/gtp/Makefile.am +--- osmo-ggsn-1.1.0.orig/gtp/Makefile.am ++++ osmo-ggsn-1.1.0/gtp/Makefile.am @@ -6,7 +6,8 @@ lib_LTLIBRARIES = libgtp.la 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_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.0.0.30/lib/Makefile.am +--- osmo-ggsn-1.1.0.orig/lib/Makefile.am ++++ osmo-ggsn-1.1.0/lib/Makefile.am @@ -1,7 +1,9 @@ -noinst_LIBRARIES = libmisc.a +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_la_SOURCES = getopt1.c getopt.c ippool.c lookup.c tun.c debug.c in46_addr.c +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.0.0.30/sgsnemu/Makefile.am +--- osmo-ggsn-1.1.0.orig/sgsnemu/Makefile.am ++++ osmo-ggsn-1.1.0/sgsnemu/Makefile.am @@ -1,9 +1,8 @@ -bin_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_LDADD = @EXEC_LDADD@ ../gtp/libgtp.la ../lib/libmisc.la $(LIBOSMOCORE_LIBS) 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) diff --git a/osmo-ggsn.spec b/osmo-ggsn.spec index 03d7a01..56c19bb 100644 --- a/osmo-ggsn.spec +++ b/osmo-ggsn.spec @@ -24,9 +24,8 @@ License: GPL-2.0 AND LGPL-2.1+ Group: Productivity/Telephony/Servers URL: https://osmocom.org/projects/openggsn/wiki/OsmoGGSN Source: %name-%version.tar.xz -#Patch1: build-fixes.diff -Patch2: build-fixes2.diff -Patch3: 0001-fix-compiler-warnings-return-0-in-main-in-3-tests.patch +Patch1: build-fixes.diff +Patch2: 0001-fix-compiler-warnings-return-0-in-main-in-3-tests.patch BuildRequires: libtool >= 2 BuildRequires: pkgconfig >= 0.20 BuildRequires: systemd-rpm-macros @@ -67,29 +66,25 @@ applications that want to make use of libgtp. %prep %setup -q -#%%patch -P 1 -p1 -%patch2 -p1 -%patch3 -p1 +%patch -P 1 -P 2 -p1 %build echo "%version" >.tarball-version autoreconf -fi -%configure \ - --disable-static \ - --docdir=%_docdir/%name \ - --includedir="%_includedir/%name" +%configure --disable-static --docdir="%_docdir/%name" \ + --includedir="%_includedir/%name" make %{?_smp_mflags} V=1 %install -b=%buildroot +b="%buildroot" %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 %buildroot/%_sbindir -ln -s %_sbindir/service %buildroot%_sbindir/rc%name -install -d %buildroot%_sysconfdir/osmocom -install -m 0644 doc/examples/osmo-ggsn.cfg %buildroot%_sysconfdir/osmocom/osmo-ggsn.cfg -install -m 0644 doc/examples/sgsnemu.conf %buildroot%_sysconfdir/osmocom/sgsnemu.conf +install -d "$b/%_sbindir" +ln -s "%_sbindir/service" "$b/%_sbindir/rc%name" +install -d "$b/%_sysconfdir/osmocom" +install -m 0644 doc/examples/osmo-ggsn.cfg "$b/%_sysconfdir/osmocom/osmo-ggsn.cfg" +install -m 0644 doc/examples/sgsnemu.conf "$b/%_sysconfdir/osmocom/sgsnemu.conf" %pre %service_add_pre %name.service