From 107f9cd5d62243f7473a91a1542b9c47ab03d63e619a1cec29f839297157f9e9 Mon Sep 17 00:00:00 2001 From: Martin Hauke Date: Sun, 24 Feb 2019 19:00:52 +0000 Subject: [PATCH] Accepting request 678536 from home:Andreas_Schwab:Factory - override prefix and libdir during install - ndpi-fix-build.patch: don't install multiple copies of the library OBS-URL: https://build.opensuse.org/request/show/678536 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/ndpi?expand=0&rev=7 --- ndpi-fix-build.patch | 37 ++++++++++++------------------------- ndpi.changes | 6 ++++++ ndpi.spec | 18 ++++++++---------- 3 files changed, 26 insertions(+), 35 deletions(-) diff --git a/ndpi-fix-build.patch b/ndpi-fix-build.patch index e719191..1b56d3f 100644 --- a/ndpi-fix-build.patch +++ b/ndpi-fix-build.patch @@ -1,7 +1,7 @@ -diff --git a/Makefile.am b/Makefile.am -index 37f0849..4090817 100644 ---- a/Makefile.am -+++ b/Makefile.am +Index: nDPI-2.6/Makefile.am +=================================================================== +--- nDPI-2.6.orig/Makefile.am ++++ nDPI-2.6/Makefile.am @@ -1,7 +1,7 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src/lib example tests @@ -11,30 +11,17 @@ index 37f0849..4090817 100644 pkgconfig_DATA = libndpi.pc EXTRA_DIST = autogen.sh -diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in -index 0ffeb9d..2c0296a 100644 ---- a/src/lib/Makefile.in -+++ b/src/lib/Makefile.in -@@ -10,8 +10,8 @@ - # - # Installation directories - # --prefix = /usr/local --libdir = ${prefix}/lib -+prefix = /usr -+libdir = ${prefix}/lib64 - includedir = ${prefix}/include/ndpi - CC = @CC@ - CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION -O2 -g -@@ -60,8 +60,8 @@ distclean: clean - +Index: nDPI-2.6/src/lib/Makefile.in +=================================================================== +--- nDPI-2.6.orig/src/lib/Makefile.in ++++ nDPI-2.6/src/lib/Makefile.in +@@ -61,7 +61,7 @@ distclean: clean install: $(NDPI_LIBS) mkdir -p $(DESTDIR)$(libdir) -- cp $(NDPI_LIBS) $(DESTDIR)$(libdir)/ + cp $(NDPI_LIBS) $(DESTDIR)$(libdir)/ - ln -Ffs $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE) - ln -Ffs $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE).$(NDPI_VERSION_MAJOR) -+ ln -sf $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE) -+ ln -sf $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE).$(NDPI_VERSION_MAJOR) -+ cp -v libndpi.so* $(DESTDIR)$(libdir)/ ++ ln -Ffs $(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE) ++ ln -Ffs $(NDPI_LIB_SHARED) $(DESTDIR)$(libdir)/$(NDPI_LIB_SHARED_BASE).$(NDPI_VERSION_MAJOR) mkdir -p $(DESTDIR)$(includedir) cp ../include/*.h $(DESTDIR)$(includedir) diff --git a/ndpi.changes b/ndpi.changes index fdf4169..a94bd81 100644 --- a/ndpi.changes +++ b/ndpi.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Feb 24 15:00:58 UTC 2019 - schwab@suse.de + +- override prefix and libdir during install +- ndpi-fix-build.patch: don't install multiple copies of the library + ------------------------------------------------------------------- Tue Jan 8 17:01:56 UTC 2019 - Jan Engelhardt diff --git a/ndpi.spec b/ndpi.spec index 39d533d..13f39f2 100644 --- a/ndpi.spec +++ b/ndpi.spec @@ -1,6 +1,7 @@ # -# spec file for package nDPI +# spec file for package ndpi # +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2017, Martin Hauke # # All modifications and additions to the file contributed by third parties @@ -12,9 +13,10 @@ # 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/ # + %ifarch %{ix86} x86_64 %bcond_without hyperscan %endif @@ -24,9 +26,9 @@ Name: ndpi Version: 2.6 Release: 0 Summary: Extensible deep packet inspection library -# wireshark/ndpi.lua is GPL-3.0-or-later License: LGPL-3.0-only Group: Development/Libraries/C and C++ +# wireshark/ndpi.lua is GPL-3.0-or-later URL: https://github.com/ntop/nDPI Source: https://github.com/ntop/nDPI/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz # FIXME: Upstream makefile is broken @@ -35,11 +37,11 @@ BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc-c++ BuildRequires: libnuma-devel +BuildRequires: libnuma-devel BuildRequires: libpcap-devel BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: pkgconfig(json-c) -BuildRequires: libnuma-devel %if 0%{with hyperscan} BuildRequires: pkgconfig(libhs) %endif @@ -87,13 +89,9 @@ This package contains the ndpiReader binary. %prep %setup -q -n nDPI-%{version} %patch0 -p1 -sh autogen.sh -# FIXME: Upstream makefile is broken -%ifarch %{ix86} -sed -i 's/lib64/lib/g' src/lib/Makefile.in -%endif %build +sh autogen.sh %configure \ %if 0%{with hyperscan} --with-hyperscan \ @@ -102,7 +100,7 @@ sed -i 's/lib64/lib/g' src/lib/Makefile.in make %{?_smp_mflags} %install -%make_install PREFIX=%{_prefix} +%make_install PREFIX=%{_prefix} prefix=%{_prefix} libdir=%{_libdir} rm -f %{buildroot}/%{_libdir}/libndpi.a %post -n libndpi%{sover} -p /sbin/ldconfig