%define name libnet1 %define version 1.0.2a %define release 2mdk %define major 1 %define libname %mklibname net %{major} Summary: A C library for portable packet creation Name: %{name} Version: %{version} Release: %{release} Source0: http://www.packetfactory.net/libnet/dist/libnet-%{version}.tar.bz2 Patch0: %{name}-shared.patch.bz2 Patch1: %{name}-include.patch.bz2 Patch2: %{name}-name.patch.bz2 License: BSD Group: System/Libraries URL: http://www.packetfactory.net/libnet BuildPreReq: libpcap BuildPreReq: libpcap-devel BuildPreReq: libtool BuildRoot: %{_tmppath}/%{name}-buildroot %description Libnet is an API to help with the construction and handling of network packets. It provides a portable framework for low-level network packet writing and handling (use libnet in conjunction with libpcap and you can write some really cool stuff). Libnet includes packet creation at the IP layer and at the link layer as well as a host of supplementary and complementary functionalty. Libnet is avery handy with which to write network tools and network test code. See the manpage and sample test code for more detailed information %package -n %{libname}-devel Summary: Development library and header files for the %{name} library Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: lib%{name}-devel Provides: %{name}-devel %description -n %{libname}-devel Libnet is an API to help with the construction and handling of network packets. It provides a portable framework for low-level network packet writing and handling (use libnet in conjunction with libpcap and you can write some really cool stuff). Libnet includes packet creation at the IP layer and at the link layer as well as a host of supplementary and complementary functionalty. Libnet is avery handy with which to write network tools and network test code. See the manpage and sample test code for more detailed information This package contains the static %{libname} library and its header files. %package -n %{libname}-static-devel Summary: Static development library for the %{name} library Group: Development/C Requires: %{libname}-devel = %{version}-%{release} %description -n %{libname}-static-devel Libnet is an API to help with the construction and handling of network packets. It provides a portable framework for low-level network packet writing and handling (use libnet in conjunction with libpcap and you can write some really cool stuff). Libnet includes packet creation at the IP layer and at the link layer as well as a host of supplementary and complementary functionalty. Libnet is avery handy with which to write network tools and network test code. See the manpage and sample test code for more detailed information This package contains the static %{libname} library. %prep %setup -q -n Libnet-%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 mv include/libnet include/libnet1 # fix file permissions chmod 644 README doc/CHANGELOG* %build cp %{_datadir}/automake-1.4/config.* . aclocal-1.4; autoconf-2.13 %configure --with-pf_packet=yes %make %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} mv include/libnet.h include/libnet1.h mv doc/libnet.3 doc/libnet1.3 mv libnet-config libnet1-config make \ DESTDIR=%{buildroot} \ INSTALL="/usr/bin/install" \ MAN_PREFIX=%{_mandir}/man3 \ install ln -sf libnet1.so.1.0 %{buildroot}%{_libdir}/libnet1.so ln -sf libnet1.so %{buildroot}%{_libdir}/libpwrite1.so ln -sf libnet1.a %{buildroot}%{_libdir}/libpwrite1.a %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc README doc/CHANGELOG* %attr(755,root,root) %{_libdir}/lib*.so.*.* %files -n %{libname}-devel %defattr(-,root,root) %attr(755,root,root) %{_bindir}/* %attr(755,root,root) %{_libdir}/lib*.so %{_includedir}/*.h %{_includedir}/libnet1 %{_mandir}/man*/* %files -n %{libname}-static-devel %defattr(-,root,root) %{_libdir}/lib*.a %changelog * Thu Jul 10 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.0.2a-2mdk - rebuild * Mon Jul 07 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.0.2a-1mdk - initial cooker contrib, based on Giuseppe Ghibò's spec file and ideas and patches from PLD - use the %%mklibname macro - misc spec file fixes * Thu Jan 16 2003 Lenny Cartier <lenny@mandrakesoft.com> 1.0.2a-2mdk - rebuild - remove unwanted files * Tue Nov 13 2001 Florin <florin@mandrakesoft.com> 1.0.2a-1mdk - 1.0.2a * Mon Sep 24 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.0.2-7mdk - fix permissions * Sun Jul 29 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.0.2-6mdk - rebuild * Wed May 23 2001 Jeff Garzik <jgarzik@mandrakesoft.com> 1.0.2-5mdk - BuildRequires: libtool * Sun Apr 08 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 1.0.2-4mdk - Rebuild and up to 4mdk to get back the libnet main binary package. * Tue Feb 06 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 1.0.2-2mdk - fix the broken makefile which generated a broken rpm. - no need to manually install libnet-config. * Tue Feb 06 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 1.0.2-1mdk - new and shiny source. - put a versioning on the source tarball. - put a url in the source tag. - quiet setup so we don't get a load of crap. - removed libpwrite.a -> libnet.a symbolic linking. - removed buildroot before doing an %%install. - use the install command, not mv, when installing the manual page. - manually install libnet-config into /usr/bin. * Fri Nov 10 2000 Lenny Cartier <lenny@mandrakesoft.com> 1.0.1b-4mdk - more macros - rebuild for gcc-2.96 - delete CVS files * Thu Aug 24 2000 Lenny Cartier <lenny@mandrakesoft.com> 1.0.1b-3mdk - add macros - BM * Tue Apr 18 2000 Lenny Cartier <lenny@mandrakesoft.com> 1.0.1b-2mdk - v1.0.1b * Tue Mar 23 2000 Lenny Cartier <lenny@mandrakesoft.com> 1.0.1-1mdk - v1.0.1 * Sat Nov 13 1999 Giuseppe Ghibò <ghibo@linux-mandrake.com> - first SPEC file for Mandrake.