Sophie

Sophie

distrib > Mandriva > 2007.0 > x86_64 > by-pkgid > c394dcb9dec1b5f395a330fbf19d4cd6 > files > 5

libdnet-1.11-1mdv2007.0.src.rpm

%define	major 1
%define libname	%mklibname dnet %{major}

Summary:	Portable interface to several low-level networking routines
Name:		libdnet
Version:	1.11
Release:	%mkrel 1
License:	BSD
Group:		System/Libraries
URL:		http://libdnet.sourceforge.net/
Source0:	http://prdownloads.sourceforge.net/libdnet/%{name}-%{version}.tar.bz2
Patch0:		libdnet-1.11-lib_version_fix.diff
Patch3:		libdnet-1.10-nmap1.diff
Patch4:		libdnet-1.10-nmap2.diff
BuildRequires:	autoconf2.5
BuildRequires:	python-devel
BuildRequires:	pyrex
%if %mdkversion >= 1020
BuildRequires:	multiarch-utils >= 1.0.3
%endif
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

%description
libdnet provides a simplified, portable interface to several
low-level networking routines, including network address
manipulation, kernel arp(4) cache and route(4) table lookup and
manipulation, network firewalling, network interface lookup and
manipulation, and raw IP packet and Ethernet frame transmission.

%package -n	python-dnet
Summary:	Python bindings for dnet
Group:		Development/Python
Requires:	python >= %{py_ver}

%description -n	python-dnet
This module provides a simplified interface to several low-level
networking routines, including network address manipulation, kernel
arp(4) cache and route(4) table lookup and manipulation, network
firewalling, network interface lookup and manipulation, and raw IP
packet and Ethernet frame transmission.

%package -n	%{libname}
Summary:	Portable interface to several low-level networking routines
Group:          System/Libraries
License:	BSD
Obsoletes:	%{name}
Provides:	%{name}

%description -n	%{libname}
libdnet provides a simplified, portable interface to several
low-level networking routines, including network address
manipulation, kernel arp(4) cache and route(4) table lookup and
manipulation, network firewalling, network interface lookup and
manipulation, and raw IP packet and Ethernet frame transmission.

%package -n	%{libname}-utils
Summary:	A simple test program for the %{libname} library
Group:          System/Libraries
License:	BSD
Obsoletes:	%{name}-utils
Provides:	%{name}-utils

%description -n	%{libname}-utils
Provides a simple test program for the %{libname} library.

%package -n	%{libname}-devel
Summary:	Static library and header files for the %{libname} library
Group:		Development/C
License: 	BSD
Obsoletes:	%{name}-devel
Provides:	%{name}-devel
Requires:	%{libname} = %{version}

%description -n	%{libname}-devel
libdnet provides a simplified, portable interface to several
low-level networking routines, including network address
manipulation, kernel arp(4) cache and route(4) table lookup and
manipulation, network firewalling, network interface lookup and
manipulation, and raw IP packet and Ethernet frame transmission.

%prep

%setup -q -n %{name}-%{version}
%patch0 -p0

%patch3 -p0
%patch4 -p0

%build
export WANT_AUTOCONF_2_5=1
libtoolize --copy --force
aclocal -I config
autoheader
autoconf
automake --foreign

%configure2_5x

%make

pushd python
    pyrexc dnet.pyx
    python setup.py build
popd

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%makeinstall

pushd python
    python setup.py install --root=%{buildroot} --install-purelib=%{py_platsitedir}
popd

%if %mdkversion >= 1020
%multiarch_binaries %{buildroot}%{_bindir}/dnet-config
%endif

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%files -n python-dnet
%defattr(-,root,root)
%{py_platsitedir}/dnet.so

%files -n %{libname}
%defattr(-,root,root)
%doc README THANKS TODO
%{_libdir}/*.so.*

%files -n %{libname}-utils
%defattr(-,root,root)
%{_sbindir}/*
%{_mandir}/man8/*

%files -n %{libname}-devel
%defattr(-,root,root)
%if %mdkversion >= 1020
%multiarch %{multiarch_bindir}/dnet-config
%endif
%{_bindir}/dnet-config
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/*.a
%{_libdir}/*.la
%{_mandir}/man3/*

%changelog
* Mon Jul 24 2006 Oden Eriksson <oeriksson@mandriva.com> 1.11-1mdv2007.0
- 1.11
- use python rpm macros
- rediffed patches; P0
- drop redundant patches; P1,P2
- drop upstream patches; P5

* Mon Dec 12 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 1.10-2mdk
- add BuildRequires: pyrex

* Sat Dec 10 2005 Oden Eriksson <oeriksson@mandriva.com> 1.10-1mdk
- 1.10
- rediffed P0,P2
- added two patches from nmap (P3,P4)
- added P5 from cvs to make the python module compile

* Mon Jan 31 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 1.8-4mdk
- fix deps and conditional %%multiarch
- fix requires-on-release

* Mon Sep 20 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.8-3mdk
- use automake 1.4

* Tue May 25 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.8-2mdk
- make it compile on 9.2 too (libtool mess...)
- added P1 & P2 from PLD

* Sun May 23 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.8-1mdk
- 1.8
- fix libname (P0)
- added the python stuff
- misc spec file fixes

* Sat Feb 28 2004 Pascal Terjan <pterjan@mandrake.org> 1.7-3mdk
- dont obsolete current version and don't provide packagename = version

* Thu Jul 10 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.7-2mdk
- rebuild

* Tue Apr 15 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.7-1mdk
- 1.7

* Wed Mar 12 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.6-1mdk
- re-added into cooker contribs
- use the %%mklibname macro
- misc spec file fixes

* Mon Sep 16 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.5-1mdk
- initial cooker contrib