Accepting request 678573 from server:monitoring

OBS-URL: https://build.opensuse.org/request/show/678573
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ndpi?expand=0&rev=2
This commit is contained in:
Stephan Kulow 2019-02-25 16:56:22 +00:00 committed by Git OBS Bridge
commit eeb2c8bc9d
3 changed files with 26 additions and 35 deletions

View File

@ -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)

View File

@ -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 <jengelh@inai.de>

View File

@ -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 <mardnh@gmx.de>
#
# 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