Accepting request 512432 from devel:libraries:c_c++

1

OBS-URL: https://build.opensuse.org/request/show/512432
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libdnet?expand=0&rev=21
This commit is contained in:
Yuchen Lin 2017-08-10 12:03:59 +00:00 committed by Git OBS Bridge
commit 95c60aeeae
7 changed files with 94 additions and 27 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 Index: configure.in
=================================================================== ===================================================================
--- configure.in.orig 2007-01-20 08:39:21.000000000 -0300 --- configure.in.orig
+++ configure.in 2009-11-24 08:59:04.000000000 -0300 +++ configure.in
@@ -6,7 +6,6 @@ dnl @@ -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_INIT(include/dnet.h)
-AC_CONFIG_AUX_DIR(config) -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,18 @@
-------------------------------------------------------------------
Tue Jul 25 00:45:47 UTC 2017 - jengelh@inai.de
- Fix RPM groups, trim summaries, drop pointless --with-pic.
-------------------------------------------------------------------
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 Fri Mar 13 13:39:24 UTC 2015 - tchvatal@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package libdnet # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -19,18 +19,24 @@
Name: libdnet Name: libdnet
Version: 1.12 Version: 1.12
Release: 0 Release: 0
Summary: Library for Simple, Portable Interface to Low Level Networking Routines Summary: Library for Portable Interface to Low-Level Networking Routines
License: BSD-3-Clause License: BSD-3-Clause
Group: Development/Libraries/Other Group: Development/Libraries/C and C++
Url: http://code.google.com/p/libdnet/ Url: https://github.com/dugsong/libdnet
Source0: http://libdnet.googlecode.com/files/%{name}-%{version}.tar.bz2 Source0: https://github.com/dugsong/libdnet/archive/%{name}-%{version}.tar.gz
Patch0: %{name}.patch # 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: libtool
BuildRequires: python-devel BuildRequires: python-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
libdnet provides a simplified, portable interface to several low-level libdnet provides a portable interface to several low-level
networking routines, including: networking routines, including:
* network address manipulation * network address manipulation
* kernel arp(4) cache and route(4) table lookup and manipulation * kernel arp(4) cache and route(4) table lookup and manipulation
@ -40,11 +46,11 @@ networking routines, including:
* raw IP packet and Ethernet frame transmission * raw IP packet and Ethernet frame transmission
%package -n libdnet1 %package -n libdnet1
Summary: Library for Simple, Portable Interface to Low Level Networking Routines Summary: Library for Portable Interface to Low-Level Networking Routines
Group: Development/Libraries/Other Group: System/Libraries
%description -n libdnet1 %description -n libdnet1
libdnet provides a simplified, portable interface to several low-level libdnet provides a portable interface to several low-level
networking routines, including: networking routines, including:
* network address manipulation * network address manipulation
* kernel arp(4) cache and route(4) table lookup and manipulation * kernel arp(4) cache and route(4) table lookup and manipulation
@ -54,13 +60,13 @@ networking routines, including:
* raw IP packet and Ethernet frame transmission * raw IP packet and Ethernet frame transmission
%package devel %package devel
Summary: Devel files for libdnet Summary: Development files for libdnet
Group: Development/Libraries/Other Group: Development/Libraries/C and C++
Requires: glibc-devel Requires: glibc-devel
Requires: libdnet1 = %{version} Requires: libdnet1 = %{version}
%description devel %description devel
libdnet provides a simplified, portable interface to several low-level libdnet provides a portable interface to several low-level
networking routines, including: networking routines, including:
- network address manipulation - network address manipulation
- kernel arp(4) cache and route(4) table lookup and manipulation - kernel arp(4) cache and route(4) table lookup and manipulation
@ -69,29 +75,47 @@ networking routines, including:
- IP tunnelling (BSD/Linux tun, Universal TUN/TAP device) - IP tunnelling (BSD/Linux tun, Universal TUN/TAP device)
- raw IP packet and Ethernet frame transmission - raw IP packet and Ethernet frame transmission
%package python
Summary: Python bindings for libdnet
Group: Development/Languages/Python
Requires: libdnet1 = %{version}
%description python
Dnet library Python 2 bindings.
%prep %prep
%setup -q %setup -q -n %{name}-%{name}-%{version}
%patch0 %patch0
%patch1
%patch2 -p1
%build %build
ACLOCAL="aclocal -I config" autoreconf -fvi ACLOCAL="aclocal -I config" autoreconf -fvi
%configure --disable-static --with-pic %configure --disable-static
make %{?_smp_mflags} make %{?_smp_mflags}
pushd python
python setup.py build
popd
%install %install
make DESTDIR=%{buildroot} install %{?_smp_mflags} %make_install
find %{buildroot} -type f -name "*.la" -delete -print 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 %postun -n libdnet1 -p /sbin/ldconfig
%files -n libdnet1 %files -n libdnet1
%defattr(-,root,root)
%{_libdir}/libdnet.so.1* %{_libdir}/libdnet.so.1*
%files python
%{python_sitearch}/*
%files devel %files devel
%defattr(-,root,root)
%doc LICENSE README TODO THANKS %doc LICENSE README TODO THANKS
%{_sbindir}/* %{_sbindir}/*
%{_bindir}/dnet-config %{_bindir}/dnet-config
@ -99,6 +123,6 @@ find %{buildroot} -type f -name "*.la" -delete -print
%dir %{_includedir}/dnet %dir %{_includedir}/dnet
%{_includedir}/dnet/*.h %{_includedir}/dnet/*.h
%{_libdir}/libdnet.so %{_libdir}/libdnet.so
%{_mandir}/man?/dnet.*.gz %{_mandir}/man?/dnet.*%{ext_man}
%changelog %changelog