%define name libdnet %define version 1.8 %define release 4mdk %define major 1 %define libname %mklibname dnet %{major} %define pyver %(python -V 2>&1 | cut -f2 -d" " | cut -f1,2 -d".") Summary: Portable interface to several low-level networking routines Name: %{name} Version: %{version} Release: %{release} License: BSD Group: System/Libraries URL: http://libdnet.sourceforge.net/ Source0: %{name}-%{version}.tar.bz2 Patch0: libdnet-1.8-lib_version_fix.diff.bz2 Patch1: libdnet-ac_fixes.patch.bz2 Patch2: libdnet-am_fixes.patch.bz2 Obsoletes: %{name} Provides: %{libname} = %{version} Provides: %{name} %if %mdkversion >= 1010 BuildRequires: automake1.4 %endif BuildRequires: autoconf2.5 BuildRequires: python-devel %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 >= %{pyver} %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 -p1 %patch1 -p1 %patch2 -p1 %build export WANT_AUTOCONF_2_5=1 %define __libtoolize /bin/true aclocal-1.4 -I config autoheader autoconf automake-1.4 --foreign export CFLAGS="%{optflags} -fPIC" %configure2_5x \ --cache-file=config.cache \ --enable-shared \ --enable-static \ --with-python=%{_prefix} %make %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %makeinstall %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 %post -n %{libname}-devel -p /sbin/ldconfig %postun -n %{libname}-devel -p /sbin/ldconfig %files -n python-dnet %defattr(-,root,root) %{_libdir}/python*/site-packages/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 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