Accepting request 510891 from home:scarabeus_iv:branches:devel:libraries:c_c++

- Switch to github
- Rename libdnet.patch to libdnet-autoreconf.patch
- Add patch to work properly on multilib systems:
  * libdnet-config-multilib.patch
- Install python bindings
- Add patch for fortify-sources error libdnet-fortify.patch

OBS-URL: https://build.opensuse.org/request/show/510891
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libdnet?expand=0&rev=15
This commit is contained in:
Adam Majer 2017-07-17 10:34:36 +00:00 committed by Git OBS Bridge
parent a795ba2637
commit 120f13a45e
7 changed files with 82 additions and 18 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:58bf2f7662280d558b107692cdc830ba7aa1faf028e4b8e3fc74940c4e421821
size 334765

3
libdnet-1.12.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b6360659c93fa2e3cde9e0a1fc9c07bc4111f3448c5de856e095eb98315dd424
size 959945

View File

@ -1,9 +1,9 @@
Index: configure.in
===================================================================
--- configure.in.orig 2007-01-20 08:39:21.000000000 -0300
+++ configure.in 2009-11-24 08:59:04.000000000 -0300
--- configure.in.orig
+++ configure.in
@@ -6,7 +6,6 @@ dnl
dnl $Id: configure.in 638 2007-01-20 11:39:21Z dugsong $
dnl $Id$
AC_INIT(include/dnet.h)
-AC_CONFIG_AUX_DIR(config)

View File

@ -0,0 +1,15 @@
--- dnet-config.in.old 2014-03-14 11:40:27.332135003 +0000
+++ dnet-config.in 2014-03-14 11:41:08.624931401 +0000
@@ -45,10 +45,10 @@
done
if test "$echo_cflags" = "yes"; then
- echo -I@includedir@
+ echo
fi
if test "$echo_libs" = "yes"; then
- echo -L@libdir@ -ldnet @LIBS@
+ echo -ldnet @LIBS@
fi

13
libdnet-fortify.patch Normal file
View File

@ -0,0 +1,13 @@
Index: libdnet-libdnet-1.12/python/dnet.c
===================================================================
--- libdnet-libdnet-1.12.orig/python/dnet.c
+++ libdnet-libdnet-1.12/python/dnet.c
@@ -20,6 +20,8 @@
#endif
__PYX_EXTERN_C double pow(double, double);
#include "dnet.h"
+#include <string.h>
+#include <bsd/string.h>
typedef struct {const char *s; const void **p;} __Pyx_CApiTabEntry; /*proto*/

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Jul 17 08:10:34 UTC 2017 - tchvatal@suse.com
- Switch to github
- Rename libdnet.patch to libdnet-autoreconf.patch
- Add patch to work properly on multilib systems:
* libdnet-config-multilib.patch
- Install python bindings
- Add patch for fortify-sources error libdnet-fortify.patch
-------------------------------------------------------------------
Fri Mar 13 13:39:24 UTC 2015 - tchvatal@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package libdnet
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -22,12 +22,18 @@ Release: 0
Summary: Library for Simple, Portable Interface to Low Level Networking Routines
License: BSD-3-Clause
Group: Development/Libraries/Other
Url: http://code.google.com/p/libdnet/
Source0: http://libdnet.googlecode.com/files/%{name}-%{version}.tar.bz2
Patch0: %{name}.patch
Url: https://github.com/dugsong/libdnet
Source0: https://github.com/dugsong/libdnet/archive/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM: properly name the dirs for new autoreconf to work
Patch0: libdnet-autoreconf.patch
# PATCH-FIX-UPSTREAM: work properly on multilib systems (from Fedora)
Patch1: libdnet-config-multilib.patch
# PATCH-FIX-UPSTREAM: do include string.h when needed, this is autogenerated
# file which can't be generated with today tools :(
Patch2: libdnet-fortify.patch
BuildRequires: libbsd-devel
BuildRequires: libtool
BuildRequires: python-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
libdnet provides a simplified, portable interface to several low-level
@ -69,29 +75,49 @@ networking routines, including:
- IP tunnelling (BSD/Linux tun, Universal TUN/TAP device)
- raw IP packet and Ethernet frame transmission
%package python
Summary: Python bindings for libdnet
Group: Development/Libraries/Other
Requires: libdnet1 = %{version}
%description python
Dnet library Python 2 bindings.
%prep
%setup -q
%setup -q -n %{name}-%{name}-%{version}
%patch0
%patch1
%patch2 -p1
%build
ACLOCAL="aclocal -I config" autoreconf -fvi
%configure --disable-static --with-pic
%configure \
--disable-static \
--with-pic
make %{?_smp_mflags}
pushd python
python setup.py build
popd
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%post -n libdnet1 -p /sbin/ldconfig
pushd python
python setup.py install --skip-build --root %{buildroot}
popd
%post -n libdnet1 -p /sbin/ldconfig
%postun -n libdnet1 -p /sbin/ldconfig
%files -n libdnet1
%defattr(-,root,root)
%{_libdir}/libdnet.so.1*
%files python
%{python_sitearch}/*
%files devel
%defattr(-,root,root)
%doc LICENSE README TODO THANKS
%{_sbindir}/*
%{_bindir}/dnet-config
@ -99,6 +125,6 @@ find %{buildroot} -type f -name "*.la" -delete -print
%dir %{_includedir}/dnet
%{_includedir}/dnet/*.h
%{_libdir}/libdnet.so
%{_mandir}/man?/dnet.*.gz
%{_mandir}/man?/dnet.*%{ext_man}
%changelog