diff --git a/libdnet-1.12.tar.bz2 b/libdnet-1.12.tar.bz2 deleted file mode 100644 index 41f769e..0000000 --- a/libdnet-1.12.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:58bf2f7662280d558b107692cdc830ba7aa1faf028e4b8e3fc74940c4e421821 -size 334765 diff --git a/libdnet-1.12.tar.gz b/libdnet-1.12.tar.gz new file mode 100644 index 0000000..d6875f2 --- /dev/null +++ b/libdnet-1.12.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6360659c93fa2e3cde9e0a1fc9c07bc4111f3448c5de856e095eb98315dd424 +size 959945 diff --git a/libdnet.patch b/libdnet-autoreconf.patch similarity index 56% rename from libdnet.patch rename to libdnet-autoreconf.patch index 2a9a08e..2e7f09e 100644 --- a/libdnet.patch +++ b/libdnet-autoreconf.patch @@ -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) diff --git a/libdnet-config-multilib.patch b/libdnet-config-multilib.patch new file mode 100644 index 0000000..0690a67 --- /dev/null +++ b/libdnet-config-multilib.patch @@ -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 + diff --git a/libdnet-fortify.patch b/libdnet-fortify.patch new file mode 100644 index 0000000..47d60cc --- /dev/null +++ b/libdnet-fortify.patch @@ -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 ++#include + + + typedef struct {const char *s; const void **p;} __Pyx_CApiTabEntry; /*proto*/ diff --git a/libdnet.changes b/libdnet.changes index 42ecb8d..249ef32 100644 --- a/libdnet.changes +++ b/libdnet.changes @@ -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 diff --git a/libdnet.spec b/libdnet.spec index def2db9..8351e90 100644 --- a/libdnet.spec +++ b/libdnet.spec @@ -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